Commit 2f41b15a by chengxiuhong

test main

parent 88e88305
...@@ -22,7 +22,7 @@ android { ...@@ -22,7 +22,7 @@ android {
} }
greendao { greendao {
schemaVersion 2 schemaVersion 3
daoPackage 'com.oo.eye.gen' daoPackage 'com.oo.eye.gen'
targetGenDir 'src/main/java' targetGenDir 'src/main/java'
} }
......
...@@ -96,7 +96,7 @@ public class EyeTestMainActivity extends BaseActivity { ...@@ -96,7 +96,7 @@ public class EyeTestMainActivity extends BaseActivity {
ArrayList<StudentBean> list = new ArrayList<>(); ArrayList<StudentBean> list = new ArrayList<>();
StudentBean student = new StudentBean(); StudentBean student = new StudentBean();
student.setRealname("游客"+(count+1)); student.setRealname("游客"+(count+1));
student.setClasses(mSimpleDateFormat.format(new Date())); student.setClassname(mSimpleDateFormat.format(new Date()));
list.add(student); list.add(student);
EyeConfig.getInstance().setStudents(list); EyeConfig.getInstance().setStudents(list);
Intent intent = new Intent(EyeTestMainActivity.this,BeforeEyeTestActivity.class); Intent intent = new Intent(EyeTestMainActivity.this,BeforeEyeTestActivity.class);
......
...@@ -39,7 +39,7 @@ public class MorePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, Item ...@@ -39,7 +39,7 @@ public class MorePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, Item
TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_order); TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_order);
orderText.setText(CheckUtil.isEmpty(studentBean.getNumber()) ? "--" : studentBean.getNumber()); orderText.setText(CheckUtil.isEmpty(studentBean.getNumber()) ? "--" : studentBean.getNumber());
TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group); TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group);
groupText.setText(studentBean.getClasses()); groupText.setText(studentBean.getClassname());
TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name); TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name);
nameText.setText(studentBean.getRealname()); nameText.setText(studentBean.getRealname());
TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday); TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday);
......
...@@ -49,7 +49,7 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It ...@@ -49,7 +49,7 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_order); TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_order);
orderText.setText(CheckUtil.isEmpty(studentBean.getNumber()) ? "--" : studentBean.getNumber()); orderText.setText(CheckUtil.isEmpty(studentBean.getNumber()) ? "--" : studentBean.getNumber());
TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group); TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group);
groupText.setText(studentBean.getClasses()); groupText.setText(studentBean.getClassname());
TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name); TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name);
nameText.setText(studentBean.getRealname()); nameText.setText(studentBean.getRealname());
TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday); TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday);
......
...@@ -36,7 +36,7 @@ public class TestListAdapter extends BaseRecyclerViewAdapter<StudentBean, ItemVi ...@@ -36,7 +36,7 @@ public class TestListAdapter extends BaseRecyclerViewAdapter<StudentBean, ItemVi
TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_order); TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_order);
orderText.setText(studentBean.getNumber()); orderText.setText(studentBean.getNumber());
TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group); TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group);
groupText.setText(studentBean.getClasses()); groupText.setText(studentBean.getClassname());
TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name); TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name);
nameText.setText(studentBean.getRealname()); nameText.setText(studentBean.getRealname());
TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday); TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday);
......
...@@ -40,7 +40,7 @@ public class TestResultListAdapter extends BaseRecyclerViewAdapter<StudentBean, ...@@ -40,7 +40,7 @@ public class TestResultListAdapter extends BaseRecyclerViewAdapter<StudentBean,
TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_number); TextView orderText = (TextView) holder.itemView.findViewById(R.id.test_number);
orderText.setText(CheckUtil.isEmpty(studentBean.getNumber()) ? "--" : studentBean.getNumber()); orderText.setText(CheckUtil.isEmpty(studentBean.getNumber()) ? "--" : studentBean.getNumber());
TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group); TextView groupText = (TextView) holder.itemView.findViewById(R.id.test_group);
groupText.setText(studentBean.getClasses()); groupText.setText(studentBean.getClassname());
TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name); TextView nameText = (TextView) holder.itemView.findViewById(R.id.test_name);
nameText.setText(studentBean.getRealname()); nameText.setText(studentBean.getRealname());
TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday); TextView birthdayText = (TextView) holder.itemView.findViewById(R.id.test_birthday);
......
...@@ -27,11 +27,21 @@ public class StudentBean extends BaseBean { ...@@ -27,11 +27,21 @@ public class StudentBean extends BaseBean {
private boolean isChick; private boolean isChick;
private String birthday; private String birthday;
@Generated(hash = 1107237120) public String getClassname() {
return classname;
}
public void setClassname(String classname) {
this.classname = classname;
}
private String classname;
@Generated(hash = 157731520)
public StudentBean(String sid, String uid, String school, String grade, public StudentBean(String sid, String uid, String school, String grade,
String classes, String status, String realname, String number, String classes, String status, String realname, String number,
double left_eye, double right_eye, String url, String pid, int distance, double left_eye, double right_eye, String url, String pid, int distance,
boolean isChick, String birthday) { boolean isChick, String birthday, String classname) {
this.sid = sid; this.sid = sid;
this.uid = uid; this.uid = uid;
this.school = school; this.school = school;
...@@ -47,6 +57,7 @@ public class StudentBean extends BaseBean { ...@@ -47,6 +57,7 @@ public class StudentBean extends BaseBean {
this.distance = distance; this.distance = distance;
this.isChick = isChick; this.isChick = isChick;
this.birthday = birthday; this.birthday = birthday;
this.classname = classname;
} }
@Generated(hash = 2097171990) @Generated(hash = 2097171990)
......
...@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType; ...@@ -14,10 +14,10 @@ import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** /**
* Master of DAO (schema version 2): knows all DAOs. * Master of DAO (schema version 3): knows all DAOs.
*/ */
public class DaoMaster extends AbstractDaoMaster { public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 2; public static final int SCHEMA_VERSION = 3;
/** Creates underlying database table using DAOs. */ /** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) { public static void createAllTables(Database db, boolean ifNotExists) {
......
...@@ -39,6 +39,7 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> { ...@@ -39,6 +39,7 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
public final static Property Distance = new Property(12, int.class, "distance", false, "DISTANCE"); public final static Property Distance = new Property(12, int.class, "distance", false, "DISTANCE");
public final static Property IsChick = new Property(13, boolean.class, "isChick", false, "IS_CHICK"); public final static Property IsChick = new Property(13, boolean.class, "isChick", false, "IS_CHICK");
public final static Property Birthday = new Property(14, String.class, "birthday", false, "BIRTHDAY"); public final static Property Birthday = new Property(14, String.class, "birthday", false, "BIRTHDAY");
public final static Property Classname = new Property(15, String.class, "classname", false, "CLASSNAME");
} }
...@@ -68,7 +69,8 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> { ...@@ -68,7 +69,8 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
"\"PID\" TEXT," + // 11: pid "\"PID\" TEXT," + // 11: pid
"\"DISTANCE\" INTEGER NOT NULL ," + // 12: distance "\"DISTANCE\" INTEGER NOT NULL ," + // 12: distance
"\"IS_CHICK\" INTEGER NOT NULL ," + // 13: isChick "\"IS_CHICK\" INTEGER NOT NULL ," + // 13: isChick
"\"BIRTHDAY\" TEXT);"); // 14: birthday "\"BIRTHDAY\" TEXT," + // 14: birthday
"\"CLASSNAME\" TEXT);"); // 15: classname
} }
/** Drops the underlying database table. */ /** Drops the underlying database table. */
...@@ -139,6 +141,11 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> { ...@@ -139,6 +141,11 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
if (birthday != null) { if (birthday != null) {
stmt.bindString(15, birthday); stmt.bindString(15, birthday);
} }
String classname = entity.getClassname();
if (classname != null) {
stmt.bindString(16, classname);
}
} }
@Override @Override
...@@ -203,6 +210,11 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> { ...@@ -203,6 +210,11 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
if (birthday != null) { if (birthday != null) {
stmt.bindString(15, birthday); stmt.bindString(15, birthday);
} }
String classname = entity.getClassname();
if (classname != null) {
stmt.bindString(16, classname);
}
} }
@Override @Override
...@@ -227,7 +239,8 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> { ...@@ -227,7 +239,8 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // pid cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // pid
cursor.getInt(offset + 12), // distance cursor.getInt(offset + 12), // distance
cursor.getShort(offset + 13) != 0, // isChick cursor.getShort(offset + 13) != 0, // isChick
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14) // birthday cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // birthday
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15) // classname
); );
return entity; return entity;
} }
...@@ -249,6 +262,7 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> { ...@@ -249,6 +262,7 @@ public class StudentBeanDao extends AbstractDao<StudentBean, Void> {
entity.setDistance(cursor.getInt(offset + 12)); entity.setDistance(cursor.getInt(offset + 12));
entity.setIsChick(cursor.getShort(offset + 13) != 0); entity.setIsChick(cursor.getShort(offset + 13) != 0);
entity.setBirthday(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14)); entity.setBirthday(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
entity.setClassname(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment