diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java deleted file mode 100644 index 0229aca..0000000 --- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.casic.detector.bean; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class SmallLabelBean { - @Id(autoincrement = true) - private Long id;//主键ID - // 标识器ID号 - private String markerId; - // 位置点编号 - private String locationNo; - // 位置点名称 - private String locationName; - // 电子标签ID号 - private String smallMarkerId; - // 电缆名称 - private String cableName; - // 电缆编号 - private String cableNo; - // 所属线路 - private String line; - // 电压等级 - private String pressLevel; - // 电缆型号 - private String cableType; - // 电缆规格 - private String cableSpec; - // 电缆品牌 - private String cableBrand; - // 电缆起点 - private String cableStart; - // 电缆终点 - private String cableEnd; - // 中间接头 - private String hasJoint; - // 中间接头制作人 - private String jointCreator; - // 安装时间 - private String createTime; - // 照片路径 - private String path; - // 备注1 - private String memo1; - // 备注2 - private String memo2; - // 备注3 - private String memo3; - - @Generated(hash = 732551726) - public SmallLabelBean(Long id, String markerId, String locationNo, - String locationName, String smallMarkerId, String cableName, - String cableNo, String line, String pressLevel, String cableType, - String cableSpec, String cableBrand, String cableStart, String cableEnd, - String hasJoint, String jointCreator, String createTime, String path, - String memo1, String memo2, String memo3) { - this.id = id; - this.markerId = markerId; - this.locationNo = locationNo; - this.locationName = locationName; - this.smallMarkerId = smallMarkerId; - this.cableName = cableName; - this.cableNo = cableNo; - this.line = line; - this.pressLevel = pressLevel; - this.cableType = cableType; - this.cableSpec = cableSpec; - this.cableBrand = cableBrand; - this.cableStart = cableStart; - this.cableEnd = cableEnd; - this.hasJoint = hasJoint; - this.jointCreator = jointCreator; - this.createTime = createTime; - this.path = path; - this.memo1 = memo1; - this.memo2 = memo2; - this.memo3 = memo3; - } - - @Generated(hash = 1271203389) - public SmallLabelBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getLocationNo() { - return this.locationNo; - } - - public void setLocationNo(String locationNo) { - this.locationNo = locationNo; - } - - public String getLocationName() { - return this.locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public String getSmallMarkerId() { - return this.smallMarkerId; - } - - public void setSmallMarkerId(String smallMarkerId) { - this.smallMarkerId = smallMarkerId; - } - - public String getCableName() { - return this.cableName; - } - - public void setCableName(String cableName) { - this.cableName = cableName; - } - - public String getCableNo() { - return this.cableNo; - } - - public void setCableNo(String cableNo) { - this.cableNo = cableNo; - } - - public String getLine() { - return this.line; - } - - public void setLine(String line) { - this.line = line; - } - - public String getPressLevel() { - return this.pressLevel; - } - - public void setPressLevel(String pressLevel) { - this.pressLevel = pressLevel; - } - - public String getCableType() { - return this.cableType; - } - - public void setCableType(String cableType) { - this.cableType = cableType; - } - - public String getCableSpec() { - return this.cableSpec; - } - - public void setCableSpec(String cableSpec) { - this.cableSpec = cableSpec; - } - - public String getCableBrand() { - return this.cableBrand; - } - - public void setCableBrand(String cableBrand) { - this.cableBrand = cableBrand; - } - - public String getCableStart() { - return this.cableStart; - } - - public void setCableStart(String cableStart) { - this.cableStart = cableStart; - } - - public String getCableEnd() { - return this.cableEnd; - } - - public void setCableEnd(String cableEnd) { - this.cableEnd = cableEnd; - } - - public String getHasJoint() { - return this.hasJoint; - } - - public void setHasJoint(String hasJoint) { - this.hasJoint = hasJoint; - } - - public String getJointCreator() { - return this.jointCreator; - } - - public void setJointCreator(String jointCreator) { - this.jointCreator = jointCreator; - } - - public String getCreateTime() { - return this.createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getPath() { - return this.path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMemo1() { - return this.memo1; - } - - public void setMemo1(String memo1) { - this.memo1 = memo1; - } - - public String getMemo2() { - return this.memo2; - } - - public void setMemo2(String memo2) { - this.memo2 = memo2; - } - - public String getMemo3() { - return this.memo3; - } - - public void setMemo3(String memo3) { - this.memo3 = memo3; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java deleted file mode 100644 index 0229aca..0000000 --- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.casic.detector.bean; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class SmallLabelBean { - @Id(autoincrement = true) - private Long id;//主键ID - // 标识器ID号 - private String markerId; - // 位置点编号 - private String locationNo; - // 位置点名称 - private String locationName; - // 电子标签ID号 - private String smallMarkerId; - // 电缆名称 - private String cableName; - // 电缆编号 - private String cableNo; - // 所属线路 - private String line; - // 电压等级 - private String pressLevel; - // 电缆型号 - private String cableType; - // 电缆规格 - private String cableSpec; - // 电缆品牌 - private String cableBrand; - // 电缆起点 - private String cableStart; - // 电缆终点 - private String cableEnd; - // 中间接头 - private String hasJoint; - // 中间接头制作人 - private String jointCreator; - // 安装时间 - private String createTime; - // 照片路径 - private String path; - // 备注1 - private String memo1; - // 备注2 - private String memo2; - // 备注3 - private String memo3; - - @Generated(hash = 732551726) - public SmallLabelBean(Long id, String markerId, String locationNo, - String locationName, String smallMarkerId, String cableName, - String cableNo, String line, String pressLevel, String cableType, - String cableSpec, String cableBrand, String cableStart, String cableEnd, - String hasJoint, String jointCreator, String createTime, String path, - String memo1, String memo2, String memo3) { - this.id = id; - this.markerId = markerId; - this.locationNo = locationNo; - this.locationName = locationName; - this.smallMarkerId = smallMarkerId; - this.cableName = cableName; - this.cableNo = cableNo; - this.line = line; - this.pressLevel = pressLevel; - this.cableType = cableType; - this.cableSpec = cableSpec; - this.cableBrand = cableBrand; - this.cableStart = cableStart; - this.cableEnd = cableEnd; - this.hasJoint = hasJoint; - this.jointCreator = jointCreator; - this.createTime = createTime; - this.path = path; - this.memo1 = memo1; - this.memo2 = memo2; - this.memo3 = memo3; - } - - @Generated(hash = 1271203389) - public SmallLabelBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getLocationNo() { - return this.locationNo; - } - - public void setLocationNo(String locationNo) { - this.locationNo = locationNo; - } - - public String getLocationName() { - return this.locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public String getSmallMarkerId() { - return this.smallMarkerId; - } - - public void setSmallMarkerId(String smallMarkerId) { - this.smallMarkerId = smallMarkerId; - } - - public String getCableName() { - return this.cableName; - } - - public void setCableName(String cableName) { - this.cableName = cableName; - } - - public String getCableNo() { - return this.cableNo; - } - - public void setCableNo(String cableNo) { - this.cableNo = cableNo; - } - - public String getLine() { - return this.line; - } - - public void setLine(String line) { - this.line = line; - } - - public String getPressLevel() { - return this.pressLevel; - } - - public void setPressLevel(String pressLevel) { - this.pressLevel = pressLevel; - } - - public String getCableType() { - return this.cableType; - } - - public void setCableType(String cableType) { - this.cableType = cableType; - } - - public String getCableSpec() { - return this.cableSpec; - } - - public void setCableSpec(String cableSpec) { - this.cableSpec = cableSpec; - } - - public String getCableBrand() { - return this.cableBrand; - } - - public void setCableBrand(String cableBrand) { - this.cableBrand = cableBrand; - } - - public String getCableStart() { - return this.cableStart; - } - - public void setCableStart(String cableStart) { - this.cableStart = cableStart; - } - - public String getCableEnd() { - return this.cableEnd; - } - - public void setCableEnd(String cableEnd) { - this.cableEnd = cableEnd; - } - - public String getHasJoint() { - return this.hasJoint; - } - - public void setHasJoint(String hasJoint) { - this.hasJoint = hasJoint; - } - - public String getJointCreator() { - return this.jointCreator; - } - - public void setJointCreator(String jointCreator) { - this.jointCreator = jointCreator; - } - - public String getCreateTime() { - return this.createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getPath() { - return this.path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMemo1() { - return this.memo1; - } - - public void setMemo1(String memo1) { - this.memo1 = memo1; - } - - public String getMemo2() { - return this.memo2; - } - - public void setMemo2(String memo2) { - this.memo2 = memo2; - } - - public String getMemo3() { - return this.memo3; - } - - public void setMemo3(String memo3) { - this.memo3 = memo3; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java deleted file mode 100644 index f398288..0000000 --- a/app/src/main/java/com/casic/detector/bean/TaskBean.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.casic.detector.bean; - -import com.casic.detector.model.TaskModel; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class TaskBean { - @Id(autoincrement = true) - private Long id;//主键ID - - /** - * { - * "id": 5703, - * "isChecked": 0, - * "isNormal": 1, - * "latitude": 30.56693088, - * "longitude": 104.2848611, - * "markerId": 26, - * "markerIdReal": "0008798066", - * "taskCode": "20240418195448", - * "taskId": "346" - * } - */ - - private String scanner; - private String desc; - - /** - * 真实任务ID - */ - private String taskId; - - /** - * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存 - */ - private String taskCode; - private String markerId; - - /** - * 探测仪扫描出来的ID - */ - private String markerRealId; - private String lng; - private String lat; - private String state; - - @Generated(hash = 1891433912) - public TaskBean(Long id, String scanner, String desc, String taskId, - String taskCode, String markerId, String markerRealId, String lng, - String lat, String state) { - this.id = id; - this.scanner = scanner; - this.desc = desc; - this.taskId = taskId; - this.taskCode = taskCode; - this.markerId = markerId; - this.markerRealId = markerRealId; - this.lng = lng; - this.lat = lat; - this.state = state; - } - - @Generated(hash = 1443476586) - public TaskBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getScanner() { - return this.scanner; - } - - public void setScanner(String scanner) { - this.scanner = scanner; - } - - public String getDesc() { - return this.desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getTaskId() { - return this.taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getTaskCode() { - return this.taskCode; - } - - public void setTaskCode(String taskCode) { - this.taskCode = taskCode; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getMarkerRealId() { - return this.markerRealId; - } - - public void setMarkerRealId(String markerRealId) { - this.markerRealId = markerRealId; - } - - public String getLng() { - return this.lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getLat() { - return this.lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java deleted file mode 100644 index 0229aca..0000000 --- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.casic.detector.bean; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class SmallLabelBean { - @Id(autoincrement = true) - private Long id;//主键ID - // 标识器ID号 - private String markerId; - // 位置点编号 - private String locationNo; - // 位置点名称 - private String locationName; - // 电子标签ID号 - private String smallMarkerId; - // 电缆名称 - private String cableName; - // 电缆编号 - private String cableNo; - // 所属线路 - private String line; - // 电压等级 - private String pressLevel; - // 电缆型号 - private String cableType; - // 电缆规格 - private String cableSpec; - // 电缆品牌 - private String cableBrand; - // 电缆起点 - private String cableStart; - // 电缆终点 - private String cableEnd; - // 中间接头 - private String hasJoint; - // 中间接头制作人 - private String jointCreator; - // 安装时间 - private String createTime; - // 照片路径 - private String path; - // 备注1 - private String memo1; - // 备注2 - private String memo2; - // 备注3 - private String memo3; - - @Generated(hash = 732551726) - public SmallLabelBean(Long id, String markerId, String locationNo, - String locationName, String smallMarkerId, String cableName, - String cableNo, String line, String pressLevel, String cableType, - String cableSpec, String cableBrand, String cableStart, String cableEnd, - String hasJoint, String jointCreator, String createTime, String path, - String memo1, String memo2, String memo3) { - this.id = id; - this.markerId = markerId; - this.locationNo = locationNo; - this.locationName = locationName; - this.smallMarkerId = smallMarkerId; - this.cableName = cableName; - this.cableNo = cableNo; - this.line = line; - this.pressLevel = pressLevel; - this.cableType = cableType; - this.cableSpec = cableSpec; - this.cableBrand = cableBrand; - this.cableStart = cableStart; - this.cableEnd = cableEnd; - this.hasJoint = hasJoint; - this.jointCreator = jointCreator; - this.createTime = createTime; - this.path = path; - this.memo1 = memo1; - this.memo2 = memo2; - this.memo3 = memo3; - } - - @Generated(hash = 1271203389) - public SmallLabelBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getLocationNo() { - return this.locationNo; - } - - public void setLocationNo(String locationNo) { - this.locationNo = locationNo; - } - - public String getLocationName() { - return this.locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public String getSmallMarkerId() { - return this.smallMarkerId; - } - - public void setSmallMarkerId(String smallMarkerId) { - this.smallMarkerId = smallMarkerId; - } - - public String getCableName() { - return this.cableName; - } - - public void setCableName(String cableName) { - this.cableName = cableName; - } - - public String getCableNo() { - return this.cableNo; - } - - public void setCableNo(String cableNo) { - this.cableNo = cableNo; - } - - public String getLine() { - return this.line; - } - - public void setLine(String line) { - this.line = line; - } - - public String getPressLevel() { - return this.pressLevel; - } - - public void setPressLevel(String pressLevel) { - this.pressLevel = pressLevel; - } - - public String getCableType() { - return this.cableType; - } - - public void setCableType(String cableType) { - this.cableType = cableType; - } - - public String getCableSpec() { - return this.cableSpec; - } - - public void setCableSpec(String cableSpec) { - this.cableSpec = cableSpec; - } - - public String getCableBrand() { - return this.cableBrand; - } - - public void setCableBrand(String cableBrand) { - this.cableBrand = cableBrand; - } - - public String getCableStart() { - return this.cableStart; - } - - public void setCableStart(String cableStart) { - this.cableStart = cableStart; - } - - public String getCableEnd() { - return this.cableEnd; - } - - public void setCableEnd(String cableEnd) { - this.cableEnd = cableEnd; - } - - public String getHasJoint() { - return this.hasJoint; - } - - public void setHasJoint(String hasJoint) { - this.hasJoint = hasJoint; - } - - public String getJointCreator() { - return this.jointCreator; - } - - public void setJointCreator(String jointCreator) { - this.jointCreator = jointCreator; - } - - public String getCreateTime() { - return this.createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getPath() { - return this.path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMemo1() { - return this.memo1; - } - - public void setMemo1(String memo1) { - this.memo1 = memo1; - } - - public String getMemo2() { - return this.memo2; - } - - public void setMemo2(String memo2) { - this.memo2 = memo2; - } - - public String getMemo3() { - return this.memo3; - } - - public void setMemo3(String memo3) { - this.memo3 = memo3; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java deleted file mode 100644 index f398288..0000000 --- a/app/src/main/java/com/casic/detector/bean/TaskBean.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.casic.detector.bean; - -import com.casic.detector.model.TaskModel; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class TaskBean { - @Id(autoincrement = true) - private Long id;//主键ID - - /** - * { - * "id": 5703, - * "isChecked": 0, - * "isNormal": 1, - * "latitude": 30.56693088, - * "longitude": 104.2848611, - * "markerId": 26, - * "markerIdReal": "0008798066", - * "taskCode": "20240418195448", - * "taskId": "346" - * } - */ - - private String scanner; - private String desc; - - /** - * 真实任务ID - */ - private String taskId; - - /** - * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存 - */ - private String taskCode; - private String markerId; - - /** - * 探测仪扫描出来的ID - */ - private String markerRealId; - private String lng; - private String lat; - private String state; - - @Generated(hash = 1891433912) - public TaskBean(Long id, String scanner, String desc, String taskId, - String taskCode, String markerId, String markerRealId, String lng, - String lat, String state) { - this.id = id; - this.scanner = scanner; - this.desc = desc; - this.taskId = taskId; - this.taskCode = taskCode; - this.markerId = markerId; - this.markerRealId = markerRealId; - this.lng = lng; - this.lat = lat; - this.state = state; - } - - @Generated(hash = 1443476586) - public TaskBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getScanner() { - return this.scanner; - } - - public void setScanner(String scanner) { - this.scanner = scanner; - } - - public String getDesc() { - return this.desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getTaskId() { - return this.taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getTaskCode() { - return this.taskCode; - } - - public void setTaskCode(String taskCode) { - this.taskCode = taskCode; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getMarkerRealId() { - return this.markerRealId; - } - - public void setMarkerRealId(String markerRealId) { - this.markerRealId = markerRealId; - } - - public String getLng() { - return this.lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getLat() { - return this.lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java new file mode 100644 index 0000000..dd93541 --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java @@ -0,0 +1,104 @@ +package com.casic.detector.bean; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息 + */ +@Entity +public class TaskLocalBean { + @Id + private Long id;//任务ID + + private String taskCode;//任务编号 + private String description;//任务名称 + private String createTime;//任务创建的时间 + private String status;//任务状态 + private String createUserName;//任务创建者名称 + private String startTime;//任务被开始执行的时间 + private String endTime;//任务执行结束的时间 + + @Generated(hash = 931317614) + public TaskLocalBean(Long id, String taskCode, String description, + String createTime, String status, String createUserName, + String startTime, String endTime) { + this.id = id; + this.taskCode = taskCode; + this.description = description; + this.createTime = createTime; + this.status = status; + this.createUserName = createUserName; + this.startTime = startTime; + this.endTime = endTime; + } + + @Generated(hash = 949704588) + public TaskLocalBean() { + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTaskCode() { + return this.taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCreateTime() { + return this.createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateUserName() { + return this.createUserName; + } + + public void setCreateUserName(String createUserName) { + this.createUserName = createUserName; + } + + public String getStartTime() { + return this.startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return this.endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } +} diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java deleted file mode 100644 index 0229aca..0000000 --- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.casic.detector.bean; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class SmallLabelBean { - @Id(autoincrement = true) - private Long id;//主键ID - // 标识器ID号 - private String markerId; - // 位置点编号 - private String locationNo; - // 位置点名称 - private String locationName; - // 电子标签ID号 - private String smallMarkerId; - // 电缆名称 - private String cableName; - // 电缆编号 - private String cableNo; - // 所属线路 - private String line; - // 电压等级 - private String pressLevel; - // 电缆型号 - private String cableType; - // 电缆规格 - private String cableSpec; - // 电缆品牌 - private String cableBrand; - // 电缆起点 - private String cableStart; - // 电缆终点 - private String cableEnd; - // 中间接头 - private String hasJoint; - // 中间接头制作人 - private String jointCreator; - // 安装时间 - private String createTime; - // 照片路径 - private String path; - // 备注1 - private String memo1; - // 备注2 - private String memo2; - // 备注3 - private String memo3; - - @Generated(hash = 732551726) - public SmallLabelBean(Long id, String markerId, String locationNo, - String locationName, String smallMarkerId, String cableName, - String cableNo, String line, String pressLevel, String cableType, - String cableSpec, String cableBrand, String cableStart, String cableEnd, - String hasJoint, String jointCreator, String createTime, String path, - String memo1, String memo2, String memo3) { - this.id = id; - this.markerId = markerId; - this.locationNo = locationNo; - this.locationName = locationName; - this.smallMarkerId = smallMarkerId; - this.cableName = cableName; - this.cableNo = cableNo; - this.line = line; - this.pressLevel = pressLevel; - this.cableType = cableType; - this.cableSpec = cableSpec; - this.cableBrand = cableBrand; - this.cableStart = cableStart; - this.cableEnd = cableEnd; - this.hasJoint = hasJoint; - this.jointCreator = jointCreator; - this.createTime = createTime; - this.path = path; - this.memo1 = memo1; - this.memo2 = memo2; - this.memo3 = memo3; - } - - @Generated(hash = 1271203389) - public SmallLabelBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getLocationNo() { - return this.locationNo; - } - - public void setLocationNo(String locationNo) { - this.locationNo = locationNo; - } - - public String getLocationName() { - return this.locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public String getSmallMarkerId() { - return this.smallMarkerId; - } - - public void setSmallMarkerId(String smallMarkerId) { - this.smallMarkerId = smallMarkerId; - } - - public String getCableName() { - return this.cableName; - } - - public void setCableName(String cableName) { - this.cableName = cableName; - } - - public String getCableNo() { - return this.cableNo; - } - - public void setCableNo(String cableNo) { - this.cableNo = cableNo; - } - - public String getLine() { - return this.line; - } - - public void setLine(String line) { - this.line = line; - } - - public String getPressLevel() { - return this.pressLevel; - } - - public void setPressLevel(String pressLevel) { - this.pressLevel = pressLevel; - } - - public String getCableType() { - return this.cableType; - } - - public void setCableType(String cableType) { - this.cableType = cableType; - } - - public String getCableSpec() { - return this.cableSpec; - } - - public void setCableSpec(String cableSpec) { - this.cableSpec = cableSpec; - } - - public String getCableBrand() { - return this.cableBrand; - } - - public void setCableBrand(String cableBrand) { - this.cableBrand = cableBrand; - } - - public String getCableStart() { - return this.cableStart; - } - - public void setCableStart(String cableStart) { - this.cableStart = cableStart; - } - - public String getCableEnd() { - return this.cableEnd; - } - - public void setCableEnd(String cableEnd) { - this.cableEnd = cableEnd; - } - - public String getHasJoint() { - return this.hasJoint; - } - - public void setHasJoint(String hasJoint) { - this.hasJoint = hasJoint; - } - - public String getJointCreator() { - return this.jointCreator; - } - - public void setJointCreator(String jointCreator) { - this.jointCreator = jointCreator; - } - - public String getCreateTime() { - return this.createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getPath() { - return this.path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMemo1() { - return this.memo1; - } - - public void setMemo1(String memo1) { - this.memo1 = memo1; - } - - public String getMemo2() { - return this.memo2; - } - - public void setMemo2(String memo2) { - this.memo2 = memo2; - } - - public String getMemo3() { - return this.memo3; - } - - public void setMemo3(String memo3) { - this.memo3 = memo3; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java deleted file mode 100644 index f398288..0000000 --- a/app/src/main/java/com/casic/detector/bean/TaskBean.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.casic.detector.bean; - -import com.casic.detector.model.TaskModel; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class TaskBean { - @Id(autoincrement = true) - private Long id;//主键ID - - /** - * { - * "id": 5703, - * "isChecked": 0, - * "isNormal": 1, - * "latitude": 30.56693088, - * "longitude": 104.2848611, - * "markerId": 26, - * "markerIdReal": "0008798066", - * "taskCode": "20240418195448", - * "taskId": "346" - * } - */ - - private String scanner; - private String desc; - - /** - * 真实任务ID - */ - private String taskId; - - /** - * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存 - */ - private String taskCode; - private String markerId; - - /** - * 探测仪扫描出来的ID - */ - private String markerRealId; - private String lng; - private String lat; - private String state; - - @Generated(hash = 1891433912) - public TaskBean(Long id, String scanner, String desc, String taskId, - String taskCode, String markerId, String markerRealId, String lng, - String lat, String state) { - this.id = id; - this.scanner = scanner; - this.desc = desc; - this.taskId = taskId; - this.taskCode = taskCode; - this.markerId = markerId; - this.markerRealId = markerRealId; - this.lng = lng; - this.lat = lat; - this.state = state; - } - - @Generated(hash = 1443476586) - public TaskBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getScanner() { - return this.scanner; - } - - public void setScanner(String scanner) { - this.scanner = scanner; - } - - public String getDesc() { - return this.desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getTaskId() { - return this.taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getTaskCode() { - return this.taskCode; - } - - public void setTaskCode(String taskCode) { - this.taskCode = taskCode; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getMarkerRealId() { - return this.markerRealId; - } - - public void setMarkerRealId(String markerRealId) { - this.markerRealId = markerRealId; - } - - public String getLng() { - return this.lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getLat() { - return this.lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java new file mode 100644 index 0000000..dd93541 --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java @@ -0,0 +1,104 @@ +package com.casic.detector.bean; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息 + */ +@Entity +public class TaskLocalBean { + @Id + private Long id;//任务ID + + private String taskCode;//任务编号 + private String description;//任务名称 + private String createTime;//任务创建的时间 + private String status;//任务状态 + private String createUserName;//任务创建者名称 + private String startTime;//任务被开始执行的时间 + private String endTime;//任务执行结束的时间 + + @Generated(hash = 931317614) + public TaskLocalBean(Long id, String taskCode, String description, + String createTime, String status, String createUserName, + String startTime, String endTime) { + this.id = id; + this.taskCode = taskCode; + this.description = description; + this.createTime = createTime; + this.status = status; + this.createUserName = createUserName; + this.startTime = startTime; + this.endTime = endTime; + } + + @Generated(hash = 949704588) + public TaskLocalBean() { + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTaskCode() { + return this.taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCreateTime() { + return this.createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateUserName() { + return this.createUserName; + } + + public void setCreateUserName(String createUserName) { + this.createUserName = createUserName; + } + + public String getStartTime() { + return this.startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return this.endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } +} diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java new file mode 100644 index 0000000..3e7494d --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java @@ -0,0 +1,128 @@ +package com.casic.detector.bean; + +import com.casic.detector.model.TaskModel; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务里面需要巡检的标识器信息本地库实体类 + */ +@Entity +public class TaskMarkerLocalBean { + @Id + private Long id;//标识器后台库的主键ID,不是标识器实际ID + + /** + * 任务ID,通过此字段关联{@link TaskLocalBean#id} + */ + private String taskId; + + /** + * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode} + *
+ * 双重验证,防止出现同时刻重复的情况 + */ + private String taskCode; + + /** + * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID + */ + private String markerId; + + private double lng; + private double lat; + + /** + * 是否已被探测到 + * 1-是,0-否 + */ + private String isDetected; + + /** + * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime} + */ + private String detectedTime; + + @Generated(hash = 677328533) + public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId, + double lng, double lat, String isDetected, String detectedTime) { + this.id = id; + this.taskId = taskId; + this.taskCode = taskCode; + this.markerId = markerId; + this.lng = lng; + this.lat = lat; + this.isDetected = isDetected; + this.detectedTime = detectedTime; + } + + @Generated(hash = 1162404642) + public TaskMarkerLocalBean() { + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTaskId() { + return this.taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getTaskCode() { + return this.taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getMarkerId() { + return this.markerId; + } + + public void setMarkerId(String markerId) { + this.markerId = markerId; + } + + public double getLng() { + return this.lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public double getLat() { + return this.lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public String getIsDetected() { + return this.isDetected; + } + + public void setIsDetected(String isDetected) { + this.isDetected = isDetected; + } + + public String getDetectedTime() { + return this.detectedTime; + } + + public void setDetectedTime(String detectedTime) { + this.detectedTime = detectedTime; + } +} diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java deleted file mode 100644 index 0229aca..0000000 --- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.casic.detector.bean; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class SmallLabelBean { - @Id(autoincrement = true) - private Long id;//主键ID - // 标识器ID号 - private String markerId; - // 位置点编号 - private String locationNo; - // 位置点名称 - private String locationName; - // 电子标签ID号 - private String smallMarkerId; - // 电缆名称 - private String cableName; - // 电缆编号 - private String cableNo; - // 所属线路 - private String line; - // 电压等级 - private String pressLevel; - // 电缆型号 - private String cableType; - // 电缆规格 - private String cableSpec; - // 电缆品牌 - private String cableBrand; - // 电缆起点 - private String cableStart; - // 电缆终点 - private String cableEnd; - // 中间接头 - private String hasJoint; - // 中间接头制作人 - private String jointCreator; - // 安装时间 - private String createTime; - // 照片路径 - private String path; - // 备注1 - private String memo1; - // 备注2 - private String memo2; - // 备注3 - private String memo3; - - @Generated(hash = 732551726) - public SmallLabelBean(Long id, String markerId, String locationNo, - String locationName, String smallMarkerId, String cableName, - String cableNo, String line, String pressLevel, String cableType, - String cableSpec, String cableBrand, String cableStart, String cableEnd, - String hasJoint, String jointCreator, String createTime, String path, - String memo1, String memo2, String memo3) { - this.id = id; - this.markerId = markerId; - this.locationNo = locationNo; - this.locationName = locationName; - this.smallMarkerId = smallMarkerId; - this.cableName = cableName; - this.cableNo = cableNo; - this.line = line; - this.pressLevel = pressLevel; - this.cableType = cableType; - this.cableSpec = cableSpec; - this.cableBrand = cableBrand; - this.cableStart = cableStart; - this.cableEnd = cableEnd; - this.hasJoint = hasJoint; - this.jointCreator = jointCreator; - this.createTime = createTime; - this.path = path; - this.memo1 = memo1; - this.memo2 = memo2; - this.memo3 = memo3; - } - - @Generated(hash = 1271203389) - public SmallLabelBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getLocationNo() { - return this.locationNo; - } - - public void setLocationNo(String locationNo) { - this.locationNo = locationNo; - } - - public String getLocationName() { - return this.locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public String getSmallMarkerId() { - return this.smallMarkerId; - } - - public void setSmallMarkerId(String smallMarkerId) { - this.smallMarkerId = smallMarkerId; - } - - public String getCableName() { - return this.cableName; - } - - public void setCableName(String cableName) { - this.cableName = cableName; - } - - public String getCableNo() { - return this.cableNo; - } - - public void setCableNo(String cableNo) { - this.cableNo = cableNo; - } - - public String getLine() { - return this.line; - } - - public void setLine(String line) { - this.line = line; - } - - public String getPressLevel() { - return this.pressLevel; - } - - public void setPressLevel(String pressLevel) { - this.pressLevel = pressLevel; - } - - public String getCableType() { - return this.cableType; - } - - public void setCableType(String cableType) { - this.cableType = cableType; - } - - public String getCableSpec() { - return this.cableSpec; - } - - public void setCableSpec(String cableSpec) { - this.cableSpec = cableSpec; - } - - public String getCableBrand() { - return this.cableBrand; - } - - public void setCableBrand(String cableBrand) { - this.cableBrand = cableBrand; - } - - public String getCableStart() { - return this.cableStart; - } - - public void setCableStart(String cableStart) { - this.cableStart = cableStart; - } - - public String getCableEnd() { - return this.cableEnd; - } - - public void setCableEnd(String cableEnd) { - this.cableEnd = cableEnd; - } - - public String getHasJoint() { - return this.hasJoint; - } - - public void setHasJoint(String hasJoint) { - this.hasJoint = hasJoint; - } - - public String getJointCreator() { - return this.jointCreator; - } - - public void setJointCreator(String jointCreator) { - this.jointCreator = jointCreator; - } - - public String getCreateTime() { - return this.createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getPath() { - return this.path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMemo1() { - return this.memo1; - } - - public void setMemo1(String memo1) { - this.memo1 = memo1; - } - - public String getMemo2() { - return this.memo2; - } - - public void setMemo2(String memo2) { - this.memo2 = memo2; - } - - public String getMemo3() { - return this.memo3; - } - - public void setMemo3(String memo3) { - this.memo3 = memo3; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java deleted file mode 100644 index f398288..0000000 --- a/app/src/main/java/com/casic/detector/bean/TaskBean.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.casic.detector.bean; - -import com.casic.detector.model.TaskModel; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class TaskBean { - @Id(autoincrement = true) - private Long id;//主键ID - - /** - * { - * "id": 5703, - * "isChecked": 0, - * "isNormal": 1, - * "latitude": 30.56693088, - * "longitude": 104.2848611, - * "markerId": 26, - * "markerIdReal": "0008798066", - * "taskCode": "20240418195448", - * "taskId": "346" - * } - */ - - private String scanner; - private String desc; - - /** - * 真实任务ID - */ - private String taskId; - - /** - * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存 - */ - private String taskCode; - private String markerId; - - /** - * 探测仪扫描出来的ID - */ - private String markerRealId; - private String lng; - private String lat; - private String state; - - @Generated(hash = 1891433912) - public TaskBean(Long id, String scanner, String desc, String taskId, - String taskCode, String markerId, String markerRealId, String lng, - String lat, String state) { - this.id = id; - this.scanner = scanner; - this.desc = desc; - this.taskId = taskId; - this.taskCode = taskCode; - this.markerId = markerId; - this.markerRealId = markerRealId; - this.lng = lng; - this.lat = lat; - this.state = state; - } - - @Generated(hash = 1443476586) - public TaskBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getScanner() { - return this.scanner; - } - - public void setScanner(String scanner) { - this.scanner = scanner; - } - - public String getDesc() { - return this.desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getTaskId() { - return this.taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getTaskCode() { - return this.taskCode; - } - - public void setTaskCode(String taskCode) { - this.taskCode = taskCode; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getMarkerRealId() { - return this.markerRealId; - } - - public void setMarkerRealId(String markerRealId) { - this.markerRealId = markerRealId; - } - - public String getLng() { - return this.lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getLat() { - return this.lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java new file mode 100644 index 0000000..dd93541 --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java @@ -0,0 +1,104 @@ +package com.casic.detector.bean; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息 + */ +@Entity +public class TaskLocalBean { + @Id + private Long id;//任务ID + + private String taskCode;//任务编号 + private String description;//任务名称 + private String createTime;//任务创建的时间 + private String status;//任务状态 + private String createUserName;//任务创建者名称 + private String startTime;//任务被开始执行的时间 + private String endTime;//任务执行结束的时间 + + @Generated(hash = 931317614) + public TaskLocalBean(Long id, String taskCode, String description, + String createTime, String status, String createUserName, + String startTime, String endTime) { + this.id = id; + this.taskCode = taskCode; + this.description = description; + this.createTime = createTime; + this.status = status; + this.createUserName = createUserName; + this.startTime = startTime; + this.endTime = endTime; + } + + @Generated(hash = 949704588) + public TaskLocalBean() { + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTaskCode() { + return this.taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCreateTime() { + return this.createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateUserName() { + return this.createUserName; + } + + public void setCreateUserName(String createUserName) { + this.createUserName = createUserName; + } + + public String getStartTime() { + return this.startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return this.endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } +} diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java new file mode 100644 index 0000000..3e7494d --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java @@ -0,0 +1,128 @@ +package com.casic.detector.bean; + +import com.casic.detector.model.TaskModel; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务里面需要巡检的标识器信息本地库实体类 + */ +@Entity +public class TaskMarkerLocalBean { + @Id + private Long id;//标识器后台库的主键ID,不是标识器实际ID + + /** + * 任务ID,通过此字段关联{@link TaskLocalBean#id} + */ + private String taskId; + + /** + * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode} + *
+ * 双重验证,防止出现同时刻重复的情况 + */ + private String taskCode; + + /** + * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID + */ + private String markerId; + + private double lng; + private double lat; + + /** + * 是否已被探测到 + * 1-是,0-否 + */ + private String isDetected; + + /** + * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime} + */ + private String detectedTime; + + @Generated(hash = 677328533) + public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId, + double lng, double lat, String isDetected, String detectedTime) { + this.id = id; + this.taskId = taskId; + this.taskCode = taskCode; + this.markerId = markerId; + this.lng = lng; + this.lat = lat; + this.isDetected = isDetected; + this.detectedTime = detectedTime; + } + + @Generated(hash = 1162404642) + public TaskMarkerLocalBean() { + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTaskId() { + return this.taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getTaskCode() { + return this.taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getMarkerId() { + return this.markerId; + } + + public void setMarkerId(String markerId) { + this.markerId = markerId; + } + + public double getLng() { + return this.lng; + } + + public void setLng(double lng) { + this.lng = lng; + } + + public double getLat() { + return this.lat; + } + + public void setLat(double lat) { + this.lat = lat; + } + + public String getIsDetected() { + return this.isDetected; + } + + public void setIsDetected(String isDetected) { + this.isDetected = isDetected; + } + + public String getDetectedTime() { + return this.detectedTime; + } + + public void setDetectedTime(String detectedTime) { + this.detectedTime = detectedTime; + } +} 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 6fcf37f..ec4425f 100644 --- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java +++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java @@ -26,8 +26,8 @@ public static void createAllTables(Database db, boolean ifNotExists) { LabelBeanDao.createTable(db, ifNotExists); PipeLocalBeanDao.createTable(db, ifNotExists); - SmallLabelBeanDao.createTable(db, ifNotExists); - TaskBeanDao.createTable(db, ifNotExists); + TaskLocalBeanDao.createTable(db, ifNotExists); + TaskMarkerLocalBeanDao.createTable(db, ifNotExists); } /** @@ -36,8 +36,8 @@ public static void dropAllTables(Database db, boolean ifExists) { LabelBeanDao.dropTable(db, ifExists); PipeLocalBeanDao.dropTable(db, ifExists); - SmallLabelBeanDao.dropTable(db, ifExists); - TaskBeanDao.dropTable(db, ifExists); + TaskLocalBeanDao.dropTable(db, ifExists); + TaskMarkerLocalBeanDao.dropTable(db, ifExists); } /** @@ -58,8 +58,8 @@ super(db, SCHEMA_VERSION); registerDaoClass(LabelBeanDao.class); registerDaoClass(PipeLocalBeanDao.class); - registerDaoClass(SmallLabelBeanDao.class); - registerDaoClass(TaskBeanDao.class); + registerDaoClass(TaskLocalBeanDao.class); + registerDaoClass(TaskMarkerLocalBeanDao.class); } public DaoSession newSession() { diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java deleted file mode 100644 index 0229aca..0000000 --- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.casic.detector.bean; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class SmallLabelBean { - @Id(autoincrement = true) - private Long id;//主键ID - // 标识器ID号 - private String markerId; - // 位置点编号 - private String locationNo; - // 位置点名称 - private String locationName; - // 电子标签ID号 - private String smallMarkerId; - // 电缆名称 - private String cableName; - // 电缆编号 - private String cableNo; - // 所属线路 - private String line; - // 电压等级 - private String pressLevel; - // 电缆型号 - private String cableType; - // 电缆规格 - private String cableSpec; - // 电缆品牌 - private String cableBrand; - // 电缆起点 - private String cableStart; - // 电缆终点 - private String cableEnd; - // 中间接头 - private String hasJoint; - // 中间接头制作人 - private String jointCreator; - // 安装时间 - private String createTime; - // 照片路径 - private String path; - // 备注1 - private String memo1; - // 备注2 - private String memo2; - // 备注3 - private String memo3; - - @Generated(hash = 732551726) - public SmallLabelBean(Long id, String markerId, String locationNo, - String locationName, String smallMarkerId, String cableName, - String cableNo, String line, String pressLevel, String cableType, - String cableSpec, String cableBrand, String cableStart, String cableEnd, - String hasJoint, String jointCreator, String createTime, String path, - String memo1, String memo2, String memo3) { - this.id = id; - this.markerId = markerId; - this.locationNo = locationNo; - this.locationName = locationName; - this.smallMarkerId = smallMarkerId; - this.cableName = cableName; - this.cableNo = cableNo; - this.line = line; - this.pressLevel = pressLevel; - this.cableType = cableType; - this.cableSpec = cableSpec; - this.cableBrand = cableBrand; - this.cableStart = cableStart; - this.cableEnd = cableEnd; - this.hasJoint = hasJoint; - this.jointCreator = jointCreator; - this.createTime = createTime; - this.path = path; - this.memo1 = memo1; - this.memo2 = memo2; - this.memo3 = memo3; - } - - @Generated(hash = 1271203389) - public SmallLabelBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getLocationNo() { - return this.locationNo; - } - - public void setLocationNo(String locationNo) { - this.locationNo = locationNo; - } - - public String getLocationName() { - return this.locationName; - } - - public void setLocationName(String locationName) { - this.locationName = locationName; - } - - public String getSmallMarkerId() { - return this.smallMarkerId; - } - - public void setSmallMarkerId(String smallMarkerId) { - this.smallMarkerId = smallMarkerId; - } - - public String getCableName() { - return this.cableName; - } - - public void setCableName(String cableName) { - this.cableName = cableName; - } - - public String getCableNo() { - return this.cableNo; - } - - public void setCableNo(String cableNo) { - this.cableNo = cableNo; - } - - public String getLine() { - return this.line; - } - - public void setLine(String line) { - this.line = line; - } - - public String getPressLevel() { - return this.pressLevel; - } - - public void setPressLevel(String pressLevel) { - this.pressLevel = pressLevel; - } - - public String getCableType() { - return this.cableType; - } - - public void setCableType(String cableType) { - this.cableType = cableType; - } - - public String getCableSpec() { - return this.cableSpec; - } - - public void setCableSpec(String cableSpec) { - this.cableSpec = cableSpec; - } - - public String getCableBrand() { - return this.cableBrand; - } - - public void setCableBrand(String cableBrand) { - this.cableBrand = cableBrand; - } - - public String getCableStart() { - return this.cableStart; - } - - public void setCableStart(String cableStart) { - this.cableStart = cableStart; - } - - public String getCableEnd() { - return this.cableEnd; - } - - public void setCableEnd(String cableEnd) { - this.cableEnd = cableEnd; - } - - public String getHasJoint() { - return this.hasJoint; - } - - public void setHasJoint(String hasJoint) { - this.hasJoint = hasJoint; - } - - public String getJointCreator() { - return this.jointCreator; - } - - public void setJointCreator(String jointCreator) { - this.jointCreator = jointCreator; - } - - public String getCreateTime() { - return this.createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getPath() { - return this.path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMemo1() { - return this.memo1; - } - - public void setMemo1(String memo1) { - this.memo1 = memo1; - } - - public String getMemo2() { - return this.memo2; - } - - public void setMemo2(String memo2) { - this.memo2 = memo2; - } - - public String getMemo3() { - return this.memo3; - } - - public void setMemo3(String memo3) { - this.memo3 = memo3; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java deleted file mode 100644 index f398288..0000000 --- a/app/src/main/java/com/casic/detector/bean/TaskBean.java +++ /dev/null @@ -1,149 +0,0 @@ -package com.casic.detector.bean; - -import com.casic.detector.model.TaskModel; - -import org.greenrobot.greendao.annotation.Entity; -import org.greenrobot.greendao.annotation.Generated; -import org.greenrobot.greendao.annotation.Id; - -@Entity -public class TaskBean { - @Id(autoincrement = true) - private Long id;//主键ID - - /** - * { - * "id": 5703, - * "isChecked": 0, - * "isNormal": 1, - * "latitude": 30.56693088, - * "longitude": 104.2848611, - * "markerId": 26, - * "markerIdReal": "0008798066", - * "taskCode": "20240418195448", - * "taskId": "346" - * } - */ - - private String scanner; - private String desc; - - /** - * 真实任务ID - */ - private String taskId; - - /** - * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存 - */ - private String taskCode; - private String markerId; - - /** - * 探测仪扫描出来的ID - */ - private String markerRealId; - private String lng; - private String lat; - private String state; - - @Generated(hash = 1891433912) - public TaskBean(Long id, String scanner, String desc, String taskId, - String taskCode, String markerId, String markerRealId, String lng, - String lat, String state) { - this.id = id; - this.scanner = scanner; - this.desc = desc; - this.taskId = taskId; - this.taskCode = taskCode; - this.markerId = markerId; - this.markerRealId = markerRealId; - this.lng = lng; - this.lat = lat; - this.state = state; - } - - @Generated(hash = 1443476586) - public TaskBean() { - } - - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getScanner() { - return this.scanner; - } - - public void setScanner(String scanner) { - this.scanner = scanner; - } - - public String getDesc() { - return this.desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getTaskId() { - return this.taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getTaskCode() { - return this.taskCode; - } - - public void setTaskCode(String taskCode) { - this.taskCode = taskCode; - } - - public String getMarkerId() { - return this.markerId; - } - - public void setMarkerId(String markerId) { - this.markerId = markerId; - } - - public String getMarkerRealId() { - return this.markerRealId; - } - - public void setMarkerRealId(String markerRealId) { - this.markerRealId = markerRealId; - } - - public String getLng() { - return this.lng; - } - - public void setLng(String lng) { - this.lng = lng; - } - - public String getLat() { - return this.lat; - } - - public void setLat(String lat) { - this.lat = lat; - } - - public String getState() { - return this.state; - } - - public void setState(String state) { - this.state = state; - } -} diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java new file mode 100644 index 0000000..dd93541 --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java @@ -0,0 +1,104 @@ +package com.casic.detector.bean; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息 + */ +@Entity +public class TaskLocalBean { + @Id + private Long id;//任务ID + + private String taskCode;//任务编号 + private String description;//任务名称 + private String createTime;//任务创建的时间 + private String status;//任务状态 + private String createUserName;//任务创建者名称 + private String startTime;//任务被开始执行的时间 + private String endTime;//任务执行结束的时间 + + @Generated(hash = 931317614) + public TaskLocalBean(Long id, String taskCode, String description, + String createTime, String status, String createUserName, + String startTime, String endTime) { + this.id = id; + this.taskCode = taskCode; + this.description = description; + this.createTime = createTime; + this.status = status; + this.createUserName = createUserName; + this.startTime = startTime; + this.endTime = endTime; + } + + @Generated(hash = 949704588) + public TaskLocalBean() { + } + + public Long getId() { + return this.id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTaskCode() { + return this.taskCode; + } + + public void setTaskCode(String taskCode) { + this.taskCode = taskCode; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCreateTime() { + return this.createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getStatus() { + return this.status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateUserName() { + return this.createUserName; + } + + public void setCreateUserName(String createUserName) { + this.createUserName = createUserName; + } + + public String getStartTime() { + return this.startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return this.endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } +} diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java new file mode 100644 index 0000000..3e7494d --- /dev/null +++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java @@ -0,0 +1,128 @@ +package com.casic.detector.bean; + +import com.casic.detector.model.TaskModel; + +import org.greenrobot.greendao.annotation.Entity; +import org.greenrobot.greendao.annotation.Generated; +import org.greenrobot.greendao.annotation.Id; + +/** + * 巡检任务里面需要巡检的标识器信息本地库实体类 + */ +@Entity +public class TaskMarkerLocalBean { + @Id + private Long id;//标识器后台库的主键ID,不是标识器实际ID + + /** + * 任务ID,通过此字段关联{@link TaskLocalBean#id} + */ + private String taskId; + + /** + * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode} + *
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
+ * 双重验证,防止出现同时刻重复的情况
+ */
+ private String taskCode;
+
+ /**
+ * 对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#markerIdReal},也就是探测仪扫描出来的ID
+ */
+ private String markerId;
+
+ private double lng;
+ private double lat;
+
+ /**
+ * 是否已被探测到
+ * 1-是,0-否
+ */
+ private String isDetected;
+
+ /**
+ * 被探测到的时间,对应后台字段{@link TaskModel.MessageModel.TaskDetailInfosModel#finishTime}
+ */
+ private String detectedTime;
+
+ @Generated(hash = 677328533)
+ public TaskMarkerLocalBean(Long id, String taskId, String taskCode, String markerId,
+ double lng, double lat, String isDetected, String detectedTime) {
+ this.id = id;
+ this.taskId = taskId;
+ this.taskCode = taskCode;
+ this.markerId = markerId;
+ this.lng = lng;
+ this.lat = lat;
+ this.isDetected = isDetected;
+ this.detectedTime = detectedTime;
+ }
+
+ @Generated(hash = 1162404642)
+ public TaskMarkerLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskId() {
+ return this.taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getMarkerId() {
+ return this.markerId;
+ }
+
+ public void setMarkerId(String markerId) {
+ this.markerId = markerId;
+ }
+
+ public double getLng() {
+ return this.lng;
+ }
+
+ public void setLng(double lng) {
+ this.lng = lng;
+ }
+
+ public double getLat() {
+ return this.lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public String getIsDetected() {
+ return this.isDetected;
+ }
+
+ public void setIsDetected(String isDetected) {
+ this.isDetected = isDetected;
+ }
+
+ public String getDetectedTime() {
+ return this.detectedTime;
+ }
+
+ public void setDetectedTime(String detectedTime) {
+ this.detectedTime = detectedTime;
+ }
+}
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 6fcf37f..ec4425f 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoMaster.java
@@ -26,8 +26,8 @@
public static void createAllTables(Database db, boolean ifNotExists) {
LabelBeanDao.createTable(db, ifNotExists);
PipeLocalBeanDao.createTable(db, ifNotExists);
- SmallLabelBeanDao.createTable(db, ifNotExists);
- TaskBeanDao.createTable(db, ifNotExists);
+ TaskLocalBeanDao.createTable(db, ifNotExists);
+ TaskMarkerLocalBeanDao.createTable(db, ifNotExists);
}
/**
@@ -36,8 +36,8 @@
public static void dropAllTables(Database db, boolean ifExists) {
LabelBeanDao.dropTable(db, ifExists);
PipeLocalBeanDao.dropTable(db, ifExists);
- SmallLabelBeanDao.dropTable(db, ifExists);
- TaskBeanDao.dropTable(db, ifExists);
+ TaskLocalBeanDao.dropTable(db, ifExists);
+ TaskMarkerLocalBeanDao.dropTable(db, ifExists);
}
/**
@@ -58,8 +58,8 @@
super(db, SCHEMA_VERSION);
registerDaoClass(LabelBeanDao.class);
registerDaoClass(PipeLocalBeanDao.class);
- registerDaoClass(SmallLabelBeanDao.class);
- registerDaoClass(TaskBeanDao.class);
+ registerDaoClass(TaskLocalBeanDao.class);
+ registerDaoClass(TaskMarkerLocalBeanDao.class);
}
public DaoSession newSession() {
diff --git a/app/src/main/java/com/casic/detector/greendao/DaoSession.java b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
index ba848ae..4f9bdff 100644
--- a/app/src/main/java/com/casic/detector/greendao/DaoSession.java
+++ b/app/src/main/java/com/casic/detector/greendao/DaoSession.java
@@ -2,8 +2,8 @@
import com.casic.detector.bean.LabelBean;
import com.casic.detector.bean.PipeLocalBean;
-import com.casic.detector.bean.SmallLabelBean;
-import com.casic.detector.bean.TaskBean;
+import com.casic.detector.bean.TaskLocalBean;
+import com.casic.detector.bean.TaskMarkerLocalBean;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
@@ -24,13 +24,13 @@
private final DaoConfig labelBeanDaoConfig;
private final DaoConfig pipeLocalBeanDaoConfig;
- private final DaoConfig smallLabelBeanDaoConfig;
- private final DaoConfig taskBeanDaoConfig;
+ private final DaoConfig taskLocalBeanDaoConfig;
+ private final DaoConfig taskMarkerLocalBeanDaoConfig;
private final LabelBeanDao labelBeanDao;
private final PipeLocalBeanDao pipeLocalBeanDao;
- private final SmallLabelBeanDao smallLabelBeanDao;
- private final TaskBeanDao taskBeanDao;
+ private final TaskLocalBeanDao taskLocalBeanDao;
+ private final TaskMarkerLocalBeanDao taskMarkerLocalBeanDao;
public DaoSession(Database db, IdentityScopeType type, Map
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
deleted file mode 100644
index 0229aca..0000000
--- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.casic.detector.bean;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class SmallLabelBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
- // 标识器ID号
- private String markerId;
- // 位置点编号
- private String locationNo;
- // 位置点名称
- private String locationName;
- // 电子标签ID号
- private String smallMarkerId;
- // 电缆名称
- private String cableName;
- // 电缆编号
- private String cableNo;
- // 所属线路
- private String line;
- // 电压等级
- private String pressLevel;
- // 电缆型号
- private String cableType;
- // 电缆规格
- private String cableSpec;
- // 电缆品牌
- private String cableBrand;
- // 电缆起点
- private String cableStart;
- // 电缆终点
- private String cableEnd;
- // 中间接头
- private String hasJoint;
- // 中间接头制作人
- private String jointCreator;
- // 安装时间
- private String createTime;
- // 照片路径
- private String path;
- // 备注1
- private String memo1;
- // 备注2
- private String memo2;
- // 备注3
- private String memo3;
-
- @Generated(hash = 732551726)
- public SmallLabelBean(Long id, String markerId, String locationNo,
- String locationName, String smallMarkerId, String cableName,
- String cableNo, String line, String pressLevel, String cableType,
- String cableSpec, String cableBrand, String cableStart, String cableEnd,
- String hasJoint, String jointCreator, String createTime, String path,
- String memo1, String memo2, String memo3) {
- this.id = id;
- this.markerId = markerId;
- this.locationNo = locationNo;
- this.locationName = locationName;
- this.smallMarkerId = smallMarkerId;
- this.cableName = cableName;
- this.cableNo = cableNo;
- this.line = line;
- this.pressLevel = pressLevel;
- this.cableType = cableType;
- this.cableSpec = cableSpec;
- this.cableBrand = cableBrand;
- this.cableStart = cableStart;
- this.cableEnd = cableEnd;
- this.hasJoint = hasJoint;
- this.jointCreator = jointCreator;
- this.createTime = createTime;
- this.path = path;
- this.memo1 = memo1;
- this.memo2 = memo2;
- this.memo3 = memo3;
- }
-
- @Generated(hash = 1271203389)
- public SmallLabelBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getLocationNo() {
- return this.locationNo;
- }
-
- public void setLocationNo(String locationNo) {
- this.locationNo = locationNo;
- }
-
- public String getLocationName() {
- return this.locationName;
- }
-
- public void setLocationName(String locationName) {
- this.locationName = locationName;
- }
-
- public String getSmallMarkerId() {
- return this.smallMarkerId;
- }
-
- public void setSmallMarkerId(String smallMarkerId) {
- this.smallMarkerId = smallMarkerId;
- }
-
- public String getCableName() {
- return this.cableName;
- }
-
- public void setCableName(String cableName) {
- this.cableName = cableName;
- }
-
- public String getCableNo() {
- return this.cableNo;
- }
-
- public void setCableNo(String cableNo) {
- this.cableNo = cableNo;
- }
-
- public String getLine() {
- return this.line;
- }
-
- public void setLine(String line) {
- this.line = line;
- }
-
- public String getPressLevel() {
- return this.pressLevel;
- }
-
- public void setPressLevel(String pressLevel) {
- this.pressLevel = pressLevel;
- }
-
- public String getCableType() {
- return this.cableType;
- }
-
- public void setCableType(String cableType) {
- this.cableType = cableType;
- }
-
- public String getCableSpec() {
- return this.cableSpec;
- }
-
- public void setCableSpec(String cableSpec) {
- this.cableSpec = cableSpec;
- }
-
- public String getCableBrand() {
- return this.cableBrand;
- }
-
- public void setCableBrand(String cableBrand) {
- this.cableBrand = cableBrand;
- }
-
- public String getCableStart() {
- return this.cableStart;
- }
-
- public void setCableStart(String cableStart) {
- this.cableStart = cableStart;
- }
-
- public String getCableEnd() {
- return this.cableEnd;
- }
-
- public void setCableEnd(String cableEnd) {
- this.cableEnd = cableEnd;
- }
-
- public String getHasJoint() {
- return this.hasJoint;
- }
-
- public void setHasJoint(String hasJoint) {
- this.hasJoint = hasJoint;
- }
-
- public String getJointCreator() {
- return this.jointCreator;
- }
-
- public void setJointCreator(String jointCreator) {
- this.jointCreator = jointCreator;
- }
-
- public String getCreateTime() {
- return this.createTime;
- }
-
- public void setCreateTime(String createTime) {
- this.createTime = createTime;
- }
-
- public String getPath() {
- return this.path;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public String getMemo1() {
- return this.memo1;
- }
-
- public void setMemo1(String memo1) {
- this.memo1 = memo1;
- }
-
- public String getMemo2() {
- return this.memo2;
- }
-
- public void setMemo2(String memo2) {
- this.memo2 = memo2;
- }
-
- public String getMemo3() {
- return this.memo3;
- }
-
- public void setMemo3(String memo3) {
- this.memo3 = memo3;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java
deleted file mode 100644
index f398288..0000000
--- a/app/src/main/java/com/casic/detector/bean/TaskBean.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.casic.detector.bean;
-
-import com.casic.detector.model.TaskModel;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class TaskBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
-
- /**
- * {
- * "id": 5703,
- * "isChecked": 0,
- * "isNormal": 1,
- * "latitude": 30.56693088,
- * "longitude": 104.2848611,
- * "markerId": 26,
- * "markerIdReal": "0008798066",
- * "taskCode": "20240418195448",
- * "taskId": "346"
- * }
- */
-
- private String scanner;
- private String desc;
-
- /**
- * 真实任务ID
- */
- private String taskId;
-
- /**
- * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存
- */
- private String taskCode;
- private String markerId;
-
- /**
- * 探测仪扫描出来的ID
- */
- private String markerRealId;
- private String lng;
- private String lat;
- private String state;
-
- @Generated(hash = 1891433912)
- public TaskBean(Long id, String scanner, String desc, String taskId,
- String taskCode, String markerId, String markerRealId, String lng,
- String lat, String state) {
- this.id = id;
- this.scanner = scanner;
- this.desc = desc;
- this.taskId = taskId;
- this.taskCode = taskCode;
- this.markerId = markerId;
- this.markerRealId = markerRealId;
- this.lng = lng;
- this.lat = lat;
- this.state = state;
- }
-
- @Generated(hash = 1443476586)
- public TaskBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getScanner() {
- return this.scanner;
- }
-
- public void setScanner(String scanner) {
- this.scanner = scanner;
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public void setDesc(String desc) {
- this.desc = desc;
- }
-
- public String getTaskId() {
- return this.taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
- public String getTaskCode() {
- return this.taskCode;
- }
-
- public void setTaskCode(String taskCode) {
- this.taskCode = taskCode;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getMarkerRealId() {
- return this.markerRealId;
- }
-
- public void setMarkerRealId(String markerRealId) {
- this.markerRealId = markerRealId;
- }
-
- public String getLng() {
- return this.lng;
- }
-
- public void setLng(String lng) {
- this.lng = lng;
- }
-
- public String getLat() {
- return this.lat;
- }
-
- public void setLat(String lat) {
- this.lat = lat;
- }
-
- public String getState() {
- return this.state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
new file mode 100644
index 0000000..dd93541
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
@@ -0,0 +1,104 @@
+package com.casic.detector.bean;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息
+ */
+@Entity
+public class TaskLocalBean {
+ @Id
+ private Long id;//任务ID
+
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+
+ @Generated(hash = 931317614)
+ public TaskLocalBean(Long id, String taskCode, String description,
+ String createTime, String status, String createUserName,
+ String startTime, String endTime) {
+ this.id = id;
+ this.taskCode = taskCode;
+ this.description = description;
+ this.createTime = createTime;
+ this.status = status;
+ this.createUserName = createUserName;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ }
+
+ @Generated(hash = 949704588)
+ public TaskLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getCreateTime() {
+ return this.createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getCreateUserName() {
+ return this.createUserName;
+ }
+
+ public void setCreateUserName(String createUserName) {
+ this.createUserName = createUserName;
+ }
+
+ public String getStartTime() {
+ return this.startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return this.endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
new file mode 100644
index 0000000..3e7494d
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
@@ -0,0 +1,128 @@
+package com.casic.detector.bean;
+
+import com.casic.detector.model.TaskModel;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务里面需要巡检的标识器信息本地库实体类
+ */
+@Entity
+public class TaskMarkerLocalBean {
+ @Id
+ private Long id;//标识器后台库的主键ID,不是标识器实际ID
+
+ /**
+ * 任务ID,通过此字段关联{@link TaskLocalBean#id}
+ */
+ private String taskId;
+
+ /**
+ * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode}
+ *
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
deleted file mode 100644
index 0229aca..0000000
--- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.casic.detector.bean;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class SmallLabelBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
- // 标识器ID号
- private String markerId;
- // 位置点编号
- private String locationNo;
- // 位置点名称
- private String locationName;
- // 电子标签ID号
- private String smallMarkerId;
- // 电缆名称
- private String cableName;
- // 电缆编号
- private String cableNo;
- // 所属线路
- private String line;
- // 电压等级
- private String pressLevel;
- // 电缆型号
- private String cableType;
- // 电缆规格
- private String cableSpec;
- // 电缆品牌
- private String cableBrand;
- // 电缆起点
- private String cableStart;
- // 电缆终点
- private String cableEnd;
- // 中间接头
- private String hasJoint;
- // 中间接头制作人
- private String jointCreator;
- // 安装时间
- private String createTime;
- // 照片路径
- private String path;
- // 备注1
- private String memo1;
- // 备注2
- private String memo2;
- // 备注3
- private String memo3;
-
- @Generated(hash = 732551726)
- public SmallLabelBean(Long id, String markerId, String locationNo,
- String locationName, String smallMarkerId, String cableName,
- String cableNo, String line, String pressLevel, String cableType,
- String cableSpec, String cableBrand, String cableStart, String cableEnd,
- String hasJoint, String jointCreator, String createTime, String path,
- String memo1, String memo2, String memo3) {
- this.id = id;
- this.markerId = markerId;
- this.locationNo = locationNo;
- this.locationName = locationName;
- this.smallMarkerId = smallMarkerId;
- this.cableName = cableName;
- this.cableNo = cableNo;
- this.line = line;
- this.pressLevel = pressLevel;
- this.cableType = cableType;
- this.cableSpec = cableSpec;
- this.cableBrand = cableBrand;
- this.cableStart = cableStart;
- this.cableEnd = cableEnd;
- this.hasJoint = hasJoint;
- this.jointCreator = jointCreator;
- this.createTime = createTime;
- this.path = path;
- this.memo1 = memo1;
- this.memo2 = memo2;
- this.memo3 = memo3;
- }
-
- @Generated(hash = 1271203389)
- public SmallLabelBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getLocationNo() {
- return this.locationNo;
- }
-
- public void setLocationNo(String locationNo) {
- this.locationNo = locationNo;
- }
-
- public String getLocationName() {
- return this.locationName;
- }
-
- public void setLocationName(String locationName) {
- this.locationName = locationName;
- }
-
- public String getSmallMarkerId() {
- return this.smallMarkerId;
- }
-
- public void setSmallMarkerId(String smallMarkerId) {
- this.smallMarkerId = smallMarkerId;
- }
-
- public String getCableName() {
- return this.cableName;
- }
-
- public void setCableName(String cableName) {
- this.cableName = cableName;
- }
-
- public String getCableNo() {
- return this.cableNo;
- }
-
- public void setCableNo(String cableNo) {
- this.cableNo = cableNo;
- }
-
- public String getLine() {
- return this.line;
- }
-
- public void setLine(String line) {
- this.line = line;
- }
-
- public String getPressLevel() {
- return this.pressLevel;
- }
-
- public void setPressLevel(String pressLevel) {
- this.pressLevel = pressLevel;
- }
-
- public String getCableType() {
- return this.cableType;
- }
-
- public void setCableType(String cableType) {
- this.cableType = cableType;
- }
-
- public String getCableSpec() {
- return this.cableSpec;
- }
-
- public void setCableSpec(String cableSpec) {
- this.cableSpec = cableSpec;
- }
-
- public String getCableBrand() {
- return this.cableBrand;
- }
-
- public void setCableBrand(String cableBrand) {
- this.cableBrand = cableBrand;
- }
-
- public String getCableStart() {
- return this.cableStart;
- }
-
- public void setCableStart(String cableStart) {
- this.cableStart = cableStart;
- }
-
- public String getCableEnd() {
- return this.cableEnd;
- }
-
- public void setCableEnd(String cableEnd) {
- this.cableEnd = cableEnd;
- }
-
- public String getHasJoint() {
- return this.hasJoint;
- }
-
- public void setHasJoint(String hasJoint) {
- this.hasJoint = hasJoint;
- }
-
- public String getJointCreator() {
- return this.jointCreator;
- }
-
- public void setJointCreator(String jointCreator) {
- this.jointCreator = jointCreator;
- }
-
- public String getCreateTime() {
- return this.createTime;
- }
-
- public void setCreateTime(String createTime) {
- this.createTime = createTime;
- }
-
- public String getPath() {
- return this.path;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public String getMemo1() {
- return this.memo1;
- }
-
- public void setMemo1(String memo1) {
- this.memo1 = memo1;
- }
-
- public String getMemo2() {
- return this.memo2;
- }
-
- public void setMemo2(String memo2) {
- this.memo2 = memo2;
- }
-
- public String getMemo3() {
- return this.memo3;
- }
-
- public void setMemo3(String memo3) {
- this.memo3 = memo3;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java
deleted file mode 100644
index f398288..0000000
--- a/app/src/main/java/com/casic/detector/bean/TaskBean.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.casic.detector.bean;
-
-import com.casic.detector.model.TaskModel;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class TaskBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
-
- /**
- * {
- * "id": 5703,
- * "isChecked": 0,
- * "isNormal": 1,
- * "latitude": 30.56693088,
- * "longitude": 104.2848611,
- * "markerId": 26,
- * "markerIdReal": "0008798066",
- * "taskCode": "20240418195448",
- * "taskId": "346"
- * }
- */
-
- private String scanner;
- private String desc;
-
- /**
- * 真实任务ID
- */
- private String taskId;
-
- /**
- * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存
- */
- private String taskCode;
- private String markerId;
-
- /**
- * 探测仪扫描出来的ID
- */
- private String markerRealId;
- private String lng;
- private String lat;
- private String state;
-
- @Generated(hash = 1891433912)
- public TaskBean(Long id, String scanner, String desc, String taskId,
- String taskCode, String markerId, String markerRealId, String lng,
- String lat, String state) {
- this.id = id;
- this.scanner = scanner;
- this.desc = desc;
- this.taskId = taskId;
- this.taskCode = taskCode;
- this.markerId = markerId;
- this.markerRealId = markerRealId;
- this.lng = lng;
- this.lat = lat;
- this.state = state;
- }
-
- @Generated(hash = 1443476586)
- public TaskBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getScanner() {
- return this.scanner;
- }
-
- public void setScanner(String scanner) {
- this.scanner = scanner;
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public void setDesc(String desc) {
- this.desc = desc;
- }
-
- public String getTaskId() {
- return this.taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
- public String getTaskCode() {
- return this.taskCode;
- }
-
- public void setTaskCode(String taskCode) {
- this.taskCode = taskCode;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getMarkerRealId() {
- return this.markerRealId;
- }
-
- public void setMarkerRealId(String markerRealId) {
- this.markerRealId = markerRealId;
- }
-
- public String getLng() {
- return this.lng;
- }
-
- public void setLng(String lng) {
- this.lng = lng;
- }
-
- public String getLat() {
- return this.lat;
- }
-
- public void setLat(String lat) {
- this.lat = lat;
- }
-
- public String getState() {
- return this.state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
new file mode 100644
index 0000000..dd93541
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
@@ -0,0 +1,104 @@
+package com.casic.detector.bean;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息
+ */
+@Entity
+public class TaskLocalBean {
+ @Id
+ private Long id;//任务ID
+
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+
+ @Generated(hash = 931317614)
+ public TaskLocalBean(Long id, String taskCode, String description,
+ String createTime, String status, String createUserName,
+ String startTime, String endTime) {
+ this.id = id;
+ this.taskCode = taskCode;
+ this.description = description;
+ this.createTime = createTime;
+ this.status = status;
+ this.createUserName = createUserName;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ }
+
+ @Generated(hash = 949704588)
+ public TaskLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getCreateTime() {
+ return this.createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getCreateUserName() {
+ return this.createUserName;
+ }
+
+ public void setCreateUserName(String createUserName) {
+ this.createUserName = createUserName;
+ }
+
+ public String getStartTime() {
+ return this.startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return this.endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
new file mode 100644
index 0000000..3e7494d
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
@@ -0,0 +1,128 @@
+package com.casic.detector.bean;
+
+import com.casic.detector.model.TaskModel;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务里面需要巡检的标识器信息本地库实体类
+ */
+@Entity
+public class TaskMarkerLocalBean {
+ @Id
+ private Long id;//标识器后台库的主键ID,不是标识器实际ID
+
+ /**
+ * 任务ID,通过此字段关联{@link TaskLocalBean#id}
+ */
+ private String taskId;
+
+ /**
+ * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode}
+ *
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
deleted file mode 100644
index 0229aca..0000000
--- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.casic.detector.bean;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class SmallLabelBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
- // 标识器ID号
- private String markerId;
- // 位置点编号
- private String locationNo;
- // 位置点名称
- private String locationName;
- // 电子标签ID号
- private String smallMarkerId;
- // 电缆名称
- private String cableName;
- // 电缆编号
- private String cableNo;
- // 所属线路
- private String line;
- // 电压等级
- private String pressLevel;
- // 电缆型号
- private String cableType;
- // 电缆规格
- private String cableSpec;
- // 电缆品牌
- private String cableBrand;
- // 电缆起点
- private String cableStart;
- // 电缆终点
- private String cableEnd;
- // 中间接头
- private String hasJoint;
- // 中间接头制作人
- private String jointCreator;
- // 安装时间
- private String createTime;
- // 照片路径
- private String path;
- // 备注1
- private String memo1;
- // 备注2
- private String memo2;
- // 备注3
- private String memo3;
-
- @Generated(hash = 732551726)
- public SmallLabelBean(Long id, String markerId, String locationNo,
- String locationName, String smallMarkerId, String cableName,
- String cableNo, String line, String pressLevel, String cableType,
- String cableSpec, String cableBrand, String cableStart, String cableEnd,
- String hasJoint, String jointCreator, String createTime, String path,
- String memo1, String memo2, String memo3) {
- this.id = id;
- this.markerId = markerId;
- this.locationNo = locationNo;
- this.locationName = locationName;
- this.smallMarkerId = smallMarkerId;
- this.cableName = cableName;
- this.cableNo = cableNo;
- this.line = line;
- this.pressLevel = pressLevel;
- this.cableType = cableType;
- this.cableSpec = cableSpec;
- this.cableBrand = cableBrand;
- this.cableStart = cableStart;
- this.cableEnd = cableEnd;
- this.hasJoint = hasJoint;
- this.jointCreator = jointCreator;
- this.createTime = createTime;
- this.path = path;
- this.memo1 = memo1;
- this.memo2 = memo2;
- this.memo3 = memo3;
- }
-
- @Generated(hash = 1271203389)
- public SmallLabelBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getLocationNo() {
- return this.locationNo;
- }
-
- public void setLocationNo(String locationNo) {
- this.locationNo = locationNo;
- }
-
- public String getLocationName() {
- return this.locationName;
- }
-
- public void setLocationName(String locationName) {
- this.locationName = locationName;
- }
-
- public String getSmallMarkerId() {
- return this.smallMarkerId;
- }
-
- public void setSmallMarkerId(String smallMarkerId) {
- this.smallMarkerId = smallMarkerId;
- }
-
- public String getCableName() {
- return this.cableName;
- }
-
- public void setCableName(String cableName) {
- this.cableName = cableName;
- }
-
- public String getCableNo() {
- return this.cableNo;
- }
-
- public void setCableNo(String cableNo) {
- this.cableNo = cableNo;
- }
-
- public String getLine() {
- return this.line;
- }
-
- public void setLine(String line) {
- this.line = line;
- }
-
- public String getPressLevel() {
- return this.pressLevel;
- }
-
- public void setPressLevel(String pressLevel) {
- this.pressLevel = pressLevel;
- }
-
- public String getCableType() {
- return this.cableType;
- }
-
- public void setCableType(String cableType) {
- this.cableType = cableType;
- }
-
- public String getCableSpec() {
- return this.cableSpec;
- }
-
- public void setCableSpec(String cableSpec) {
- this.cableSpec = cableSpec;
- }
-
- public String getCableBrand() {
- return this.cableBrand;
- }
-
- public void setCableBrand(String cableBrand) {
- this.cableBrand = cableBrand;
- }
-
- public String getCableStart() {
- return this.cableStart;
- }
-
- public void setCableStart(String cableStart) {
- this.cableStart = cableStart;
- }
-
- public String getCableEnd() {
- return this.cableEnd;
- }
-
- public void setCableEnd(String cableEnd) {
- this.cableEnd = cableEnd;
- }
-
- public String getHasJoint() {
- return this.hasJoint;
- }
-
- public void setHasJoint(String hasJoint) {
- this.hasJoint = hasJoint;
- }
-
- public String getJointCreator() {
- return this.jointCreator;
- }
-
- public void setJointCreator(String jointCreator) {
- this.jointCreator = jointCreator;
- }
-
- public String getCreateTime() {
- return this.createTime;
- }
-
- public void setCreateTime(String createTime) {
- this.createTime = createTime;
- }
-
- public String getPath() {
- return this.path;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public String getMemo1() {
- return this.memo1;
- }
-
- public void setMemo1(String memo1) {
- this.memo1 = memo1;
- }
-
- public String getMemo2() {
- return this.memo2;
- }
-
- public void setMemo2(String memo2) {
- this.memo2 = memo2;
- }
-
- public String getMemo3() {
- return this.memo3;
- }
-
- public void setMemo3(String memo3) {
- this.memo3 = memo3;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java
deleted file mode 100644
index f398288..0000000
--- a/app/src/main/java/com/casic/detector/bean/TaskBean.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.casic.detector.bean;
-
-import com.casic.detector.model.TaskModel;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class TaskBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
-
- /**
- * {
- * "id": 5703,
- * "isChecked": 0,
- * "isNormal": 1,
- * "latitude": 30.56693088,
- * "longitude": 104.2848611,
- * "markerId": 26,
- * "markerIdReal": "0008798066",
- * "taskCode": "20240418195448",
- * "taskId": "346"
- * }
- */
-
- private String scanner;
- private String desc;
-
- /**
- * 真实任务ID
- */
- private String taskId;
-
- /**
- * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存
- */
- private String taskCode;
- private String markerId;
-
- /**
- * 探测仪扫描出来的ID
- */
- private String markerRealId;
- private String lng;
- private String lat;
- private String state;
-
- @Generated(hash = 1891433912)
- public TaskBean(Long id, String scanner, String desc, String taskId,
- String taskCode, String markerId, String markerRealId, String lng,
- String lat, String state) {
- this.id = id;
- this.scanner = scanner;
- this.desc = desc;
- this.taskId = taskId;
- this.taskCode = taskCode;
- this.markerId = markerId;
- this.markerRealId = markerRealId;
- this.lng = lng;
- this.lat = lat;
- this.state = state;
- }
-
- @Generated(hash = 1443476586)
- public TaskBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getScanner() {
- return this.scanner;
- }
-
- public void setScanner(String scanner) {
- this.scanner = scanner;
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public void setDesc(String desc) {
- this.desc = desc;
- }
-
- public String getTaskId() {
- return this.taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
- public String getTaskCode() {
- return this.taskCode;
- }
-
- public void setTaskCode(String taskCode) {
- this.taskCode = taskCode;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getMarkerRealId() {
- return this.markerRealId;
- }
-
- public void setMarkerRealId(String markerRealId) {
- this.markerRealId = markerRealId;
- }
-
- public String getLng() {
- return this.lng;
- }
-
- public void setLng(String lng) {
- this.lng = lng;
- }
-
- public String getLat() {
- return this.lat;
- }
-
- public void setLat(String lat) {
- this.lat = lat;
- }
-
- public String getState() {
- return this.state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
new file mode 100644
index 0000000..dd93541
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
@@ -0,0 +1,104 @@
+package com.casic.detector.bean;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息
+ */
+@Entity
+public class TaskLocalBean {
+ @Id
+ private Long id;//任务ID
+
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+
+ @Generated(hash = 931317614)
+ public TaskLocalBean(Long id, String taskCode, String description,
+ String createTime, String status, String createUserName,
+ String startTime, String endTime) {
+ this.id = id;
+ this.taskCode = taskCode;
+ this.description = description;
+ this.createTime = createTime;
+ this.status = status;
+ this.createUserName = createUserName;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ }
+
+ @Generated(hash = 949704588)
+ public TaskLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getCreateTime() {
+ return this.createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getCreateUserName() {
+ return this.createUserName;
+ }
+
+ public void setCreateUserName(String createUserName) {
+ this.createUserName = createUserName;
+ }
+
+ public String getStartTime() {
+ return this.startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return this.endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
new file mode 100644
index 0000000..3e7494d
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
@@ -0,0 +1,128 @@
+package com.casic.detector.bean;
+
+import com.casic.detector.model.TaskModel;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务里面需要巡检的标识器信息本地库实体类
+ */
+@Entity
+public class TaskMarkerLocalBean {
+ @Id
+ private Long id;//标识器后台库的主键ID,不是标识器实际ID
+
+ /**
+ * 任务ID,通过此字段关联{@link TaskLocalBean#id}
+ */
+ private String taskId;
+
+ /**
+ * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode}
+ *
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java b/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
deleted file mode 100644
index 0229aca..0000000
--- a/app/src/main/java/com/casic/detector/bean/SmallLabelBean.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.casic.detector.bean;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class SmallLabelBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
- // 标识器ID号
- private String markerId;
- // 位置点编号
- private String locationNo;
- // 位置点名称
- private String locationName;
- // 电子标签ID号
- private String smallMarkerId;
- // 电缆名称
- private String cableName;
- // 电缆编号
- private String cableNo;
- // 所属线路
- private String line;
- // 电压等级
- private String pressLevel;
- // 电缆型号
- private String cableType;
- // 电缆规格
- private String cableSpec;
- // 电缆品牌
- private String cableBrand;
- // 电缆起点
- private String cableStart;
- // 电缆终点
- private String cableEnd;
- // 中间接头
- private String hasJoint;
- // 中间接头制作人
- private String jointCreator;
- // 安装时间
- private String createTime;
- // 照片路径
- private String path;
- // 备注1
- private String memo1;
- // 备注2
- private String memo2;
- // 备注3
- private String memo3;
-
- @Generated(hash = 732551726)
- public SmallLabelBean(Long id, String markerId, String locationNo,
- String locationName, String smallMarkerId, String cableName,
- String cableNo, String line, String pressLevel, String cableType,
- String cableSpec, String cableBrand, String cableStart, String cableEnd,
- String hasJoint, String jointCreator, String createTime, String path,
- String memo1, String memo2, String memo3) {
- this.id = id;
- this.markerId = markerId;
- this.locationNo = locationNo;
- this.locationName = locationName;
- this.smallMarkerId = smallMarkerId;
- this.cableName = cableName;
- this.cableNo = cableNo;
- this.line = line;
- this.pressLevel = pressLevel;
- this.cableType = cableType;
- this.cableSpec = cableSpec;
- this.cableBrand = cableBrand;
- this.cableStart = cableStart;
- this.cableEnd = cableEnd;
- this.hasJoint = hasJoint;
- this.jointCreator = jointCreator;
- this.createTime = createTime;
- this.path = path;
- this.memo1 = memo1;
- this.memo2 = memo2;
- this.memo3 = memo3;
- }
-
- @Generated(hash = 1271203389)
- public SmallLabelBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getLocationNo() {
- return this.locationNo;
- }
-
- public void setLocationNo(String locationNo) {
- this.locationNo = locationNo;
- }
-
- public String getLocationName() {
- return this.locationName;
- }
-
- public void setLocationName(String locationName) {
- this.locationName = locationName;
- }
-
- public String getSmallMarkerId() {
- return this.smallMarkerId;
- }
-
- public void setSmallMarkerId(String smallMarkerId) {
- this.smallMarkerId = smallMarkerId;
- }
-
- public String getCableName() {
- return this.cableName;
- }
-
- public void setCableName(String cableName) {
- this.cableName = cableName;
- }
-
- public String getCableNo() {
- return this.cableNo;
- }
-
- public void setCableNo(String cableNo) {
- this.cableNo = cableNo;
- }
-
- public String getLine() {
- return this.line;
- }
-
- public void setLine(String line) {
- this.line = line;
- }
-
- public String getPressLevel() {
- return this.pressLevel;
- }
-
- public void setPressLevel(String pressLevel) {
- this.pressLevel = pressLevel;
- }
-
- public String getCableType() {
- return this.cableType;
- }
-
- public void setCableType(String cableType) {
- this.cableType = cableType;
- }
-
- public String getCableSpec() {
- return this.cableSpec;
- }
-
- public void setCableSpec(String cableSpec) {
- this.cableSpec = cableSpec;
- }
-
- public String getCableBrand() {
- return this.cableBrand;
- }
-
- public void setCableBrand(String cableBrand) {
- this.cableBrand = cableBrand;
- }
-
- public String getCableStart() {
- return this.cableStart;
- }
-
- public void setCableStart(String cableStart) {
- this.cableStart = cableStart;
- }
-
- public String getCableEnd() {
- return this.cableEnd;
- }
-
- public void setCableEnd(String cableEnd) {
- this.cableEnd = cableEnd;
- }
-
- public String getHasJoint() {
- return this.hasJoint;
- }
-
- public void setHasJoint(String hasJoint) {
- this.hasJoint = hasJoint;
- }
-
- public String getJointCreator() {
- return this.jointCreator;
- }
-
- public void setJointCreator(String jointCreator) {
- this.jointCreator = jointCreator;
- }
-
- public String getCreateTime() {
- return this.createTime;
- }
-
- public void setCreateTime(String createTime) {
- this.createTime = createTime;
- }
-
- public String getPath() {
- return this.path;
- }
-
- public void setPath(String path) {
- this.path = path;
- }
-
- public String getMemo1() {
- return this.memo1;
- }
-
- public void setMemo1(String memo1) {
- this.memo1 = memo1;
- }
-
- public String getMemo2() {
- return this.memo2;
- }
-
- public void setMemo2(String memo2) {
- this.memo2 = memo2;
- }
-
- public String getMemo3() {
- return this.memo3;
- }
-
- public void setMemo3(String memo3) {
- this.memo3 = memo3;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskBean.java b/app/src/main/java/com/casic/detector/bean/TaskBean.java
deleted file mode 100644
index f398288..0000000
--- a/app/src/main/java/com/casic/detector/bean/TaskBean.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.casic.detector.bean;
-
-import com.casic.detector.model.TaskModel;
-
-import org.greenrobot.greendao.annotation.Entity;
-import org.greenrobot.greendao.annotation.Generated;
-import org.greenrobot.greendao.annotation.Id;
-
-@Entity
-public class TaskBean {
- @Id(autoincrement = true)
- private Long id;//主键ID
-
- /**
- * {
- * "id": 5703,
- * "isChecked": 0,
- * "isNormal": 1,
- * "latitude": 30.56693088,
- * "longitude": 104.2848611,
- * "markerId": 26,
- * "markerIdReal": "0008798066",
- * "taskCode": "20240418195448",
- * "taskId": "346"
- * }
- */
-
- private String scanner;
- private String desc;
-
- /**
- * 真实任务ID
- */
- private String taskId;
-
- /**
- * 用 {@link TaskModel.MessageModel.TaskDetailInfosModel#id} 存
- */
- private String taskCode;
- private String markerId;
-
- /**
- * 探测仪扫描出来的ID
- */
- private String markerRealId;
- private String lng;
- private String lat;
- private String state;
-
- @Generated(hash = 1891433912)
- public TaskBean(Long id, String scanner, String desc, String taskId,
- String taskCode, String markerId, String markerRealId, String lng,
- String lat, String state) {
- this.id = id;
- this.scanner = scanner;
- this.desc = desc;
- this.taskId = taskId;
- this.taskCode = taskCode;
- this.markerId = markerId;
- this.markerRealId = markerRealId;
- this.lng = lng;
- this.lat = lat;
- this.state = state;
- }
-
- @Generated(hash = 1443476586)
- public TaskBean() {
- }
-
- public Long getId() {
- return this.id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getScanner() {
- return this.scanner;
- }
-
- public void setScanner(String scanner) {
- this.scanner = scanner;
- }
-
- public String getDesc() {
- return this.desc;
- }
-
- public void setDesc(String desc) {
- this.desc = desc;
- }
-
- public String getTaskId() {
- return this.taskId;
- }
-
- public void setTaskId(String taskId) {
- this.taskId = taskId;
- }
-
- public String getTaskCode() {
- return this.taskCode;
- }
-
- public void setTaskCode(String taskCode) {
- this.taskCode = taskCode;
- }
-
- public String getMarkerId() {
- return this.markerId;
- }
-
- public void setMarkerId(String markerId) {
- this.markerId = markerId;
- }
-
- public String getMarkerRealId() {
- return this.markerRealId;
- }
-
- public void setMarkerRealId(String markerRealId) {
- this.markerRealId = markerRealId;
- }
-
- public String getLng() {
- return this.lng;
- }
-
- public void setLng(String lng) {
- this.lng = lng;
- }
-
- public String getLat() {
- return this.lat;
- }
-
- public void setLat(String lat) {
- this.lat = lat;
- }
-
- public String getState() {
- return this.state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
new file mode 100644
index 0000000..dd93541
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskLocalBean.java
@@ -0,0 +1,104 @@
+package com.casic.detector.bean;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务本地库实体类,不包含任务里面需要巡检的标识器信息
+ */
+@Entity
+public class TaskLocalBean {
+ @Id
+ private Long id;//任务ID
+
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+
+ @Generated(hash = 931317614)
+ public TaskLocalBean(Long id, String taskCode, String description,
+ String createTime, String status, String createUserName,
+ String startTime, String endTime) {
+ this.id = id;
+ this.taskCode = taskCode;
+ this.description = description;
+ this.createTime = createTime;
+ this.status = status;
+ this.createUserName = createUserName;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ }
+
+ @Generated(hash = 949704588)
+ public TaskLocalBean() {
+ }
+
+ public Long getId() {
+ return this.id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getTaskCode() {
+ return this.taskCode;
+ }
+
+ public void setTaskCode(String taskCode) {
+ this.taskCode = taskCode;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getCreateTime() {
+ return this.createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getCreateUserName() {
+ return this.createUserName;
+ }
+
+ public void setCreateUserName(String createUserName) {
+ this.createUserName = createUserName;
+ }
+
+ public String getStartTime() {
+ return this.startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return this.endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+}
diff --git a/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
new file mode 100644
index 0000000..3e7494d
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/bean/TaskMarkerLocalBean.java
@@ -0,0 +1,128 @@
+package com.casic.detector.bean;
+
+import com.casic.detector.model.TaskModel;
+
+import org.greenrobot.greendao.annotation.Entity;
+import org.greenrobot.greendao.annotation.Generated;
+import org.greenrobot.greendao.annotation.Id;
+
+/**
+ * 巡检任务里面需要巡检的标识器信息本地库实体类
+ */
+@Entity
+public class TaskMarkerLocalBean {
+ @Id
+ private Long id;//标识器后台库的主键ID,不是标识器实际ID
+
+ /**
+ * 任务ID,通过此字段关联{@link TaskLocalBean#id}
+ */
+ private String taskId;
+
+ /**
+ * 任务Code,通过此字段关联{@link TaskLocalBean#taskCode}
+ *
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property MarkerId = new Property(1, String.class, "markerId", false, "MARKER_ID");
- public final static Property LocationNo = new Property(2, String.class, "locationNo", false, "LOCATION_NO");
- public final static Property LocationName = new Property(3, String.class, "locationName", false, "LOCATION_NAME");
- public final static Property SmallMarkerId = new Property(4, String.class, "smallMarkerId", false, "SMALL_MARKER_ID");
- public final static Property CableName = new Property(5, String.class, "cableName", false, "CABLE_NAME");
- public final static Property CableNo = new Property(6, String.class, "cableNo", false, "CABLE_NO");
- public final static Property Line = new Property(7, String.class, "line", false, "LINE");
- public final static Property PressLevel = new Property(8, String.class, "pressLevel", false, "PRESS_LEVEL");
- public final static Property CableType = new Property(9, String.class, "cableType", false, "CABLE_TYPE");
- public final static Property CableSpec = new Property(10, String.class, "cableSpec", false, "CABLE_SPEC");
- public final static Property CableBrand = new Property(11, String.class, "cableBrand", false, "CABLE_BRAND");
- public final static Property CableStart = new Property(12, String.class, "cableStart", false, "CABLE_START");
- public final static Property CableEnd = new Property(13, String.class, "cableEnd", false, "CABLE_END");
- public final static Property HasJoint = new Property(14, String.class, "hasJoint", false, "HAS_JOINT");
- public final static Property JointCreator = new Property(15, String.class, "jointCreator", false, "JOINT_CREATOR");
- public final static Property CreateTime = new Property(16, String.class, "createTime", false, "CREATE_TIME");
- public final static Property Path = new Property(17, String.class, "path", false, "PATH");
- public final static Property Memo1 = new Property(18, String.class, "memo1", false, "MEMO1");
- public final static Property Memo2 = new Property(19, String.class, "memo2", false, "MEMO2");
- public final static Property Memo3 = new Property(20, String.class, "memo3", false, "MEMO3");
- }
-
-
- public SmallLabelBeanDao(DaoConfig config) {
- super(config);
- }
-
- public SmallLabelBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- 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
- "\"LOCATION_NO\" TEXT," + // 2: locationNo
- "\"LOCATION_NAME\" TEXT," + // 3: locationName
- "\"SMALL_MARKER_ID\" TEXT," + // 4: smallMarkerId
- "\"CABLE_NAME\" TEXT," + // 5: cableName
- "\"CABLE_NO\" TEXT," + // 6: cableNo
- "\"LINE\" TEXT," + // 7: line
- "\"PRESS_LEVEL\" TEXT," + // 8: pressLevel
- "\"CABLE_TYPE\" TEXT," + // 9: cableType
- "\"CABLE_SPEC\" TEXT," + // 10: cableSpec
- "\"CABLE_BRAND\" TEXT," + // 11: cableBrand
- "\"CABLE_START\" TEXT," + // 12: cableStart
- "\"CABLE_END\" TEXT," + // 13: cableEnd
- "\"HAS_JOINT\" TEXT," + // 14: hasJoint
- "\"JOINT_CREATOR\" TEXT," + // 15: jointCreator
- "\"CREATE_TIME\" TEXT," + // 16: createTime
- "\"PATH\" TEXT," + // 17: path
- "\"MEMO1\" TEXT," + // 18: memo1
- "\"MEMO2\" TEXT," + // 19: memo2
- "\"MEMO3\" TEXT);"); // 20: memo3
- }
-
- /**
- * 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);
- }
-
- @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);
- }
- }
-
- @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);
- }
-
- String memo3 = entity.getMemo3();
- if (memo3 != null) {
- stmt.bindString(21, memo3);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public SmallLabelBean readEntity(Cursor cursor, int offset) {
- SmallLabelBean entity = new SmallLabelBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // markerId
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // locationNo
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // locationName
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // smallMarkerId
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // cableName
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // cableNo
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // line
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // pressLevel
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // cableType
- cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // cableSpec
- cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // cableBrand
- cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // cableStart
- cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // cableEnd
- cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // hasJoint
- cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // jointCreator
- cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // createTime
- cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // path
- cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // memo1
- cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19), // memo2
- cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20) // memo3
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, SmallLabelBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setMarkerId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setLocationNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setLocationName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setSmallMarkerId(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setCableName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setCableNo(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLine(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setPressLevel(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setCableType(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- entity.setCableSpec(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
- entity.setCableBrand(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
- entity.setCableStart(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
- entity.setCableEnd(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
- entity.setHasJoint(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
- entity.setJointCreator(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
- entity.setCreateTime(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
- entity.setPath(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
- entity.setMemo1(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
- entity.setMemo2(cursor.isNull(offset + 19) ? null : cursor.getString(offset + 19));
- entity.setMemo3(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(SmallLabelBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(SmallLabelBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(SmallLabelBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- 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
deleted file mode 100644
index 59eee37..0000000
--- a/app/src/main/java/com/casic/detector/greendao/TaskBeanDao.java
+++ /dev/null
@@ -1,246 +0,0 @@
-package com.casic.detector.greendao;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteStatement;
-
-import com.casic.detector.bean.TaskBean;
-
-import org.greenrobot.greendao.AbstractDao;
-import org.greenrobot.greendao.Property;
-import org.greenrobot.greendao.database.Database;
-import org.greenrobot.greendao.database.DatabaseStatement;
-import org.greenrobot.greendao.internal.DaoConfig;
-
-// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
-
-/**
- * DAO for table "TASK_BEAN".
- */
-public class TaskBeanDao extends AbstractDao
- * Can be used for QueryBuilder and for referencing column names.
- */
- public static class Properties {
- public final static Property Id = new Property(0, Long.class, "id", true, "_id");
- public final static Property Scanner = new Property(1, String.class, "scanner", false, "SCANNER");
- public final static Property Desc = new Property(2, String.class, "desc", false, "DESC");
- public final static Property TaskId = new Property(3, String.class, "taskId", false, "TASK_ID");
- public final static Property TaskCode = new Property(4, String.class, "taskCode", false, "TASK_CODE");
- public final static Property MarkerId = new Property(5, String.class, "markerId", false, "MARKER_ID");
- public final static Property MarkerRealId = new Property(6, String.class, "markerRealId", false, "MARKER_REAL_ID");
- public final static Property Lng = new Property(7, String.class, "lng", false, "LNG");
- public final static Property Lat = new Property(8, String.class, "lat", false, "LAT");
- public final static Property State = new Property(9, String.class, "state", false, "STATE");
- }
-
-
- public TaskBeanDao(DaoConfig config) {
- super(config);
- }
-
- public TaskBeanDao(DaoConfig config, DaoSession daoSession) {
- super(config, daoSession);
- }
-
- /**
- * Creates the underlying database table.
- */
- public static void createTable(Database db, boolean ifNotExists) {
- String constraint = ifNotExists ? "IF NOT EXISTS " : "";
- db.execSQL("CREATE TABLE " + constraint + "\"TASK_BEAN\" (" + //
- "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
- "\"SCANNER\" TEXT," + // 1: scanner
- "\"DESC\" TEXT," + // 2: desc
- "\"TASK_ID\" TEXT," + // 3: taskId
- "\"TASK_CODE\" TEXT," + // 4: taskCode
- "\"MARKER_ID\" TEXT," + // 5: markerId
- "\"MARKER_REAL_ID\" TEXT," + // 6: markerRealId
- "\"LNG\" TEXT," + // 7: lng
- "\"LAT\" TEXT," + // 8: lat
- "\"STATE\" TEXT);"); // 9: state
- }
-
- /**
- * 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);
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @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 desc = entity.getDesc();
- if (desc != null) {
- stmt.bindString(3, desc);
- }
-
- String taskId = entity.getTaskId();
- if (taskId != null) {
- stmt.bindString(4, taskId);
- }
-
- String taskCode = entity.getTaskCode();
- if (taskCode != null) {
- stmt.bindString(5, taskCode);
- }
-
- String markerId = entity.getMarkerId();
- if (markerId != null) {
- stmt.bindString(6, markerId);
- }
-
- String markerRealId = entity.getMarkerRealId();
- if (markerRealId != null) {
- stmt.bindString(7, markerRealId);
- }
-
- 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);
- }
- }
-
- @Override
- public Long readKey(Cursor cursor, int offset) {
- return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
- }
-
- @Override
- public TaskBean readEntity(Cursor cursor, int offset) {
- TaskBean entity = new TaskBean( //
- cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
- cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // scanner
- cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // desc
- cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // taskId
- cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskCode
- cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // markerId
- cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // markerRealId
- cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // lng
- cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // lat
- cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // state
- );
- return entity;
- }
-
- @Override
- public void readEntity(Cursor cursor, TaskBean entity, int offset) {
- entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
- entity.setScanner(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
- entity.setDesc(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
- entity.setTaskId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
- entity.setTaskCode(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
- entity.setMarkerId(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
- entity.setMarkerRealId(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
- entity.setLng(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
- entity.setLat(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
- entity.setState(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
- }
-
- @Override
- protected final Long updateKeyAfterInsert(TaskBean entity, long rowId) {
- entity.setId(rowId);
- return rowId;
- }
-
- @Override
- public Long getKey(TaskBean entity) {
- if (entity != null) {
- return entity.getId();
- } else {
- return null;
- }
- }
-
- @Override
- public boolean hasKey(TaskBean entity) {
- return entity.getId() != null;
- }
-
- @Override
- protected final boolean isEntityUpdateable() {
- return true;
- }
-
-}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
new file mode 100644
index 0000000..d7cb739
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskLocalBeanDao.java
@@ -0,0 +1,218 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_LOCAL_BEAN".
+ */
+public class TaskLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskCode = new Property(1, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property Description = new Property(2, String.class, "description", false, "DESCRIPTION");
+ public final static Property CreateTime = new Property(3, String.class, "createTime", false, "CREATE_TIME");
+ public final static Property Status = new Property(4, String.class, "status", false, "STATUS");
+ public final static Property CreateUserName = new Property(5, String.class, "createUserName", false, "CREATE_USER_NAME");
+ public final static Property StartTime = new Property(6, String.class, "startTime", false, "START_TIME");
+ public final static Property EndTime = new Property(7, String.class, "endTime", false, "END_TIME");
+ }
+
+
+ public TaskLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_CODE\" TEXT," + // 1: taskCode
+ "\"DESCRIPTION\" TEXT," + // 2: description
+ "\"CREATE_TIME\" TEXT," + // 3: createTime
+ "\"STATUS\" TEXT," + // 4: status
+ "\"CREATE_USER_NAME\" TEXT," + // 5: createUserName
+ "\"START_TIME\" TEXT," + // 6: startTime
+ "\"END_TIME\" TEXT);"); // 7: endTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(2, taskCode);
+ }
+
+ String description = entity.getDescription();
+ if (description != null) {
+ stmt.bindString(3, description);
+ }
+
+ String createTime = entity.getCreateTime();
+ if (createTime != null) {
+ stmt.bindString(4, createTime);
+ }
+
+ String status = entity.getStatus();
+ if (status != null) {
+ stmt.bindString(5, status);
+ }
+
+ String createUserName = entity.getCreateUserName();
+ if (createUserName != null) {
+ stmt.bindString(6, createUserName);
+ }
+
+ String startTime = entity.getStartTime();
+ if (startTime != null) {
+ stmt.bindString(7, startTime);
+ }
+
+ String endTime = entity.getEndTime();
+ if (endTime != null) {
+ stmt.bindString(8, endTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskLocalBean readEntity(Cursor cursor, int offset) {
+ TaskLocalBean entity = new TaskLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskCode
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // description
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // createTime
+ cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // status
+ cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // createUserName
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // startTime
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // endTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setDescription(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setCreateTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
+ entity.setCreateUserName(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
+ entity.setStartTime(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setEndTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
new file mode 100644
index 0000000..2de65b9
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/greendao/TaskMarkerLocalBeanDao.java
@@ -0,0 +1,202 @@
+package com.casic.detector.greendao;
+
+import android.database.Cursor;
+import android.database.sqlite.SQLiteStatement;
+
+import com.casic.detector.bean.TaskMarkerLocalBean;
+
+import org.greenrobot.greendao.AbstractDao;
+import org.greenrobot.greendao.Property;
+import org.greenrobot.greendao.database.Database;
+import org.greenrobot.greendao.database.DatabaseStatement;
+import org.greenrobot.greendao.internal.DaoConfig;
+
+// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
+
+/**
+ * DAO for table "TASK_MARKER_LOCAL_BEAN".
+ */
+public class TaskMarkerLocalBeanDao extends AbstractDao
+ * Can be used for QueryBuilder and for referencing column names.
+ */
+ public static class Properties {
+ public final static Property Id = new Property(0, Long.class, "id", true, "_id");
+ public final static Property TaskId = new Property(1, String.class, "taskId", false, "TASK_ID");
+ public final static Property TaskCode = new Property(2, String.class, "taskCode", false, "TASK_CODE");
+ public final static Property MarkerId = new Property(3, String.class, "markerId", false, "MARKER_ID");
+ public final static Property Lng = new Property(4, double.class, "lng", false, "LNG");
+ public final static Property Lat = new Property(5, double.class, "lat", false, "LAT");
+ public final static Property IsDetected = new Property(6, String.class, "isDetected", false, "IS_DETECTED");
+ public final static Property DetectedTime = new Property(7, String.class, "detectedTime", false, "DETECTED_TIME");
+ }
+
+
+ public TaskMarkerLocalBeanDao(DaoConfig config) {
+ super(config);
+ }
+
+ public TaskMarkerLocalBeanDao(DaoConfig config, DaoSession daoSession) {
+ super(config, daoSession);
+ }
+
+ /**
+ * Creates the underlying database table.
+ */
+ public static void createTable(Database db, boolean ifNotExists) {
+ String constraint = ifNotExists ? "IF NOT EXISTS " : "";
+ db.execSQL("CREATE TABLE " + constraint + "\"TASK_MARKER_LOCAL_BEAN\" (" + //
+ "\"_id\" INTEGER PRIMARY KEY ," + // 0: id
+ "\"TASK_ID\" TEXT," + // 1: taskId
+ "\"TASK_CODE\" TEXT," + // 2: taskCode
+ "\"MARKER_ID\" TEXT," + // 3: markerId
+ "\"LNG\" REAL NOT NULL ," + // 4: lng
+ "\"LAT\" REAL NOT NULL ," + // 5: lat
+ "\"IS_DETECTED\" TEXT," + // 6: isDetected
+ "\"DETECTED_TIME\" TEXT);"); // 7: detectedTime
+ }
+
+ /**
+ * Drops the underlying database table.
+ */
+ public static void dropTable(Database db, boolean ifExists) {
+ String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TASK_MARKER_LOCAL_BEAN\"";
+ db.execSQL(sql);
+ }
+
+ @Override
+ protected final void bindValues(DatabaseStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ protected final void bindValues(SQLiteStatement stmt, TaskMarkerLocalBean entity) {
+ stmt.clearBindings();
+
+ Long id = entity.getId();
+ if (id != null) {
+ stmt.bindLong(1, id);
+ }
+
+ String taskId = entity.getTaskId();
+ if (taskId != null) {
+ stmt.bindString(2, taskId);
+ }
+
+ String taskCode = entity.getTaskCode();
+ if (taskCode != null) {
+ stmt.bindString(3, taskCode);
+ }
+
+ String markerId = entity.getMarkerId();
+ if (markerId != null) {
+ stmt.bindString(4, markerId);
+ }
+ stmt.bindDouble(5, entity.getLng());
+ stmt.bindDouble(6, entity.getLat());
+
+ String isDetected = entity.getIsDetected();
+ if (isDetected != null) {
+ stmt.bindString(7, isDetected);
+ }
+
+ String detectedTime = entity.getDetectedTime();
+ if (detectedTime != null) {
+ stmt.bindString(8, detectedTime);
+ }
+ }
+
+ @Override
+ public Long readKey(Cursor cursor, int offset) {
+ return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
+ }
+
+ @Override
+ public TaskMarkerLocalBean readEntity(Cursor cursor, int offset) {
+ TaskMarkerLocalBean entity = new TaskMarkerLocalBean( //
+ cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
+ cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // taskId
+ cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // taskCode
+ cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // markerId
+ cursor.getDouble(offset + 4), // lng
+ cursor.getDouble(offset + 5), // lat
+ cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // isDetected
+ cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7) // detectedTime
+ );
+ return entity;
+ }
+
+ @Override
+ public void readEntity(Cursor cursor, TaskMarkerLocalBean entity, int offset) {
+ entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
+ entity.setTaskId(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
+ entity.setTaskCode(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
+ entity.setMarkerId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
+ entity.setLng(cursor.getDouble(offset + 4));
+ entity.setLat(cursor.getDouble(offset + 5));
+ entity.setIsDetected(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
+ entity.setDetectedTime(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
+ }
+
+ @Override
+ protected final Long updateKeyAfterInsert(TaskMarkerLocalBean entity, long rowId) {
+ entity.setId(rowId);
+ return rowId;
+ }
+
+ @Override
+ public Long getKey(TaskMarkerLocalBean entity) {
+ if (entity != null) {
+ return entity.getId();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasKey(TaskMarkerLocalBean entity) {
+ return entity.getId() != null;
+ }
+
+ @Override
+ protected final boolean isEntityUpdateable() {
+ return true;
+ }
+
+}
diff --git a/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
new file mode 100644
index 0000000..b485eda
--- /dev/null
+++ b/app/src/main/java/com/casic/detector/model/TaskDetailLocalModel.java
@@ -0,0 +1,138 @@
+package com.casic.detector.model;
+
+import java.util.List;
+
+/**
+ * Task本地库数据模型类,包含Task里面的Marker
+ */
+public class TaskDetailLocalModel {
+ private String taskId;//任务ID
+ private String taskCode;//任务编号
+ private String description;//任务名称
+ private String createTime;//任务创建的时间
+ private String status;//任务状态
+ private String createUserName;//任务创建者名称
+ private String startTime;//任务被开始执行的时间
+ private String endTime;//任务执行结束的时间
+ private List