Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DutyManager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
邢皓翔
DutyManager
Commits
35be41a0
Commit
35be41a0
authored
Mar 23, 2018
by
Xinghaoxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
ed97effc
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
78 additions
and
22 deletions
+78
-22
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-2
DutyChangePeopleAdapter.java
...a/cn/bsl/bxbg/zhiban/adapter/DutyChangePeopleAdapter.java
+19
-0
ZhibanTableAdapter.java
...n/java/cn/bsl/bxbg/zhiban/adapter/ZhibanTableAdapter.java
+1
-1
AllPersonBean.java
app/src/main/java/cn/bsl/bxbg/zhiban/bean/AllPersonBean.java
+19
-1
Constant.java
app/src/main/java/cn/bsl/bxbg/zhiban/utils/Constant.java
+2
-2
PinYin.java
app/src/main/java/cn/bsl/bxbg/zhiban/utils/PinYin.java
+7
-0
item_duty_people.xml
app/src/main/res/layout/item_duty_people.xml
+28
-16
ic_launcher.png
app/src/main/res/mipmap-hdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-mdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
+0
-0
zhiban.png
app/src/main/res/mipmap-xhdpi/zhiban.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
+0
-0
ic_launcher.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+0
-0
ic_launcher_round.png
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
+0
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
35be41a0
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<application
<application
android:allowBackup=
"true"
android:allowBackup=
"true"
android:icon=
"@mipmap/
ic_launcher
"
android:icon=
"@mipmap/
zhiban
"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<
!--<category android:name="android.intent.category.LAUNCHER" />--
>
<
category
android:name=
"android.intent.category.LAUNCHER"
/
>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
<activity
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/adapter/DutyChangePeopleAdapter.java
View file @
35be41a0
...
@@ -52,10 +52,29 @@ public class DutyChangePeopleAdapter extends BaseAdapter {
...
@@ -52,10 +52,29 @@ public class DutyChangePeopleAdapter extends BaseAdapter {
viewHolder
=
(
ViewHolder
)
convertView
.
getTag
();
viewHolder
=
(
ViewHolder
)
convertView
.
getTag
();
}
}
viewHolder
.
username
.
setText
(
allPersonBeen
.
get
(
position
).
getUserName
());
viewHolder
.
username
.
setText
(
allPersonBeen
.
get
(
position
).
getUserName
());
viewHolder
.
changePeoplePy
.
setText
(
allPersonBeen
.
get
(
position
).
getFirstWord
());
if
(
position
==
0
)
{
viewHolder
.
changePeoplePy
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
if
(
allPersonBeen
.
get
(
position
).
getFirstWord
()
.
equals
(
allPersonBeen
.
get
(
position
-
1
).
getFirstWord
()))
{
allPersonBeen
.
get
(
position
).
setShow
(
false
);
if
(!
allPersonBeen
.
get
(
position
).
isShow
())
{
viewHolder
.
changePeoplePy
.
setVisibility
(
View
.
GONE
);
}
else
{
viewHolder
.
changePeoplePy
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
return
convertView
;
return
convertView
;
}
}
static
class
ViewHolder
{
static
class
ViewHolder
{
@BindView
(
R
.
id
.
change_people_py
)
TextView
changePeoplePy
;
@BindView
(
R
.
id
.
username
)
@BindView
(
R
.
id
.
username
)
TextView
username
;
TextView
username
;
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/adapter/ZhibanTableAdapter.java
View file @
35be41a0
...
@@ -42,7 +42,7 @@ public class ZhibanTableAdapter extends BaseAdapter {
...
@@ -42,7 +42,7 @@ public class ZhibanTableAdapter extends BaseAdapter {
@Override
@Override
public
View
getView
(
int
position
,
View
convertView
,
ViewGroup
parent
)
{
public
View
getView
(
int
position
,
View
convertView
,
ViewGroup
parent
)
{
ViewHolder
viewHolder
=
null
;
ViewHolder
viewHolder
=
null
;
if
(
viewHolder
==
null
)
{
if
(
convertView
==
null
)
{
convertView
=
LayoutInflater
.
from
(
parent
.
getContext
())
convertView
=
LayoutInflater
.
from
(
parent
.
getContext
())
.
inflate
(
R
.
layout
.
item_zhiban_table
,
parent
,
false
);
.
inflate
(
R
.
layout
.
item_zhiban_table
,
parent
,
false
);
viewHolder
=
new
ViewHolder
(
convertView
);
viewHolder
=
new
ViewHolder
(
convertView
);
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/bean/AllPersonBean.java
View file @
35be41a0
...
@@ -12,6 +12,24 @@ public class AllPersonBean implements Comparable<AllPersonBean>{
...
@@ -12,6 +12,24 @@ public class AllPersonBean implements Comparable<AllPersonBean>{
private
String
userId
;
private
String
userId
;
private
String
userName
;
private
String
userName
;
private
String
namePy
;
private
String
namePy
;
private
String
firstWord
;
private
boolean
isShow
=
true
;
public
boolean
isShow
()
{
return
isShow
;
}
public
void
setShow
(
boolean
show
)
{
isShow
=
show
;
}
public
String
getFirstWord
()
{
return
firstWord
;
}
public
void
setFirstWord
(
String
firstWord
)
{
this
.
firstWord
=
firstWord
;
}
public
String
getNamePy
()
{
public
String
getNamePy
()
{
return
namePy
;
return
namePy
;
...
@@ -21,6 +39,7 @@ public class AllPersonBean implements Comparable<AllPersonBean>{
...
@@ -21,6 +39,7 @@ public class AllPersonBean implements Comparable<AllPersonBean>{
this
.
userId
=
userId
;
this
.
userId
=
userId
;
this
.
userName
=
userName
;
this
.
userName
=
userName
;
this
.
namePy
=
PinYin
.
getPinYin
(
userName
);
this
.
namePy
=
PinYin
.
getPinYin
(
userName
);
this
.
firstWord
=
PinYin
.
getFirstWord
(
userName
);
}
}
public
String
getUserId
()
{
public
String
getUserId
()
{
...
@@ -39,7 +58,6 @@ public class AllPersonBean implements Comparable<AllPersonBean>{
...
@@ -39,7 +58,6 @@ public class AllPersonBean implements Comparable<AllPersonBean>{
this
.
userName
=
userName
;
this
.
userName
=
userName
;
}
}
@Override
@Override
public
int
compareTo
(
@NonNull
AllPersonBean
o
)
{
public
int
compareTo
(
@NonNull
AllPersonBean
o
)
{
return
this
.
getNamePy
().
compareTo
(
o
.
getNamePy
());
return
this
.
getNamePy
().
compareTo
(
o
.
getNamePy
());
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/utils/Constant.java
View file @
35be41a0
...
@@ -6,8 +6,8 @@ package cn.bsl.bxbg.zhiban.utils;
...
@@ -6,8 +6,8 @@ package cn.bsl.bxbg.zhiban.utils;
public
interface
Constant
{
public
interface
Constant
{
String
HOST
=
"http://zjk.haomo-studio.com/zhangjiakouOA/"
;
String
HOST
=
"http://zjk.haomo-studio.com/zhangjiakouOA/"
;
String
USER_ID
=
"1
2
"
;
String
USER_ID
=
"1
1
"
;
String
USER_NAME
=
"
部门负责人
"
;
String
USER_NAME
=
"
科员
"
;
String
BASE_URL
=
"http://haomo-tech.com:8077/hbOA/"
;
String
BASE_URL
=
"http://haomo-tech.com:8077/hbOA/"
;
// 获取全部人员
// 获取全部人员
String
URL_GET_ALL_PEOPLE1
=
BASE_URL
+
"roleManagerController.do?method=searchDeptTree"
;
String
URL_GET_ALL_PEOPLE1
=
BASE_URL
+
"roleManagerController.do?method=searchDeptTree"
;
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/utils/PinYin.java
View file @
35be41a0
...
@@ -23,4 +23,11 @@ public class PinYin {
...
@@ -23,4 +23,11 @@ public class PinYin {
}
}
return
sb
.
toString
().
toLowerCase
(
Locale
.
US
);
return
sb
.
toString
().
toLowerCase
(
Locale
.
US
);
}
}
private
static
final
String
TAG
=
"PinYin"
;
public
static
String
getFirstWord
(
String
input
)
{
String
pinYin
=
getPinYin
(
input
);
char
[]
chars
=
pinYin
.
toCharArray
();
return
String
.
valueOf
(
chars
[
0
]).
toUpperCase
(
Locale
.
US
);
}
}
}
app/src/main/res/layout/item_duty_people.xml
View file @
35be41a0
...
@@ -2,23 +2,35 @@
...
@@ -2,23 +2,35 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"vertical"
android:background=
"#fff"
android:padding=
"10dp"
>
android:padding=
"10dp"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/change_people"
/>
<TextView
<TextView
android:id=
"@+id/username"
android:id=
"@+id/change_people_py"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"36dp"
android:text=
"A"
android:gravity=
"center_vertical"
android:textSize=
"18sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"张三"
android:orientation=
"horizontal"
android:textSize=
"18sp"
>
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
<ImageView
/>
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/change_people"
/>
<TextView
android:id=
"@+id/username"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10dp"
android:text=
"张三"
android:textSize=
"18sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted
100644 → 0
View file @
ed97effc
3.34 KB
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted
100644 → 0
View file @
ed97effc
4.11 KB
app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted
100644 → 0
View file @
ed97effc
2.15 KB
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted
100644 → 0
View file @
ed97effc
2.5 KB
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted
100644 → 0
View file @
ed97effc
5.97 KB
app/src/main/res/mipmap-xhdpi/zhiban.png
0 → 100644
View file @
35be41a0
2.56 KB
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted
100644 → 0
View file @
ed97effc
7.54 KB
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted
100644 → 0
View file @
ed97effc
9.82 KB
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted
100644 → 0
View file @
ed97effc
10.2 KB
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted
100644 → 0
View file @
ed97effc
14.4 KB
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