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
Show 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
package
cn
.
bsl
.
bxbg
.
zhiban
.
net
.
response
;
import
java.util.List
;
/**
* Created by Xinghx on 2018/3/20 0020.
*/
...
...
@@ -9,9 +7,9 @@ import java.util.List;
public
class
DutiesTbResponse
{
/**
* superior : {"id":"
4393fd967ef84e938271846882895dd1","classLeadersId":"12","classLeaders":"部门负责人","department":"App技术支持","postLeaders":"部门负责人","morning":"李亮,测试0","noon":"董春梅,李亮","evening":"李亮,董春梅","watchPeople":null,"type":null,"dutyDate":"2018-03-01","endTime":null,"startTime":null,"createTime":"2018-03-18 16:12:01","lastUpdateTime":"2018-03-20 15:20:53","onDutyPlanId":"3a157900491f41d6b1bab142e46038e1","dutyStage":null,"postDuty":null,"remark":null,"numberDays":null,"holiday":null,"holidayName
":null}
* includes : {}
* refers : {
"cc_shift":[{"id":"6d151791912c44b78a317972c3073479","applicantId":"11","applicant":"科员","transferredName":"测试0","transferredClass":null,"shiftTime":null,"applicantDutyId":"4393fd967ef84e938271846882895dd1","transferredClassTime":null,"transferredClassDutyId":null,"status":null,"reason":"测试","applicationTime":null,"createTime":"2018-03-20 15:20:53","lastUpdateTime":"2018-03-20 15:20:53","leaderId":null,"applicantPosition":null}]
}
* superior : {"id":"
22887cf509bc4fa4a93af1f665a40495","applicantId":"11","applicant":"测试0","transferredName":"测试0","transferredClass":"测试3号","shiftTime":"2018-03-22","applicantDutyId":"df852a8e8d0a4159ab4c573dc89dd8d8","transferredClassTime":"0","transferredClassDutyId":null,"status":"1","reason":"啊啊啊啊","applicationTime":null,"createTime":"2018-04-11 09:52:05","lastUpdateTime":"2018-04-11 09:57:27","leaderId":null,"applicantPosition":null,"approvalResult
":null}
* includes : {
"cc_duty":{"id":"df852a8e8d0a4159ab4c573dc89dd8d8","classLeadersId":"12","classLeaders":"部门负责人","department":"App技术支持","postLeaders":null,"morning":"测试3号","noon":"测试0","evening":"测试0","watchPeople":null,"type":null,"dutyDate":"2018-03-22","endTime":null,"startTime":null,"createTime":"2018-04-11 09:49:15","lastUpdateTime":"2018-04-11 09:57:28","onDutyPlanId":"3a157900491f41d6b1bab142e46038e1","dutyStage":null,"postDuty":null,"remark":null,"numberDays":null,"holiday":null,"holidayName":null}
}
* refers : {}
* relates : {}
*/
...
...
@@ -54,21 +52,212 @@ public class DutiesTbResponse {
public
static
class
SuperiorBean
{
/**
* id : 4393fd967ef84e938271846882895dd1
* id : 22887cf509bc4fa4a93af1f665a40495
* applicantId : 11
* applicant : 测试0
* transferredName : 测试0
* transferredClass : 测试3号
* shiftTime : 2018-03-22
* applicantDutyId : df852a8e8d0a4159ab4c573dc89dd8d8
* transferredClassTime : 0
* transferredClassDutyId : null
* status : 1
* reason : 啊啊啊啊
* applicationTime : null
* createTime : 2018-04-11 09:52:05
* lastUpdateTime : 2018-04-11 09:57:27
* leaderId : null
* applicantPosition : null
* approvalResult : null
*/
private
String
id
;
private
String
applicantId
;
private
String
applicant
;
private
String
transferredName
;
private
String
transferredClass
;
private
String
shiftTime
;
private
String
applicantDutyId
;
private
String
transferredClassTime
;
private
Object
transferredClassDutyId
;
private
String
status
;
private
String
reason
;
private
Object
applicationTime
;
private
String
createTime
;
private
String
lastUpdateTime
;
private
Object
leaderId
;
private
Object
applicantPosition
;
private
Object
approvalResult
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getApplicantId
()
{
return
applicantId
;
}
public
void
setApplicantId
(
String
applicantId
)
{
this
.
applicantId
=
applicantId
;
}
public
String
getApplicant
()
{
return
applicant
;
}
public
void
setApplicant
(
String
applicant
)
{
this
.
applicant
=
applicant
;
}
public
String
getTransferredName
()
{
return
transferredName
;
}
public
void
setTransferredName
(
String
transferredName
)
{
this
.
transferredName
=
transferredName
;
}
public
String
getTransferredClass
()
{
return
transferredClass
;
}
public
void
setTransferredClass
(
String
transferredClass
)
{
this
.
transferredClass
=
transferredClass
;
}
public
String
getShiftTime
()
{
return
shiftTime
;
}
public
void
setShiftTime
(
String
shiftTime
)
{
this
.
shiftTime
=
shiftTime
;
}
public
String
getApplicantDutyId
()
{
return
applicantDutyId
;
}
public
void
setApplicantDutyId
(
String
applicantDutyId
)
{
this
.
applicantDutyId
=
applicantDutyId
;
}
public
String
getTransferredClassTime
()
{
return
transferredClassTime
;
}
public
void
setTransferredClassTime
(
String
transferredClassTime
)
{
this
.
transferredClassTime
=
transferredClassTime
;
}
public
Object
getTransferredClassDutyId
()
{
return
transferredClassDutyId
;
}
public
void
setTransferredClassDutyId
(
Object
transferredClassDutyId
)
{
this
.
transferredClassDutyId
=
transferredClassDutyId
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
public
Object
getApplicationTime
()
{
return
applicationTime
;
}
public
void
setApplicationTime
(
Object
applicationTime
)
{
this
.
applicationTime
=
applicationTime
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getLastUpdateTime
()
{
return
lastUpdateTime
;
}
public
void
setLastUpdateTime
(
String
lastUpdateTime
)
{
this
.
lastUpdateTime
=
lastUpdateTime
;
}
public
Object
getLeaderId
()
{
return
leaderId
;
}
public
void
setLeaderId
(
Object
leaderId
)
{
this
.
leaderId
=
leaderId
;
}
public
Object
getApplicantPosition
()
{
return
applicantPosition
;
}
public
void
setApplicantPosition
(
Object
applicantPosition
)
{
this
.
applicantPosition
=
applicantPosition
;
}
public
Object
getApprovalResult
()
{
return
approvalResult
;
}
public
void
setApprovalResult
(
Object
approvalResult
)
{
this
.
approvalResult
=
approvalResult
;
}
}
public
static
class
IncludesBean
{
/**
* cc_duty : {"id":"df852a8e8d0a4159ab4c573dc89dd8d8","classLeadersId":"12","classLeaders":"部门负责人","department":"App技术支持","postLeaders":null,"morning":"测试3号","noon":"测试0","evening":"测试0","watchPeople":null,"type":null,"dutyDate":"2018-03-22","endTime":null,"startTime":null,"createTime":"2018-04-11 09:49:15","lastUpdateTime":"2018-04-11 09:57:28","onDutyPlanId":"3a157900491f41d6b1bab142e46038e1","dutyStage":null,"postDuty":null,"remark":null,"numberDays":null,"holiday":null,"holidayName":null}
*/
private
CcDutyBean
cc_duty
;
public
CcDutyBean
getCc_duty
()
{
return
cc_duty
;
}
public
void
setCc_duty
(
CcDutyBean
cc_duty
)
{
this
.
cc_duty
=
cc_duty
;
}
public
static
class
CcDutyBean
{
/**
* id : df852a8e8d0a4159ab4c573dc89dd8d8
* classLeadersId : 12
* classLeaders : 部门负责人
* department : App技术支持
* postLeaders : 部门负责人
* morning : 李亮,测试0
* noon : 董春梅,李亮
* evening : 李亮,董春梅
* postLeaders : null
* morning : 测试3号
* noon : 测试0
* evening : 测试0
* watchPeople : null
* type : null
* dutyDate : 2018-03-01
* dutyDate : 2018-03-22
* endTime : null
* startTime : null
* createTime : 2018-03-18 16:12:01
* lastUpdateTime : 2018-03-20 15:20:53
* createTime : 2018-04-11 09:49:15
* lastUpdateTime : 2018-04-11 09:57:28
* onDutyPlanId : 3a157900491f41d6b1bab142e46038e1
* dutyStage : null
* postDuty : null
...
...
@@ -82,7 +271,7 @@ public class DutiesTbResponse {
private
String
classLeadersId
;
private
String
classLeaders
;
private
String
department
;
private
String
postLeaders
;
private
Object
postLeaders
;
private
String
morning
;
private
String
noon
;
private
String
evening
;
...
...
@@ -133,11 +322,11 @@ public class DutiesTbResponse {
this
.
department
=
department
;
}
public
String
getPostLeaders
()
{
public
Object
getPostLeaders
()
{
return
postLeaders
;
}
public
void
setPostLeaders
(
String
postLeaders
)
{
public
void
setPostLeaders
(
Object
postLeaders
)
{
this
.
postLeaders
=
postLeaders
;
}
...
...
@@ -277,186 +466,9 @@ public class DutiesTbResponse {
this
.
holidayName
=
holidayName
;
}
}
public
static
class
IncludesBean
{
}
public
static
class
RefersBean
{
private
List
<
CcShiftBean
>
cc_shift
;
public
List
<
CcShiftBean
>
getCc_shift
()
{
return
cc_shift
;
}
public
void
setCc_shift
(
List
<
CcShiftBean
>
cc_shift
)
{
this
.
cc_shift
=
cc_shift
;
}
public
static
class
CcShiftBean
{
/**
* id : 6d151791912c44b78a317972c3073479
* applicantId : 11
* applicant : 科员
* transferredName : 测试0
* transferredClass : null
* shiftTime : null
* applicantDutyId : 4393fd967ef84e938271846882895dd1
* transferredClassTime : null
* transferredClassDutyId : null
* status : null
* reason : 测试
* applicationTime : null
* createTime : 2018-03-20 15:20:53
* lastUpdateTime : 2018-03-20 15:20:53
* leaderId : null
* applicantPosition : null
*/
private
String
id
;
private
String
applicantId
;
private
String
applicant
;
private
String
transferredName
;
private
String
transferredClass
;
private
Object
shiftTime
;
private
String
applicantDutyId
;
private
Object
transferredClassTime
;
private
Object
transferredClassDutyId
;
private
String
status
;
private
String
reason
;
private
Object
applicationTime
;
private
String
createTime
;
private
String
lastUpdateTime
;
private
Object
leaderId
;
private
Object
applicantPosition
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getApplicantId
()
{
return
applicantId
;
}
public
void
setApplicantId
(
String
applicantId
)
{
this
.
applicantId
=
applicantId
;
}
public
String
getApplicant
()
{
return
applicant
;
}
public
void
setApplicant
(
String
applicant
)
{
this
.
applicant
=
applicant
;
}
public
String
getTransferredName
()
{
return
transferredName
;
}
public
void
setTransferredName
(
String
transferredName
)
{
this
.
transferredName
=
transferredName
;
}
public
String
getTransferredClass
()
{
return
transferredClass
;
}
public
void
setTransferredClass
(
String
transferredClass
)
{
this
.
transferredClass
=
transferredClass
;
}
public
Object
getShiftTime
()
{
return
shiftTime
;
}
public
void
setShiftTime
(
Object
shiftTime
)
{
this
.
shiftTime
=
shiftTime
;
}
public
String
getApplicantDutyId
()
{
return
applicantDutyId
;
}
public
void
setApplicantDutyId
(
String
applicantDutyId
)
{
this
.
applicantDutyId
=
applicantDutyId
;
}
public
Object
getTransferredClassTime
()
{
return
transferredClassTime
;
}
public
void
setTransferredClassTime
(
Object
transferredClassTime
)
{
this
.
transferredClassTime
=
transferredClassTime
;
}
public
Object
getTransferredClassDutyId
()
{
return
transferredClassDutyId
;
}
public
void
setTransferredClassDutyId
(
Object
transferredClassDutyId
)
{
this
.
transferredClassDutyId
=
transferredClassDutyId
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
public
Object
getApplicationTime
()
{
return
applicationTime
;
}
public
void
setApplicationTime
(
Object
applicationTime
)
{
this
.
applicationTime
=
applicationTime
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getLastUpdateTime
()
{
return
lastUpdateTime
;
}
public
void
setLastUpdateTime
(
String
lastUpdateTime
)
{
this
.
lastUpdateTime
=
lastUpdateTime
;
}
public
Object
getLeaderId
()
{
return
leaderId
;
}
public
void
setLeaderId
(
Object
leaderId
)
{
this
.
leaderId
=
leaderId
;
}
public
Object
getApplicantPosition
()
{
return
applicantPosition
;
}
public
void
setApplicantPosition
(
Object
applicantPosition
)
{
this
.
applicantPosition
=
applicantPosition
;
}
}
}
public
static
class
RelatesBean
{
...
...
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