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
349c6026
Commit
349c6026
authored
Apr 11, 2018
by
Xinghaoxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
d4501847
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
272 additions
and
261 deletions
+272
-261
misc.xml
.idea/misc.xml
+1
-1
modules.xml
.idea/modules.xml
+1
-0
DutyAPI.java
app/src/main/java/cn/bsl/bxbg/zhiban/net/api/DutyAPI.java
+2
-2
DutyPlanClient.java
...in/java/cn/bsl/bxbg/zhiban/net/client/DutyPlanClient.java
+2
-4
DutiesTbResponse.java
...ava/cn/bsl/bxbg/zhiban/net/response/DutiesTbResponse.java
+243
-231
Constant.java
app/src/main/java/cn/bsl/bxbg/zhiban/utils/Constant.java
+1
-1
TiaobanDetailsActivity.java
.../java/cn/bsl/bxbg/zhiban/view/TiaobanDetailsActivity.java
+21
-21
TiaobanRecordActivity.java
...n/java/cn/bsl/bxbg/zhiban/view/TiaobanRecordActivity.java
+1
-1
No files found.
.idea/misc.xml
View file @
349c6026
...
...
@@ -27,7 +27,7 @@
</value>
</option>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
default=
"true"
project-jdk-name=
"1.8
"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
default=
"true"
assert-keyword=
"true"
jdk-15=
"true"
project-jdk-name=
"1.8 (1)
"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/build/classes"
/>
</component>
<component
name=
"ProjectType"
>
...
...
.idea/modules.xml
View file @
349c6026
...
...
@@ -3,6 +3,7 @@
<component
name=
"ProjectModuleManager"
>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/DutyManager.iml"
filepath=
"$PROJECT_DIR$/DutyManager.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/Zhiban.iml"
filepath=
"$PROJECT_DIR$/Zhiban.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/app/app.iml"
filepath=
"$PROJECT_DIR$/app/app.iml"
/>
</modules>
</component>
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/net/api/DutyAPI.java
View file @
349c6026
...
...
@@ -79,11 +79,11 @@ public interface DutyAPI {
@Query
(
"pageSize"
)
String
pageSize
,
@Query
(
"refers"
)
String
refers
);
@GET
(
"cc_
dutie
s"
)
@GET
(
"cc_
shift
s"
)
Observable
<
List
<
DutiesTbResponse
>>
dutiesTbDetails
(
@Query
(
"pageNo"
)
String
pageNo
,
@Query
(
"pageSize"
)
String
pageSize
,
@Query
(
"filters"
)
String
filters
,
@Query
(
"
refer
s"
)
String
refers
);
@Query
(
"
include
s"
)
String
refers
);
@GET
(
"cc_shifts"
)
Call
<
List
<
CCShifts
>>
ccShifts
(
@Query
(
"pageNo"
)
String
pageNo
,
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/net/client/DutyPlanClient.java
View file @
349c6026
...
...
@@ -12,8 +12,6 @@ import cn.bsl.bxbg.zhiban.net.response.DutyPlanResponse;
import
cn.bsl.bxbg.zhiban.net.response.TiaobanBean
;
import
cn.bsl.bxbg.zhiban.utils.Constant
;
import
io.reactivex.Observable
;
import
io.reactivex.ObservableSource
;
import
io.reactivex.functions.Function
;
import
retrofit2.Call
;
import
retrofit2.Retrofit
;
import
retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
;
...
...
@@ -68,7 +66,7 @@ public class DutyPlanClient extends BaseClient {
}
public
Observable
<
List
<
DutiesTbResponse
>>
dutiesTbDetails
(
String
id
)
{
return
dutyAPI
.
dutiesTbDetails
(
"1"
,
"1000"
,
"{'cc_
duty':{'id':{'like':'"
+
id
+
"'}}}"
,
"{'cc_shift
':{'includes':['applicant_duty_id']}}"
);
return
dutyAPI
.
dutiesTbDetails
(
"1"
,
"1000"
,
"{'cc_
shift':{'id':{'equalTo':'"
+
id
+
"'}}}"
,
"{'cc_duty
':{'includes':['applicant_duty_id']}}"
);
}
public
Call
<
List
<
CCShifts
>>
shiftsRecord
()
{
...
...
@@ -77,7 +75,7 @@ public class DutyPlanClient extends BaseClient {
}
public
Observable
<
List
<
CCShiftsUni
>>
ccshiftUni
(
String
id
)
{
return
dutyAPI
.
ccShiftsUnique
(
"1"
,
"1000"
,
"{'cc_shift':{'
applicant_duty_
id':{'equalTo':'"
+
id
+
"'}}}"
,
return
dutyAPI
.
ccShiftsUnique
(
"1"
,
"1000"
,
"{'cc_shift':{'id':{'equalTo':'"
+
id
+
"'}}}"
,
"{'cc_duty':{'includes':['applicant_duty_id']}}"
);
}
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/net/response/DutiesTbResponse.java
View file @
349c6026
This diff is collapsed.
Click to expand it.
app/src/main/java/cn/bsl/bxbg/zhiban/utils/Constant.java
View file @
349c6026
...
...
@@ -7,7 +7,7 @@ package cn.bsl.bxbg.zhiban.utils;
public
interface
Constant
{
String
HOST
=
"http://zjk.haomo-studio.com/zhangjiakouOA/"
;
String
USER_ID
=
"11"
;
String
USER_NAME
=
"
测试1号
"
;
String
USER_NAME
=
"
科员
"
;
String
BASE_URL
=
"http://haomo-tech.com:8077/hbOA/"
;
// 获取全部人员
String
URL_GET_ALL_PEOPLE1
=
BASE_URL
+
"roleManagerController.do?method=searchDeptTree"
;
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/view/TiaobanDetailsActivity.java
View file @
349c6026
...
...
@@ -53,7 +53,7 @@ public class TiaobanDetailsActivity extends BaseActivity {
private
String
id
;
DutyPlanClient
dutyPlanClient
=
new
DutyPlanClient
();
String
status
=
"1"
;
private
String
cc
Shift
_id
;
private
String
cc
_duty
_id
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -72,49 +72,49 @@ public class TiaobanDetailsActivity extends BaseActivity {
.
subscribe
(
new
Consumer
<
List
<
DutiesTbResponse
>>()
{
@Override
public
void
accept
(
List
<
DutiesTbResponse
>
dutiesTbResponses
)
throws
Exception
{
cc
Shift_id
=
dutiesTbResponses
.
get
(
0
).
getRefers
().
getCc_shift
().
get
(
0
).
getId
();
String
createTime
=
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getCreateTime
();
String
dutyDate
=
dutiesTbResponses
.
get
(
0
).
get
Superior
().
getDutyDate
();
String
people
=
" 早:"
+
dutiesTbResponses
.
get
(
0
).
get
Superior
().
getMorning
()
+
"\n 中:"
+
dutiesTbResponses
.
get
(
0
).
getSuperior
().
getNoon
()
+
"\n 晚:"
+
dutiesTbResponses
.
get
(
0
).
getSuperior
().
getEvening
();
String
change
=
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getTransferredName
()
+
" 变更为 "
+
dutiesTbResponses
.
get
(
0
).
getRefers
().
getCc_shift
().
get
(
0
).
getTransferredClass
();
cc
_duty_id
=
dutiesTbResponses
.
get
(
0
).
getIncludes
().
getCc_duty
(
).
getId
();
String
createTime
=
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getCreateTime
();
String
dutyDate
=
dutiesTbResponses
.
get
(
0
).
get
Includes
().
getCc_duty
().
getDutyDate
();
String
people
=
" 早:"
+
dutiesTbResponses
.
get
(
0
).
get
Includes
().
getCc_duty
().
getMorning
()
+
"\n 中:"
+
dutiesTbResponses
.
get
(
0
).
getIncludes
().
getCc_duty
().
getNoon
()
+
"\n 晚:"
+
dutiesTbResponses
.
get
(
0
).
getIncludes
().
getCc_duty
().
getEvening
();
String
change
=
dutiesTbResponses
.
get
(
0
).
get
Superior
().
getTransferredName
()
+
" 变更为 "
+
dutiesTbResponses
.
get
(
0
).
getSuperior
(
).
getTransferredClass
();
dutyTimes
.
setText
(
dutyDate
);
person
.
setText
(
people
);
changePerson
.
setText
(
change
);
// simple if 换班人是我判断id 如果被换班是我 直接修改
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getTransferredName
().
equals
(
Constant
.
USER_NAME
))
{
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getTransferredName
().
equals
(
Constant
.
USER_NAME
))
{
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getStatus
().
equals
(
"0"
))
{
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getStatus
().
equals
(
"0"
))
{
tvStatus
.
setText
(
"调班状态:等待对方操作"
);
rg
.
setVisibility
(
View
.
GONE
);
submit
.
setVisibility
(
View
.
GONE
);
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getStatus
().
equals
(
"1"
))
{
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getStatus
().
equals
(
"1"
))
{
tvStatus
.
setVisibility
(
View
.
VISIBLE
);
tvStatus
.
setText
(
"调班状态:对方同意了您的申请"
);
rg
.
setVisibility
(
View
.
GONE
);
submit
.
setVisibility
(
View
.
GONE
);
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getStatus
().
equals
(
"2"
))
{
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getStatus
().
equals
(
"2"
))
{
tvStatus
.
setVisibility
(
View
.
VISIBLE
);
tvStatus
.
setText
(
"调班状态:对方不同意您的申请"
);
rg
.
setVisibility
(
View
.
GONE
);
submit
.
setVisibility
(
View
.
GONE
);
}
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getTransferredClass
().
equals
(
Constant
.
USER_NAME
))
{
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getTransferredClass
().
equals
(
Constant
.
USER_NAME
))
{
// 被换班人是我
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getStatus
().
equals
(
"0"
))
{
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getStatus
().
equals
(
"0"
))
{
tvStatus
.
setVisibility
(
View
.
GONE
);
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getStatus
().
equals
(
"1"
))
{
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getStatus
().
equals
(
"1"
))
{
tvStatus
.
setVisibility
(
View
.
VISIBLE
);
tvStatus
.
setText
(
"调班状态:您同意了对方申请"
);
rg
.
setVisibility
(
View
.
GONE
);
submit
.
setVisibility
(
View
.
GONE
);
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getStatus
().
equals
(
"2"
))
{
}
else
if
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getStatus
().
equals
(
"2"
))
{
tvStatus
.
setVisibility
(
View
.
VISIBLE
);
tvStatus
.
setText
(
"调班状态:您不同意了对方申请"
);
rg
.
setVisibility
(
View
.
GONE
);
submit
.
setVisibility
(
View
.
GONE
);
}
}
reason
.
setText
(
dutiesTbResponses
.
get
(
0
).
get
Refers
().
getCc_shift
().
get
(
0
).
getReason
());
reason
.
setText
(
dutiesTbResponses
.
get
(
0
).
get
Superior
(
).
getReason
());
}
},
Throwable:
:
printStackTrace
);
...
...
@@ -123,8 +123,8 @@ public class TiaobanDetailsActivity extends BaseActivity {
private
void
initView
()
{
rg
.
setOnCheckedChangeListener
(
new
RadioGroup
.
OnCheckedChangeListener
()
{
@Override
public
void
onCheckedChanged
(
RadioGroup
radioGroup
,
int
i
)
{
switch
(
radioGroup
.
getId
()
)
{
public
void
onCheckedChanged
(
RadioGroup
radioGroup
,
int
checkId
)
{
switch
(
checkId
)
{
case
R
.
id
.
agree
:
// 修改status
// 改值班表
...
...
@@ -144,7 +144,7 @@ public class TiaobanDetailsActivity extends BaseActivity {
public
void
onViewClicked
()
{
if
(
status
.
equals
(
"1"
))
{
dutyPlanClient
.
ccShiftsEdit
(
ccShift_
id
,
status
).
flatMap
(
new
Function
<
CCShifts
,
ObservableSource
<
List
<
CCShiftsUni
>>>()
{
dutyPlanClient
.
ccShiftsEdit
(
id
,
status
).
flatMap
(
new
Function
<
CCShifts
,
ObservableSource
<
List
<
CCShiftsUni
>>>()
{
@Override
public
ObservableSource
<
List
<
CCShiftsUni
>>
apply
(
CCShifts
ccShifts
)
throws
Exception
{
return
dutyPlanClient
.
ccshiftUni
(
id
);
...
...
@@ -154,13 +154,13 @@ public class TiaobanDetailsActivity extends BaseActivity {
public
ObservableSource
<
CCDutiesEdit
>
apply
(
List
<
CCShiftsUni
>
ccShiftsUnis
)
throws
Exception
{
if
(
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClassTime
().
equals
(
"0"
))
{
String
morning
=
ccShiftsUnis
.
get
(
0
).
getIncludes
().
getCc_duty
().
getMorning
();
return
dutyPlanClient
.
editMorning
(
id
,
morning
.
replace
(
Constant
.
USER_NAME
,
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClass
()));
return
dutyPlanClient
.
editMorning
(
cc_duty_id
,
morning
.
replace
(
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredName
()
,
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClass
()));
}
else
if
(
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClassTime
().
equals
(
"1"
))
{
String
noon
=
ccShiftsUnis
.
get
(
0
).
getIncludes
().
getCc_duty
().
getNoon
();
return
dutyPlanClient
.
editNoon
(
id
,
noon
.
replace
(
Constant
.
USER_NAME
,
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClass
()));
return
dutyPlanClient
.
editNoon
(
cc_duty_id
,
noon
.
replace
(
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredName
()
,
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClass
()));
}
else
{
String
eve
=
ccShiftsUnis
.
get
(
0
).
getIncludes
().
getCc_duty
().
getEvening
();
return
dutyPlanClient
.
editNight
(
id
,
eve
.
replace
(
Constant
.
USER_NAME
,
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClass
()));
return
dutyPlanClient
.
editNight
(
cc_duty_id
,
eve
.
replace
(
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredName
()
,
ccShiftsUnis
.
get
(
0
).
getSuperior
().
getTransferredClass
()));
}
}
}).
subscribeOn
(
Schedulers
.
io
())
...
...
app/src/main/java/cn/bsl/bxbg/zhiban/view/TiaobanRecordActivity.java
View file @
349c6026
...
...
@@ -45,7 +45,7 @@ public class TiaobanRecordActivity extends BaseActivity {
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
Intent
intent
=
new
Intent
(
TiaobanRecordActivity
.
this
,
TiaobanDetailsActivity
.
class
);
intent
.
putExtra
(
"id"
,
ccShift
.
get
(
position
).
get
ApplicantDuty
Id
());
intent
.
putExtra
(
"id"
,
ccShift
.
get
(
position
).
getId
());
startActivity
(
intent
);
}
});
...
...
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