Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haihang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐丛奇
haihang
Commits
8be96b47
Commit
8be96b47
authored
Sep 10, 2018
by
chengxiuhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test main
parent
c78b2ad6
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
11 deletions
+33
-11
build.gradle
app/build.gradle
+1
-1
EyeApplication.java
app/src/main/java/com/oo/eye/EyeApplication.java
+1
-0
TestResurtListActivity.java
app/src/main/java/com/oo/eye/activity/TestResurtListActivity.java
+1
-1
MorePeopleAdapter.java
app/src/main/java/com/oo/eye/adapter/MorePeopleAdapter.java
+3
-2
SinglePeopleAdapter.java
app/src/main/java/com/oo/eye/adapter/SinglePeopleAdapter.java
+2
-2
TestResultListAdapter.java
app/src/main/java/com/oo/eye/adapter/TestResultListAdapter.java
+21
-3
DbManager.java
app/src/main/java/com/oo/eye/db/DbManager.java
+1
-0
DaoMaster.java
app/src/main/java/com/oo/eye/gen/DaoMaster.java
+2
-2
dialog_after_eye_test.xml
app/src/main/res/layout/dialog_after_eye_test.xml
+1
-0
No files found.
app/build.gradle
View file @
8be96b47
...
@@ -22,7 +22,7 @@ android {
...
@@ -22,7 +22,7 @@ android {
}
}
greendao
{
greendao
{
schemaVersion
1
schemaVersion
2
daoPackage
'com.oo.eye.gen'
daoPackage
'com.oo.eye.gen'
targetGenDir
'src/main/java'
targetGenDir
'src/main/java'
}
}
...
...
app/src/main/java/com/oo/eye/EyeApplication.java
View file @
8be96b47
...
@@ -2,6 +2,7 @@ package com.oo.eye;
...
@@ -2,6 +2,7 @@ package com.oo.eye;
import
com.app.baselibrary.base.app.BaseApplication
;
import
com.app.baselibrary.base.app.BaseApplication
;
import
com.app.baselibrary.commonUtil.LogUtil
;
import
com.app.baselibrary.commonUtil.LogUtil
;
import
com.oo.eye.db.DbManager
;
import
com.oo.seex.netlibrary.net.BaseApiConfig
;
import
com.oo.seex.netlibrary.net.BaseApiConfig
;
/**
/**
...
...
app/src/main/java/com/oo/eye/activity/TestResurtListActivity.java
View file @
8be96b47
...
@@ -423,9 +423,9 @@ public class TestResurtListActivity extends BaseActivity {
...
@@ -423,9 +423,9 @@ public class TestResurtListActivity extends BaseActivity {
//获取临时报表的组
//获取临时报表的组
public
void
searchTemporary
()
{
public
void
searchTemporary
()
{
mResultListAdapter
.
clearAndNotify
();
List
<
StudentBean
>
list
=
DbManager
.
getInstance
(
this
).
getStudents
(
this
,
className
,
isTemporaryA
);
List
<
StudentBean
>
list
=
DbManager
.
getInstance
(
this
).
getStudents
(
this
,
className
,
isTemporaryA
);
if
(!
CheckUtil
.
isEmpty
(
list
))
{
if
(!
CheckUtil
.
isEmpty
(
list
))
{
mResultListAdapter
.
clear
();
mResultListAdapter
.
appendToListAndNotify
(
list
);
mResultListAdapter
.
appendToListAndNotify
(
list
);
}
else
{
}
else
{
ToastUtil
.
showMessage
(
"暂无数据"
);
ToastUtil
.
showMessage
(
"暂无数据"
);
...
...
app/src/main/java/com/oo/eye/adapter/MorePeopleAdapter.java
View file @
8be96b47
...
@@ -7,6 +7,7 @@ import android.view.ViewGroup;
...
@@ -7,6 +7,7 @@ import android.view.ViewGroup;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.app.baselibrary.commonUtil.CheckUtil
;
import
com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter
;
import
com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter
;
import
com.app.baselibrary.recycler.itemholder.ItemViewHolder
;
import
com.app.baselibrary.recycler.itemholder.ItemViewHolder
;
import
com.oo.eye.R
;
import
com.oo.eye.R
;
...
@@ -36,13 +37,13 @@ public class MorePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, Item
...
@@ -36,13 +37,13 @@ public class MorePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, Item
public
void
onBindViewHolder
(
ItemViewHolder
holder
,
final
int
position
)
{
public
void
onBindViewHolder
(
ItemViewHolder
holder
,
final
int
position
)
{
final
StudentBean
studentBean
=
mList
.
get
(
position
);
final
StudentBean
studentBean
=
mList
.
get
(
position
);
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
(
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
.
getClasses
());
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
);
birthdayText
.
setText
(
studentBean
.
getBirthday
());
birthdayText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getBirthday
())
?
"--"
:
studentBean
.
getNumber
());
ImageView
imageView
=
(
ImageView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
chick_iv
);
ImageView
imageView
=
(
ImageView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
chick_iv
);
imageView
.
setImageResource
(
studentBean
.
isChick
()
?
R
.
drawable
.
select2_sel
:
R
.
drawable
.
select2_nor
);
imageView
.
setImageResource
(
studentBean
.
isChick
()
?
R
.
drawable
.
select2_sel
:
R
.
drawable
.
select2_nor
);
holder
.
itemView
.
findViewById
(
R
.
id
.
choice_lay
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
holder
.
itemView
.
findViewById
(
R
.
id
.
choice_lay
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
app/src/main/java/com/oo/eye/adapter/SinglePeopleAdapter.java
View file @
8be96b47
...
@@ -47,13 +47,13 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
...
@@ -47,13 +47,13 @@ public class SinglePeopleAdapter extends BaseRecyclerViewAdapter<StudentBean, It
public
void
onBindViewHolder
(
ItemViewHolder
holder
,
final
int
position
)
{
public
void
onBindViewHolder
(
ItemViewHolder
holder
,
final
int
position
)
{
final
StudentBean
studentBean
=
mList
.
get
(
position
);
final
StudentBean
studentBean
=
mList
.
get
(
position
);
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
(
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
.
getClasses
());
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
);
birthdayText
.
setText
(
studentBean
.
getBirthday
());
birthdayText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getBirthday
())
?
"--"
:
studentBean
.
getNumber
());
ImageView
imageView
=
(
ImageView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
chick_iv
);
ImageView
imageView
=
(
ImageView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
chick_iv
);
imageView
.
setImageResource
(
studentBean
.
isChick
()
?
R
.
drawable
.
select1_sel
:
R
.
drawable
.
select1_nor
);
imageView
.
setImageResource
(
studentBean
.
isChick
()
?
R
.
drawable
.
select1_sel
:
R
.
drawable
.
select1_nor
);
holder
.
itemView
.
findViewById
(
R
.
id
.
choice_lay
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
holder
.
itemView
.
findViewById
(
R
.
id
.
choice_lay
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
app/src/main/java/com/oo/eye/adapter/TestResultListAdapter.java
View file @
8be96b47
...
@@ -2,8 +2,12 @@ package com.oo.eye.adapter;
...
@@ -2,8 +2,12 @@ package com.oo.eye.adapter;
import
android.content.Context
;
import
android.content.Context
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.app.baselibrary.commonUtil.CheckUtil
;
import
com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter
;
import
com.app.baselibrary.recycler.adapter.BaseRecyclerViewAdapter
;
import
com.app.baselibrary.recycler.itemholder.ItemViewHolder
;
import
com.app.baselibrary.recycler.itemholder.ItemViewHolder
;
import
com.oo.eye.R
;
import
com.oo.eye.R
;
...
@@ -17,8 +21,9 @@ import java.util.List;
...
@@ -17,8 +21,9 @@ import java.util.List;
* Author: cxh
* Author: cxh
*/
*/
public
class
TestResultListAdapter
extends
BaseRecyclerViewAdapter
<
StudentBean
,
ItemViewHolder
>
{
public
class
TestResultListAdapter
extends
BaseRecyclerViewAdapter
<
StudentBean
,
ItemViewHolder
>
{
private
final
LayoutInflater
mInflater
;
private
final
LayoutInflater
mInflater
;
public
TestResultListAdapter
(
List
<
StudentBean
>
list
,
Context
context
)
{
public
TestResultListAdapter
(
List
<
StudentBean
>
list
,
Context
context
)
{
super
(
list
,
context
);
super
(
list
,
context
);
mInflater
=
LayoutInflater
.
from
(
mContext
);
mInflater
=
LayoutInflater
.
from
(
mContext
);
...
@@ -31,12 +36,25 @@ public class TestResultListAdapter extends BaseRecyclerViewAdapter<StudentBean,I
...
@@ -31,12 +36,25 @@ public class TestResultListAdapter extends BaseRecyclerViewAdapter<StudentBean,I
@Override
@Override
public
void
onBindViewHolder
(
ItemViewHolder
holder
,
int
position
)
{
public
void
onBindViewHolder
(
ItemViewHolder
holder
,
int
position
)
{
final
StudentBean
studentBean
=
mList
.
get
(
position
);
TextView
orderText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_number
);
orderText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getNumber
())
?
"--"
:
studentBean
.
getNumber
());
TextView
groupText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_group
);
groupText
.
setText
(
studentBean
.
getClasses
());
TextView
nameText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_name
);
nameText
.
setText
(
studentBean
.
getRealname
());
TextView
birthdayText
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_birthday
);
birthdayText
.
setText
(
CheckUtil
.
isEmpty
(
studentBean
.
getBirthday
())
?
"--"
:
studentBean
.
getNumber
());
TextView
testResult
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_result
);
testResult
.
setText
(
studentBean
.
getLeft_eye
()
+
" | "
+
studentBean
.
getRight_eye
());
TextView
isA
=
(
TextView
)
holder
.
itemView
.
findViewById
(
R
.
id
.
test_isa
);
boolean
isa
=
studentBean
.
getLeft_eye
()
>=
5.0
&&
studentBean
.
getRight_eye
()
>=
5.0
;
isA
.
setText
(
isa
?
"是"
:
"否"
);
}
}
@Override
@Override
public
int
getItemCount
()
{
public
int
getItemCount
()
{
return
10
;
return
mList
.
size
()
;
}
}
}
}
app/src/main/java/com/oo/eye/db/DbManager.java
View file @
8be96b47
...
@@ -105,6 +105,7 @@ public class DbManager {
...
@@ -105,6 +105,7 @@ public class DbManager {
* @return
* @return
*/
*/
public
List
<
String
>
getClasses
(
Context
context
){
public
List
<
String
>
getClasses
(
Context
context
){
DbManager
.
getDaoSession
(
context
).
getStudentBeanDao
().
queryBuilder
().
list
();
List
<
String
>
classes
=
new
ArrayList
<>();
List
<
String
>
classes
=
new
ArrayList
<>();
Cursor
cursor
=
DbManager
.
getWritableDatabase
(
context
)
Cursor
cursor
=
DbManager
.
getWritableDatabase
(
context
)
.
rawQuery
(
"select distinct(CLASSES) FROM STUDENT_BEAN GROUP BY CLASSES"
,
null
);
.
rawQuery
(
"select distinct(CLASSES) FROM STUDENT_BEAN GROUP BY CLASSES"
,
null
);
...
...
app/src/main/java/com/oo/eye/gen/DaoMaster.java
View file @
8be96b47
...
@@ -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
1
): knows all DAOs.
* Master of DAO (schema version
2
): knows all DAOs.
*/
*/
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
class
DaoMaster
extends
AbstractDaoMaster
{
public
static
final
int
SCHEMA_VERSION
=
1
;
public
static
final
int
SCHEMA_VERSION
=
2
;
/** 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
)
{
...
...
app/src/main/res/layout/dialog_after_eye_test.xml
View file @
8be96b47
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_after_time"
android:layout_below=
"@+id/tv_after_time"
android:layout_centerHorizontal=
"true"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:layout_marginTop=
"25dp"
>
android:layout_marginTop=
"25dp"
>
<TextView
<TextView
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment