| | |
| | | int sn = jsonObject.get("sn").getAsInt(); |
| | | if (emp_id>1000){ |
| | | CriteriaForIII ttsStr=WorkRoomDataBase.getWorkRoomDataBase(getAppContext()).getCriteriaIIIDao().queryItemForCriteriaIIINoLive(emp_id-1000); |
| | | ExamPlatformData.getInstance().getTTS().speak(ttsStr.getDeducting_reason() + (ttsStr.getScore_deducting() == 100? "不合格" : "扣" + |
| | | ttsStr.getScore_deducting() + "分")); |
| | | ExamPlatformData.getInstance().getTTS().speak(ttsStr.getDeducting_reason() + (ttsStr.getScore_deducting() == 100? "不合格 " : "扣" + |
| | | ttsStr.getScore_deducting() + "分 ")); |
| | | jkMessage0203.fail_item_id =ttsStr.getItem_id(); |
| | | jkMessage0203.fail_score = ttsStr.getScore_deducting(); |
| | | jkMessage0203.fail_reason = ttsStr.getDeducting_reason(); |
| | | }else{ |
| | | CriteriaForI ttsStr = WorkRoomDataBase.getWorkRoomDataBase(getAppContext()).getCriteriaIDao().queryItemForCriteriaINoLive(emp_id); |
| | | ExamPlatformData.getInstance().getTTS().speak(ttsStr.getDeducting_reason() + (ttsStr.getScore_deducting() == 100? "不合格" : "扣" + |
| | | ttsStr.getScore_deducting() + "分")); |
| | | ExamPlatformData.getInstance().getTTS().speak(ttsStr.getDeducting_reason() + (ttsStr.getScore_deducting() == 100? "不合格 " : "扣" + |
| | | ttsStr.getScore_deducting() + "分 ")); |
| | | jkMessage0203.fail_item_id =ttsStr.getItem_id(); |
| | | jkMessage0203.fail_score = ttsStr.getScore_deducting(); |
| | | jkMessage0203.fail_reason = ttsStr.getDeducting_reason(); |
| | |
| | | package safeluck.drive.evaluation.bean; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | |
| | | import com.google.gson.JsonArray; |
| | | import com.google.gson.annotations.SerializedName; |
| | | |
| | | import org.json.JSONArray; |
| | | |
| | | import java.util.List; |
| | | |
| | | import safeluck.drive.evaluation.util.FileUtil; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | public class ExamMap { |
| | | |
| | | /** |
| | | * id : 863 |
| | | * item : 1 |
| | | * point : [{"x-y":[-11.9669,28.013,-11.5114,27.137,-10.8069,27.5039,-10.2969,26.4212,-9.2102,26.8894,-9.6513,28.0027,-8.9758,28.3797,-9.5057,29.3232]},{"x-y":[-11.9669,28.013,-11.5114,27.137,-10.8069,27.5039,-10.2969,26.4212,-9.2102,26.8894,-9.6513,28.0027,-8.9758,28.3797,-9.5057,29.3232]}] |
| | | * items : [{"id":876,"item":3,"point":[{"x-y":[16589.2108,-7592.2752,16587.738,-7588.9626,16581.1917,-7592.3313,16580.1238,-7590.1814,16573.4773,-7593.6051,16574.5939,-7595.7506,16568.6578,-7598.8277,16570.2548,-7602.0429]}]},{"id":879,"item":2,"point":[{"x-y":[16631.9724,-7572.0083,16640.7097,-7567.8933,16638.8423,-7563.8859,16639.3253,-7563.5842,16641.2092,-7567.6242,16641.4985,-7567.4958,16639.6009,-7563.438,16640.095,-7563.1417,16642.0225,-7567.2532]}]},{"id":877,"item":1,"point":[{"x-y":[16606.5718,-7592.7425,16609.7972,-7598.9155,16615.6195,-7595.8881,16617.9794,-7600.5532,16620.2055,-7599.3555,16617.8385,-7594.7065,16623.7326,-7591.5665,16620.5822,-7585.3858]}]},{"id":878,"item":5,"point":[{"x-y":[16601.7211,-7627.4499,16604.7674,-7625.387,16607.3525,-7630.2736,16611.6697,-7628.0306,16613.0442,-7631.3969,16605.8191,-7635.1681]}]},{"id":875,"item":4,"point":[{"x-y":[16582.5745,-7625.2715,16583.3317,-7626.2782,16584.3733,-7627.0041,16585.3725,-7627.3071,16586.6709,-7627.2873,16587.8216,-7626.8839,16588.8947,-7626.0781,16589.5949,-7624.9904,16590.0621,-7623.8121,16590.628,-7622.7458,16591.3904,-7621.7376,16592.2946,-7620.9083,16593.2589,-7620.2455,16594.1722,-7619.8063,16595.3586,-7619.4565,16596.6087,-7619.2749,16598.3161,-7619.4024,16599.5229,-7619.7126,16600.5292,-7620.151,16601.5604,-7620.8035,16602.481,-7621.6376,16603.0784,-7622.348,16603.3629,-7622.755]},{"x-y":[16579.3086,-7626.9764,16579.8354,-7627.7888,16580.3393,-7628.4316,16581.181,-7629.2701,16582.0667,-7629.9052,16583.1605,-7630.4413,16584.3072,-7630.818,16585.5416,-7630.993,16586.918,-7630.9599,16588.0948,-7630.7205,16589.1489,-7630.3119,16590.3826,-7629.6211,16591.2856,-7628.8977,16592.0383,-7628.0128,16592.8408,-7626.7007,16593.3354,-7625.4394,16593.886,-7624.4265,16594.9656,-7623.4808,16596.0498,-7623.0286,16597.3348,-7622.955,16598.4564,-7623.2286,16599.4254,-7623.7931,16600.1166,-7624.5026]}]}] |
| | | * name : 科二场考地图 |
| | | * type : yard |
| | | */ |
| | | |
| | | private int id; |
| | | private int item; |
| | | private List<PointBean> point; |
| | | private String name; |
| | | private String type; |
| | | private List<ItemsBean> items; |
| | | |
| | | public int getId() { |
| | | return id; |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getItem() { |
| | | return item; |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setItem(int item) { |
| | | this.item = item; |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public List<PointBean> getPoint() { |
| | | return point; |
| | | public List<ItemsBean> getItems() { |
| | | return items; |
| | | } |
| | | |
| | | public void setPoint(List<PointBean> point) { |
| | | this.point = point; |
| | | public void setItems(List<ItemsBean> items) { |
| | | this.items = items; |
| | | } |
| | | |
| | | public static class PointBean { |
| | | @SerializedName("x-y") |
| | | private List<Double> xy; |
| | | public static class ItemsBean { |
| | | /** |
| | | * id : 876 |
| | | * item : 3 |
| | | * point : [{"x-y":[16589.2108,-7592.2752,16587.738,-7588.9626,16581.1917,-7592.3313,16580.1238,-7590.1814,16573.4773,-7593.6051,16574.5939,-7595.7506,16568.6578,-7598.8277,16570.2548,-7602.0429]}] |
| | | */ |
| | | |
| | | public List<Double> getXy() { |
| | | return xy; |
| | | private int id; |
| | | private int item; |
| | | private List<PointBean> point; |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setXy(List<Double> xy) { |
| | | this.xy = xy; |
| | | public void setId(int id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PointBean{" + |
| | | "xy=" + FileUtil.ListToString(xy) + |
| | | '}'; |
| | | public int getItem() { |
| | | return item; |
| | | } |
| | | |
| | | public void setItem(int item) { |
| | | this.item = item; |
| | | } |
| | | |
| | | public List<PointBean> getPoint() { |
| | | return point; |
| | | } |
| | | |
| | | public void setPoint(List<PointBean> point) { |
| | | this.point = point; |
| | | } |
| | | |
| | | public static class PointBean { |
| | | @SerializedName("x-y") |
| | | private List<Double> xy; |
| | | |
| | | public List<Double> getXy() { |
| | | return xy; |
| | | } |
| | | |
| | | public void setXy(List<Double> xy) { |
| | | this.xy = xy; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ExamMap{" + |
| | | "id=" + id + |
| | | ", item=" + item + |
| | | ", point=" + FileUtil.ListToString(point) + |
| | | '}'; |
| | | } |
| | | // /** |
| | | // * id : 863 |
| | | // * item : 1 |
| | | // * point : [{"x-y":[-11.9669,28.013,-11.5114,27.137,-10.8069,27.5039,-10.2969,26.4212,-9.2102,26.8894,-9.6513,28.0027,-8.9758,28.3797,-9.5057,29.3232]},{"x-y":[-11.9669,28.013,-11.5114,27.137,-10.8069,27.5039,-10.2969,26.4212,-9.2102,26.8894,-9.6513,28.0027,-8.9758,28.3797,-9.5057,29.3232]}] |
| | | // */ |
| | | // |
| | | // private int id; |
| | | // private int item; |
| | | // private List<PointBean> point; |
| | | // |
| | | // public int getId() { |
| | | // return id; |
| | | // } |
| | | // |
| | | // public void setId(int id) { |
| | | // this.id = id; |
| | | // } |
| | | // |
| | | // public int getItem() { |
| | | // return item; |
| | | // } |
| | | // |
| | | // public void setItem(int item) { |
| | | // this.item = item; |
| | | // } |
| | | // |
| | | // public List<PointBean> getPoint() { |
| | | // return point; |
| | | // } |
| | | // |
| | | // public void setPoint(List<PointBean> point) { |
| | | // this.point = point; |
| | | // } |
| | | // |
| | | // public static class PointBean { |
| | | // @SerializedName("x-y") |
| | | // private List<Double> xy; |
| | | // |
| | | // public List<Double> getXy() { |
| | | // return xy; |
| | | // } |
| | | // |
| | | // public void setXy(List<Double> xy) { |
| | | // this.xy = xy; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public String toString() { |
| | | // return "PointBean{" + |
| | | // "xy=" + FileUtil.ListToString(xy) + |
| | | // '}'; |
| | | // } |
| | | // } |
| | | // |
| | | // @Override |
| | | // public String toString() { |
| | | // return "ExamMap{" + |
| | | // "id=" + id + |
| | | // ", item=" + item + |
| | | // ", point=" + FileUtil.ListToString(point) + |
| | | // '}'; |
| | | // } |
| | | |
| | | } |
| | |
| | | */ |
| | | |
| | | private int id; |
| | | private String name; |
| | | private String type; |
| | | private int item; |
| | | private String tts; |
| | | private int stop_flag; |
| | |
| | | public void setRoad_edge_line(List<List<Integer>> road_edge_line) { |
| | | this.road_edge_line = road_edge_line; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | for (int i = 0, j = 0; i < map[k].length && j < map_other.length; i++, j++) { |
| | | path.moveTo((float) (base_x + (map[k][i][0] - min_x) * scale_x), (float) (base_y + (map[k][i][1] - min_y) * scale_y)); |
| | | path.lineTo((float) (base_x + (map_other[j][0] - min_x) * scale_x), (float) (base_y + (map_other[j][1] - min_y) * scale_y)); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | // 4 - 曲线行驶 |
| | | // 5 - 直角转弯 |
| | | StringBuffer buffer=null; |
| | | List<ExamMap> examMaps; |
| | | ExamMap examMaps; |
| | | String newmap = null; |
| | | String mapPath = ExamPlatformData.getInstance().getMapPath(); |
| | | if (!TextUtils.isEmpty(mapPath)){ |
| | |
| | | buffer = FileUtil.readAssetTxtFile(_mActivity,Constant.MAP); |
| | | } |
| | | |
| | | Type type = new TypeToken<List<ExamMap>>(){}.getType(); |
| | | Type type = new TypeToken<ExamMap>(){}.getType(); |
| | | if (buffer != null){ |
| | | examMaps= gson.fromJson(buffer.toString().trim(), type); |
| | | }else{ |
| | |
| | | } |
| | | map_id = -1; |
| | | if (map_id == -1){ |
| | | allMap =new double[examMaps.size()][][]; |
| | | for (int i = 0; i < examMaps.size(); i++) { |
| | | ExamMap examMap = examMaps.get(i); |
| | | allMap =new double[examMaps.getItems().size()][][]; |
| | | for (int i = 0; i < examMaps.getItems().size(); i++) { |
| | | ExamMap.ItemsBean examMap = examMaps.getItems().get(i); |
| | | |
| | | List<ExamMap.PointBean> pointBeanList = examMap.getPoint(); |
| | | List<ExamMap.ItemsBean.PointBean> pointBeanList = examMap.getPoint(); |
| | | |
| | | for(int j=0; j<pointBeanList.size();j++){ |
| | | List<Double> xys = pointBeanList.get(j).getXy(); |
| | |
| | | |
| | | DrawMapAll(yaw, mainAnt,allMap, mapOther, car,body,tire); |
| | | }else{ |
| | | for (int i = 0; i < examMaps.size(); i++) { |
| | | ExamMap examMap = examMaps.get(i); |
| | | for (int i = 0; i < examMaps.getItems().size(); i++) { |
| | | ExamMap.ItemsBean examMap = examMaps.getItems().get(i); |
| | | if (map_id == examMap.getId()){ |
| | | List<ExamMap.PointBean> pointBeanList = examMap.getPoint(); |
| | | List<ExamMap.ItemsBean.PointBean> pointBeanList = examMap.getPoint(); |
| | | |
| | | for(int j=0; j<pointBeanList.size();j++){ |
| | | List<Double> xys = pointBeanList.get(j).getXy(); |