| | |
| | | }, |
| | | { |
| | | "item_id":29, |
| | | "item_content": "直线转弯", |
| | | "item_content": "直角转弯", |
| | | "deducting_reason": "车轮轧道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":30, |
| | | "item_content": "直线转弯", |
| | | "item_content": "直角转弯", |
| | | "deducting_reason": "转弯时不使用或错误使用转向灯,转完后不关闭转向灯", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":31, |
| | | "item_content": "直线转弯", |
| | | "item_content": "直角转弯", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
New file |
| | |
| | | [ |
| | | { |
| | | "item_id":1, |
| | | "item_content": "通用要求", |
| | | "deducting_reason": "不按规定使用安全带", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":2, |
| | | "item_content": "通用要求", |
| | | "deducting_reason": "不按考试员指令驾驶", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":3, |
| | | "item_content": "通用要求", |
| | | "deducting_reason": "启动发动机时档位未置于空挡(驻车档)", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":4, |
| | | "item_content": "通用要求", |
| | | "deducting_reason": "发动机启动后,不及时松开启动开关", |
| | | "score_deducting":10, |
| | | "required_precision":"时间大于2s,时间检测误差:0s~0.5s" |
| | | }, |
| | | { |
| | | "item_id":5, |
| | | "item_content": "通用要求", |
| | | "deducting_reason": "因操作不当造成发动机熄火一次", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":6, |
| | | "item_content": "桩考", |
| | | "deducting_reason": "不按规定路线、顺序行驶", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":7, |
| | | "item_content": "桩考", |
| | | "deducting_reason": "碰擦桩杆", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":8, |
| | | "item_content": "桩考", |
| | | "deducting_reason": "车身出线", |
| | | "score_deducting":100, |
| | | "required_precision":"甲乙库中间线误差±25mm,其他与标线中心偏移误差0mm~+50mm" |
| | | }, |
| | | { |
| | | "item_id":9, |
| | | "item_content": "桩考", |
| | | "deducting_reason": "倒库或移库不入", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":10, |
| | | "item_content": "桩考", |
| | | "deducting_reason": "项目完成时间超过480s(不含牵引车)", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | |
| | | { |
| | | "item_id":11, |
| | | "item_content": "桩考", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":12, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "车辆停止后,汽车前保险杠未定于桩杆线上,且前后超出50cm", |
| | | "score_deducting":100, |
| | | "required_precision":"距离检测误差:0mm~+50mn" |
| | | }, |
| | | { |
| | | "item_id":13, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "行驶中车轮轧道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":14, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "车辆停止后,车身距离路边缘线超出50cm", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | } , |
| | | { |
| | | "item_id":15, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "车辆停止后,起步时间超过30s", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":16, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "起步时车辆后溜距离大于30cm", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":17, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "车辆停止后,汽车前保险杠未定于桩杆线上,且前后不超出50cm", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":18, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "车辆停止后,车身距离路边缘线超出30cm,未超出50cm", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":19, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "停车后未拉紧驻车制动器", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":20, |
| | | "item_content": "坡道定点停车和起步", |
| | | "deducting_reason": "起步时车辆后溜距离10cm~30cm", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":21, |
| | | "item_content": "侧方停车", |
| | | "deducting_reason": "车辆入库停止后,车身出线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":22, |
| | | "item_content": "侧方停车", |
| | | "deducting_reason": "项目完成时间超过90s", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":23, |
| | | "item_content": "侧方停车", |
| | | "deducting_reason": "行驶中车轮触轧车道边线", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":24, |
| | | "item_content": "侧方停车", |
| | | "deducting_reason": "行驶中车身触碰库位边线", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":25, |
| | | "item_content": "侧方停车", |
| | | "deducting_reason": "出库时不使用或错误使用转向灯", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":26, |
| | | "item_content": "侧方停车", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":27, |
| | | "item_content": "通过单边桥", |
| | | "deducting_reason": "车轮已驶过桥面起始位置,有一轮未上桥", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":28, |
| | | "item_content": "通过单边桥", |
| | | "deducting_reason": "已骑上桥面,在行驶中出现一个车轮掉下桥面", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":29, |
| | | "item_content": "通过单边桥", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":30, |
| | | "item_content": "通过单边桥", |
| | | "deducting_reason": "行驶时档位未挂在二挡(含)以上", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":31, |
| | | "item_content": "曲线行驶", |
| | | "deducting_reason": "车轮轧道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":32, |
| | | "item_content": "曲线行驶", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":33, |
| | | "item_content": "曲线行驶", |
| | | "deducting_reason": "行驶时档位未挂在二挡(含)以上", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":34, |
| | | "item_content": "直角转弯", |
| | | "deducting_reason": "车轮轧道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":35, |
| | | "item_content": "直角转弯", |
| | | "deducting_reason": "转弯时不使用或错误使用转向灯,转完后不关闭转向灯", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":36, |
| | | "item_content": "直角转弯", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":37, |
| | | "item_content": "通过限宽门", |
| | | "deducting_reason": "不按规定路线、顺序行驶", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":38, |
| | | "item_content": "通过限宽门", |
| | | "deducting_reason": "碰擦一次限宽门标杆", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":39, |
| | | "item_content": "通过限宽门", |
| | | "deducting_reason": "车辆行驶速度低于10km/h", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":40, |
| | | "item_content": "通过连续障碍", |
| | | "deducting_reason": "不按规定路线、顺序行驶", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":41, |
| | | "item_content": "通过连续障碍", |
| | | "deducting_reason": "车轮轧道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":42, |
| | | "item_content": "通过连续障碍", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":43, |
| | | "item_content": "通过连续障碍", |
| | | "deducting_reason": "轧、碰、擦一个圆饼", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":44, |
| | | "item_content": "通过连续障碍", |
| | | "deducting_reason": "行驶时档位未挂在二挡(含)以上", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":45, |
| | | "item_content": "起伏路行驶", |
| | | "deducting_reason": "车辆以大于12km/h的速度通过起伏路面", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":46, |
| | | "item_content": "起伏路行驶", |
| | | "deducting_reason": "中途停车时间超过2s", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":47, |
| | | "item_content": "起伏路行驶", |
| | | "deducting_reason": "通过起伏路面前2m时,车辆未减速到12km/h", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":48, |
| | | "item_content": "窄路掉头", |
| | | "deducting_reason": "三进二退未完成掉头", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":49, |
| | | "item_content": "窄路掉头", |
| | | "deducting_reason": "车轮轧道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":50, |
| | | "item_content": "窄路掉头", |
| | | "deducting_reason": "项目完成时间超过300s", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":51, |
| | | "item_content": "模拟高速公路行驶", |
| | | "deducting_reason": "行驶中占用两条车道、应急车道或大型车辆前后100m均无其他车辆仍不靠右侧车道行驶", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":52, |
| | | "item_content": "模拟高速公路行驶", |
| | | "deducting_reason": "变道未开启转向灯或未观察后面情况", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":53, |
| | | "item_content": "模拟高速公路行驶", |
| | | "deducting_reason": "驶入高速公路时,未提速至规定车速", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":54, |
| | | "item_content": "模拟高速公路行驶", |
| | | "deducting_reason": "驶出高速公路时,未按照出口预告标志提前调整车速和车道", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":55, |
| | | "item_content": "模拟连续急弯山区路行驶", |
| | | "deducting_reason": "进入弯道前未减速至通过弯道所需的速度", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":56, |
| | | "item_content": "模拟连续急弯山区路行驶", |
| | | "deducting_reason": "弯道内占用对方车道", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":57, |
| | | "item_content": "模拟连续急弯山区路行驶", |
| | | "deducting_reason": "转弯过程中方向控制不稳,车轮轧弯道中心线或道路边缘线", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":58, |
| | | "item_content": "模拟连续急弯山区路行驶", |
| | | "deducting_reason": "进入弯道前未鸣喇叭", |
| | | "score_deducting":10, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":59, |
| | | "item_content": "模拟隧道行驶", |
| | | "deducting_reason": "驶抵隧道时未减速或未开启前照灯", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":60, |
| | | "item_content": "模拟隧道行驶", |
| | | "deducting_reason": "驶入隧道后不按规定车道行驶、变道", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":61, |
| | | "item_content": "模拟隧道行驶", |
| | | "deducting_reason": "驶抵隧道出(入)口时未鸣喇叭", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":62, |
| | | "item_content": "模拟隧道行驶", |
| | | "deducting_reason": "驶出隧道后未关闭前照灯", |
| | | "score_deducting":5, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":63, |
| | | "item_content": "模拟雨(雾)天行驶", |
| | | "deducting_reason": "雨天未开启或正确使用雨刮器", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":64, |
| | | "item_content": "模拟雨(雾)天行驶", |
| | | "deducting_reason": "雾天未开启示廓灯、雾灯、前照灯、危险报警闪光灯", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":65, |
| | | "item_content": "模拟湿滑路行驶", |
| | | "deducting_reason": "未能使用低速挡(一挡或二挡)平稳通过", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":66, |
| | | "item_content": "模拟湿滑路行驶", |
| | | "deducting_reason": "进入湿滑路面未减速", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | }, |
| | | { |
| | | "item_id":67, |
| | | "item_content": "模拟湿滑路行驶", |
| | | "deducting_reason": "通过时急加速、急刹车", |
| | | "score_deducting":100, |
| | | "required_precision":"" |
| | | } |
| | | ] |
| | |
| | | */ |
| | | public class Constant { |
| | | public static final String CRITERIAFOR_I_JSON = "criteria_I.json"; |
| | | public static final String CRITERIAFOR_II_JSON = "criteria_II.json"; |
| | | } |
| | |
| | | import java.util.concurrent.Executors; |
| | | |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForI; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForII; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForIIWorker; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaForIWorker; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaIDao; |
| | | import safeluck.drive.evaluation.DB.criterias.CriteriaIIDao; |
| | | import safeluck.drive.evaluation.DB.failitems.FailProjDao; |
| | | import safeluck.drive.evaluation.DB.failitems.FailedProj; |
| | | import safeluck.drive.evaluation.DB.failitems.FailedProjWorker; |
| | |
| | | * 邮箱:632393724@qq.com |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | @Database(entities = {Student.class, CriteriaForI.class, FailedProj.class},version = 1,exportSchema = false) |
| | | @Database(entities = {Student.class, CriteriaForI.class, FailedProj.class, CriteriaForII.class},version = 1,exportSchema = false) |
| | | public abstract class WorkRoomDataBase extends RoomDatabase { |
| | | private static final String TAG = "WorkRoomDataBase"; |
| | | public abstract StudentDao getstudentDao(); |
| | | |
| | | //科目二 I类考场评判表 |
| | | public abstract CriteriaIDao getCriteriaIDao(); |
| | | //科目二 II类考场评判表 |
| | | public abstract CriteriaIIDao getCriteriaIIDao(); |
| | | public abstract FailProjDao getFailProjDao(); |
| | | private static volatile WorkRoomDataBase workRoomDataBase; |
| | | |
| | |
| | | OneTimeWorkRequest oneTimeWorkRequest = OneTimeWorkRequest.from(SeedDatabaseWorker.class); |
| | | OneTimeWorkRequest oneTimeWorkRequest1 = OneTimeWorkRequest.from(CriteriaForIWorker.class); |
| | | OneTimeWorkRequest oneTimeWorkRequest2 = OneTimeWorkRequest.from(FailedProjWorker.class); |
| | | OneTimeWorkRequest oneTimeWorkRequest3 = OneTimeWorkRequest.from(CriteriaForIIWorker.class); |
| | | Log.i(TAG, "onCreate: 创建数据库后建立数据表插入数据"); |
| | | WorkManager.getInstance(mContext).enqueue(oneTimeWorkRequest); |
| | | WorkManager.getInstance(mContext).enqueue(oneTimeWorkRequest1); |
| | | WorkManager.getInstance(mContext).enqueue(oneTimeWorkRequest2); |
| | | WorkManager.getInstance(mContext).enqueue(oneTimeWorkRequest3); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @ColumnInfo(name = "required_precision") |
| | | private String required_precision; |
| | | |
| | | public int getItem_id() { |
| | | return item_id; |
| | | } |
| | | |
| | | public void setItem_id(int item_id) { |
| | | this.item_id = item_id; |
| | | } |
| | | |
| | | public String getItem_content() { |
| | | return item_content; |
| | | } |
| | | |
| | | public void setItem_content(String item_content) { |
| | | this.item_content = item_content; |
| | | } |
| | | |
| | | public String getDeducting_reason() { |
| | | return deducting_reason; |
| | | } |
| | | |
| | | public void setDeducting_reason(String deducting_reason) { |
| | | this.deducting_reason = deducting_reason; |
| | | } |
| | | |
| | | public int getScore_deducting() { |
| | | return score_deducting; |
| | | } |
| | | |
| | | public void setScore_deducting(int score_deducting) { |
| | | this.score_deducting = score_deducting; |
| | | } |
| | | |
| | | public String getRequired_precision() { |
| | | return required_precision; |
| | | } |
| | | |
| | | public void setRequired_precision(String required_precision) { |
| | | this.required_precision = required_precision; |
| | | } |
| | | } |
New file |
| | |
| | | package safeluck.drive.evaluation.DB.criterias; |
| | | |
| | | import android.content.Context; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.work.Worker; |
| | | import androidx.work.WorkerParameters; |
| | | |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.google.gson.stream.JsonReader; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.lang.reflect.Type; |
| | | import java.util.List; |
| | | |
| | | import safeluck.drive.evaluation.DB.Constant; |
| | | import safeluck.drive.evaluation.DB.WorkRoomDataBase; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | | * Created by lzw on 2019/11/26. 11:59:25 |
| | | * 邮箱:632393724@qq.com |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | public class CriteriaForIIWorker extends Worker { |
| | | |
| | | private static final String TAG = "CriteriaForIWorker"; |
| | | |
| | | public CriteriaForIIWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) { |
| | | super(context, workerParams); |
| | | } |
| | | |
| | | @NonNull |
| | | @Override |
| | | public Result doWork() { |
| | | InputStream inputStream = null; |
| | | try { |
| | | inputStream = getApplicationContext().getAssets() |
| | | .open(Constant.CRITERIAFOR_II_JSON); |
| | | InputStreamReader inputStreamReader = new InputStreamReader(inputStream); |
| | | JsonReader jsonReader = new JsonReader(inputStreamReader); |
| | | Gson gson = new Gson(); |
| | | Type type = new TypeToken<List<CriteriaForII>>(){}.getType(); |
| | | |
| | | List<CriteriaForII> criteriaForIIS = gson.fromJson(jsonReader,type); |
| | | MyLog.i(TAG,"插入科目二,II类考场评判表"); |
| | | WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getCriteriaIIDao().insertAllCriteriaII(criteriaForIIS); |
| | | return Result.success(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | return Result.failure(); |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package safeluck.drive.evaluation.DB.criterias; |
| | | |
| | | import androidx.lifecycle.LiveData; |
| | | import androidx.room.Dao; |
| | | import androidx.room.Insert; |
| | | import androidx.room.OnConflictStrategy; |
| | | import androidx.room.Query; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * MyApplication2 |
| | | * Created by lzw on 2019/11/26. 11:12:18 |
| | | * 邮箱:632393724@qq.com |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | @Dao |
| | | public interface CriteriaIIDao { |
| | | @Insert(onConflict = OnConflictStrategy.IGNORE) |
| | | void insertCriteriaII(CriteriaForII criteriaForII); |
| | | |
| | | @Insert(onConflict = OnConflictStrategy.REPLACE) |
| | | void insertAllCriteriaII(List<CriteriaForII> criteriaForII); |
| | | |
| | | @Query( "SELECT * FROM criteria_two WHERE item_id =:item_id") |
| | | LiveData<CriteriaForII > queryItemForCriteriaII(int item_id); |
| | | } |