Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bi-report
Project
Project
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
data
bi-report
Commits
87da1a09
Commit
87da1a09
authored
Jul 11, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
2cb8ca61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
17 deletions
+30
-17
workspace.xml
lib/java/bi-report-service/.idea/workspace.xml
+12
-13
EmailService.java
...va/com/gmei/data/gateway/server/service/EmailService.java
+1
-1
BiReportServiceImpl.java
...data/gateway/server/service/impl/BiReportServiceImpl.java
+4
-1
EmailServiceImpl.java
...ei/data/gateway/server/service/impl/EmailServiceImpl.java
+13
-2
No files found.
lib/java/bi-report-service/.idea/workspace.xml
View file @
87da1a09
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"4ef7a995-babe-48ad-a058-4897dd73703a"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/../../../sbin/replace.sh"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../../../sbin/replace.sh"
afterDir=
"false"
/>
</list>
<list
default=
"true"
id=
"4ef7a995-babe-48ad-a058-4897dd73703a"
name=
"Default Changelist"
comment=
""
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_NON_ACTIVE_CHANGELIST"
value=
"false"
/>
...
...
@@ -217,25 +215,25 @@
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
x=
"773"
y=
"303"
key=
"#com.intellij.ide.util.MemberChooser/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"1593835959317"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159445
3512951
"
>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159445
4129998
"
>
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.bottom/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
3512951
"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.bottom/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
4129998
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.bottom/1752.1200.1920.1151/0.22.1920.1178/1920.120.1920.1080@1752.1200.1920.1151"
timestamp=
"1590742520783"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.center"
timestamp=
"159445
3512950
"
>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.center"
timestamp=
"159445
4129997
"
>
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.center/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
3512950
"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.center/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
4129997
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.center/1752.1200.1920.1151/0.22.1920.1178/1920.120.1920.1080@1752.1200.1920.1151"
timestamp=
"1590742520781"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.left"
timestamp=
"159445
3512949
"
>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.left"
timestamp=
"159445
4129996
"
>
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.left/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
3512949
"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.left/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
4129996
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.left/1752.1200.1920.1151/0.22.1920.1178/1920.120.1920.1080@1752.1200.1920.1151"
timestamp=
"1590742520781"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.right"
timestamp=
"159445
3512951
"
>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.right"
timestamp=
"159445
4129997
"
>
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.right/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
3512951
"
/>
<state
width=
"1878"
height=
"313"
key=
"GridCell.Tab.0.right/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
4129997
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.right/1752.1200.1920.1151/0.22.1920.1178/1920.120.1920.1080@1752.1200.1920.1151"
timestamp=
"1590742520782"
/>
<state
width=
"1878"
height=
"386"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1591671347527"
>
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
...
...
@@ -253,9 +251,9 @@
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
width=
"1878"
height=
"386"
key=
"GridCell.Tab.1.right/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"1591671347526"
/>
<state
x=
"625"
y=
"273"
width=
"670"
height=
"675"
key=
"run.anything.popup"
timestamp=
"159445
3512969
"
>
<state
x=
"625"
y=
"273"
width=
"670"
height=
"675"
key=
"run.anything.popup"
timestamp=
"159445
4130020
"
>
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1129"
/>
</state>
<state
x=
"625"
y=
"273"
width=
"670"
height=
"675"
key=
"run.anything.popup/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
3512969
"
/>
<state
x=
"625"
y=
"273"
width=
"670"
height=
"675"
key=
"run.anything.popup/0.22.1920.1129/-981.-1200.1920.1200/939.-1080.1920.1080@0.22.1920.1129"
timestamp=
"159445
4130020
"
/>
</component>
</project>
\ No newline at end of file
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/EmailService.java
View file @
87da1a09
package
com
.
gmei
.
data
.
gateway
.
server
.
service
;
public
interface
EmailService
{
void
sendAttachmentsMail
(
String
to
,
String
cc
,
String
name
)
throws
Exception
;
int
sendAttachmentsMail
(
String
to
,
String
cc
,
String
name
)
;
int
sendFormatedMail
(
String
to
,
String
cc
,
String
name
,
String
content
);
}
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/BiReportServiceImpl.java
View file @
87da1a09
...
...
@@ -42,7 +42,10 @@ public class BiReportServiceImpl implements BiReportService {
}
else
{
int
genExcelRs
=
excelService
.
genExcel
(
resultDto
,
name
);
if
(
Constants
.
SUCCESS
==
genExcelRs
){
emailService
.
sendAttachmentsMail
(
to
,
cc
,
name
);
int
rs
=
emailService
.
sendAttachmentsMail
(
to
,
cc
,
name
);
if
(
rs
==
Constants
.
FAIL
){
throw
new
Exception
(
"邮件发送失败,请核实!"
);
}
}
}
}
...
...
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/EmailServiceImpl.java
View file @
87da1a09
...
...
@@ -74,7 +74,7 @@ public class EmailServiceImpl implements EmailService {
}
@Override
public
void
sendAttachmentsMail
(
String
to
,
String
cc
,
String
name
)
throws
MessagingException
{
public
int
sendAttachmentsMail
(
String
to
,
String
cc
,
String
name
)
{
String
[]
toUsers
=
to
.
split
(
","
);
String
[]
ccUsers
=
cc
.
split
(
","
);
try
{
...
...
@@ -101,8 +101,19 @@ public class EmailServiceImpl implements EmailService {
}
validCcMails
.
add
(
ccMail
);
}
sendAttachMail
((
String
[])
validToMails
.
toArray
(),(
String
[])
validCcMails
.
toArray
(),
name
);
try
{
sendAttachMail
((
String
[])
validToMails
.
toArray
(),(
String
[])
validCcMails
.
toArray
(),
name
);
}
catch
(
MessagingException
e
){
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
());
return
Constants
.
FAIL
;
}
}
catch
(
MessagingException
e
){
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
());
return
Constants
.
FAIL
;
}
return
Constants
.
SUCCESS
;
}
@Override
...
...
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