Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apps-collaboration
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
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
高燕
apps-collaboration
Commits
ed3ec219
Commit
ed3ec219
authored
Sep 14, 2020
by
chenfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门户修改校稿文件发送协同消息
parent
767990e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
CollaborationResource.java
.../com/seeyon/ctp/rest/resources/CollaborationResource.java
+60
-0
No files found.
src/main/java/com/seeyon/ctp/rest/resources/CollaborationResource.java
View file @
ed3ec219
...
@@ -8357,7 +8357,67 @@ public class CollaborationResource extends BaseResource {
...
@@ -8357,7 +8357,67 @@ public class CollaborationResource extends BaseResource {
return
ok
(
map
);
return
ok
(
map
);
}
}
/**
* <pre>
* 门户修改文件发送协同消息
*
* @Pathparam source 门户ID
* </pre>
*/
@POST
@Consumes
(
MediaType
.
APPLICATION_JSON
)
@Path
(
"sendmessage/{source}"
)
@RestInterfaceAnnotation
public
Response
sendmessage
(
@PathParam
(
"source"
)
String
source
)
throws
BusinessException
,
Exception
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
isNull
(
source
))
{
map
.
put
(
"success"
,
false
);
map
.
put
(
"msg"
,
"source不能为空."
);
map
.
put
(
"oaId"
,
""
);
return
ok
(
map
);
}
List
<
ColSummary
>
data
=
colManager
.
getSourceData
(
source
);
if
(
data
!=
null
&&
!
data
.
isEmpty
()){
for
(
ColSummary
ids
:
data
){
Map
<
String
,
Object
>
message
=
new
HashMap
<
String
,
Object
>();
Long
Ids
=
ids
.
getId
();
String
subject
=
ids
.
getSubject
();
List
<
CtpAffair
>
ctpaffairs
=
affairManager
.
getAffairs
(
Ids
,
StateEnum
.
col_pending
);
if
(
ctpaffairs
==
null
|
ctpaffairs
.
size
()==
0
){
map
.
put
(
"success"
,
false
);
map
.
put
(
"msg"
,
"无此条待办数据."
);
map
.
put
(
"oaId"
,
""
);
return
ok
(
map
);
}
Long
senderid
=-
1L
;
String
content
=
"null"
;
List
<
Long
>
member
=
new
ArrayList
<
Long
>();
for
(
CtpAffair
affair
:
ctpaffairs
){
senderid
=
affair
.
getSenderId
();
member
.
add
(
affair
.
getMemberId
());
}
Long
[]
userIds2
=
new
Long
[
member
.
size
()];
userIds2
=
(
Long
[])((
Long
[])
member
.
toArray
(
userIds2
));
long
[]
userIds
=
new
long
[
userIds2
.
length
];
for
(
int
i
=
0
;
i
<
userIds2
.
length
;
++
i
)
{
userIds
[
i
]
=
userIds2
[
i
];
}
content
=
subject
+
"用户上传新文件,请注意查看"
;
String
[]
url
=
null
;
MessageExporter
messageExporter
=
new
MessageExporter
();
messageExporter
.
sendMessage
(
senderid
,
userIds
,
content
,
url
);
}
map
.
put
(
"success"
,
true
);
map
.
put
(
"msg"
,
"文件修改成功."
);
map
.
put
(
"门户Id"
,
source
);
}
else
{
map
.
put
(
"success"
,
false
);
map
.
put
(
"msg"
,
"查询不到此id."
);
map
.
put
(
"门户Id"
,
source
);
}
return
ok
(
map
);
}
// @POST
// @POST
// @Consumes(MediaType.APPLICATION_XML)
// @Consumes(MediaType.APPLICATION_XML)
// @Path("test")
// @Path("test")
...
...
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