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
a0e6e63e
Commit
a0e6e63e
authored
May 07, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
5cb748fc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
38 deletions
+49
-38
workspace.xml
.idea/workspace.xml
+1
-1
workspace.xml
lib/java/bi-report-service/.idea/workspace.xml
+31
-32
EmailServiceImpl.java
...ei/data/gateway/server/service/impl/EmailServiceImpl.java
+2
-2
ExcelServiceImpl.java
...ei/data/gateway/server/service/impl/ExcelServiceImpl.java
+1
-1
DateUtils.java
...in/java/com/gmei/data/gateway/server/utils/DateUtils.java
+14
-2
No files found.
.idea/workspace.xml
View file @
a0e6e63e
...
...
@@ -124,7 +124,7 @@
<workItem
from=
"1588220085338"
duration=
"7993000"
/>
<workItem
from=
"1588248522289"
duration=
"2820000"
/>
<workItem
from=
"1588344251422"
duration=
"21636000"
/>
<workItem
from=
"1588761853482"
duration=
"
1400
000"
/>
<workItem
from=
"1588761853482"
duration=
"
3655
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"add init codes."
>
<created>
1587723565207
</created>
...
...
lib/java/bi-report-service/.idea/workspace.xml
View file @
a0e6e63e
...
...
@@ -85,7 +85,20 @@
<command
value=
"mvn clean"
/>
</option>
</component>
<component
name=
"RunManager"
selected=
"JUnit.SparksqlServiceTest"
>
<component
name=
"RunManager"
selected=
"Application.DateUtils"
>
<configuration
name=
"DateUtils"
type=
"Application"
factoryName=
"Application"
temporary=
"true"
nameIsGenerated=
"true"
>
<option
name=
"MAIN_CLASS_NAME"
value=
"com.gmei.data.gateway.server.utils.DateUtils"
/>
<module
name=
"service-server"
/>
<extension
name=
"coverage"
>
<pattern>
<option
name=
"PATTERN"
value=
"com.gmei.data.gateway.server.utils.*"
/>
<option
name=
"ENABLED"
value=
"true"
/>
</pattern>
</extension>
<method
v=
"2"
>
<option
name=
"Make"
enabled=
"true"
/>
</method>
</configuration>
<configuration
default=
"true"
type=
"ClojureREPL"
factoryName=
"Local"
activateToolWindowBeforeRun=
"false"
>
<setting
name=
"replType"
value=
"NREPL"
/>
<setting
name=
"execution"
value=
"LEININGEN"
/>
...
...
@@ -120,22 +133,6 @@
<option
name=
"Make"
enabled=
"true"
/>
</method>
</configuration>
<configuration
name=
"BiReportServiceTest.testSendAttachmentsMail"
type=
"JUnit"
factoryName=
"JUnit"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"service-server"
/>
<extension
name=
"coverage"
>
<pattern>
<option
name=
"PATTERN"
value=
"com.gmei.data.gateway.server.service.*"
/>
<option
name=
"ENABLED"
value=
"true"
/>
</pattern>
</extension>
<option
name=
"PACKAGE_NAME"
value=
"com.gmei.data.gateway.server.service"
/>
<option
name=
"MAIN_CLASS_NAME"
value=
"com.gmei.data.gateway.server.service.BiReportServiceTest"
/>
<option
name=
"METHOD_NAME"
value=
"testSendAttachmentsMail"
/>
<option
name=
"TEST_OBJECT"
value=
"method"
/>
<method
v=
"2"
>
<option
name=
"Make"
enabled=
"true"
/>
</method>
</configuration>
<configuration
name=
"ExcelServiceTest.testGenExcel"
type=
"JUnit"
factoryName=
"JUnit"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"service-server"
/>
<extension
name=
"coverage"
>
...
...
@@ -192,11 +189,11 @@
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"Application.DateUtils"
/>
<item
itemvalue=
"JUnit.SparksqlServiceTest"
/>
<item
itemvalue=
"JUnit.SparksqlServiceTest.testGenExcel"
/>
<item
itemvalue=
"JUnit.ExcelServiceTest.testGenExcel"
/>
<item
itemvalue=
"JUnit.BiReportServiceTest"
/>
<item
itemvalue=
"JUnit.BiReportServiceTest.testSendAttachmentsMail"
/>
</list>
</recent_temporary>
</component>
...
...
@@ -219,6 +216,7 @@
<workItem
from=
"1588154601852"
duration=
"28557000"
/>
<workItem
from=
"1588344252163"
duration=
"15923000"
/>
<workItem
from=
"1588762492573"
duration=
"403000"
/>
<workItem
from=
"1588837331043"
duration=
"497000"
/>
</task>
<servers
/>
</component>
...
...
@@ -288,30 +286,30 @@
</state>
<state
x=
"553"
y=
"153"
key=
"CommitChangelistDialog2/246.1080.1920.1151/0.22.1920.1058@0.22.1920.1058"
timestamp=
"1584956237641"
/>
<state
x=
"784"
y=
"1223"
key=
"CommitChangelistDialog2/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588154132365"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1588
761074648
"
>
<screen
x=
"
0"
y=
"22"
width=
"1920"
height=
"1129
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1588
837938683
"
>
<screen
x=
"
246"
y=
"1080"
width=
"1920"
height=
"1151
"
/>
</state>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.bottom/0.22.1920.1129@0.22.1920.1129"
timestamp=
"1588761074648"
/>
<state
width=
"1878"
height=
"321"
key=
"GridCell.Tab.0.bottom/246.1080.1920.1151/0.22.1920.1058@0.22.1920.1058"
timestamp=
"1584688137007"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.bottom/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
756924804
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.center"
timestamp=
"1588
761074647
"
>
<screen
x=
"
0"
y=
"22"
width=
"1920"
height=
"1129
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.bottom/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
837938683
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.center"
timestamp=
"1588
837938682
"
>
<screen
x=
"
246"
y=
"1080"
width=
"1920"
height=
"1151
"
/>
</state>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.center/0.22.1920.1129@0.22.1920.1129"
timestamp=
"1588761074647"
/>
<state
width=
"1878"
height=
"321"
key=
"GridCell.Tab.0.center/246.1080.1920.1151/0.22.1920.1058@0.22.1920.1058"
timestamp=
"1584688137005"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.center/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
756924803
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.left"
timestamp=
"1588
761074647
"
>
<screen
x=
"
0"
y=
"22"
width=
"1920"
height=
"1129
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.center/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
837938682
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.left"
timestamp=
"1588
837938682
"
>
<screen
x=
"
246"
y=
"1080"
width=
"1920"
height=
"1151
"
/>
</state>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.left/0.22.1920.1129@0.22.1920.1129"
timestamp=
"1588761074647"
/>
<state
width=
"1878"
height=
"321"
key=
"GridCell.Tab.0.left/246.1080.1920.1151/0.22.1920.1058@0.22.1920.1058"
timestamp=
"1584688137005"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.left/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
75692480
2"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.right"
timestamp=
"1588
761074648
"
>
<screen
x=
"
0"
y=
"22"
width=
"1920"
height=
"1129
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.left/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
83793868
2"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.right"
timestamp=
"1588
837938683
"
>
<screen
x=
"
246"
y=
"1080"
width=
"1920"
height=
"1151
"
/>
</state>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.right/0.22.1920.1129@0.22.1920.1129"
timestamp=
"1588761074648"
/>
<state
width=
"1878"
height=
"321"
key=
"GridCell.Tab.0.right/246.1080.1920.1151/0.22.1920.1058@0.22.1920.1058"
timestamp=
"1584688137006"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.right/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
756924804
"
/>
<state
width=
"1878"
height=
"243"
key=
"GridCell.Tab.0.right/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
837938683
"
/>
<state
width=
"1878"
height=
"319"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1588216559611"
>
<screen
x=
"246"
y=
"1080"
width=
"1920"
height=
"1151"
/>
</state>
...
...
@@ -332,10 +330,10 @@
<screen
x=
"0"
y=
"22"
width=
"1920"
height=
"1058"
/>
</state>
<state
x=
"560"
y=
"291"
key=
"Vcs.Push.Dialog.v2/246.1080.1920.1151/0.22.1920.1058@0.22.1920.1058"
timestamp=
"1584949293518"
/>
<state
x=
"715"
y=
"1270"
width=
"670"
height=
"675"
key=
"run.anything.popup"
timestamp=
"1588
756924830
"
>
<state
x=
"715"
y=
"1270"
width=
"670"
height=
"675"
key=
"run.anything.popup"
timestamp=
"1588
837938694
"
>
<screen
x=
"246"
y=
"1080"
width=
"1920"
height=
"1151"
/>
</state>
<state
x=
"469"
y=
"208"
width=
"670"
height=
"663"
key=
"run.anything.popup/0.22.1920.1129@0.22.1920.1129"
timestamp=
"1588345465540"
/>
<state
x=
"715"
y=
"1270"
width=
"670"
height=
"675"
key=
"run.anything.popup/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
756924830
"
/>
<state
x=
"715"
y=
"1270"
width=
"670"
height=
"675"
key=
"run.anything.popup/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151"
timestamp=
"1588
837938694
"
/>
</component>
</project>
\ No newline at end of file
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/EmailServiceImpl.java
View file @
a0e6e63e
...
...
@@ -62,8 +62,8 @@ public class EmailServiceImpl implements EmailService {
String
[]
bccUsers
=
bcc
.
split
(
","
);
helper
.
setBcc
(
bccUsers
);
}
String
fileName
=
subject
+
"-"
+
DateUtils
.
get
Current
DateSimpleStr
()
+
".xlsx"
;
String
fileNameSrc
=
name
+
"-"
+
DateUtils
.
get
Current
DateSimpleStr
()
+
".xlsx"
;
String
fileName
=
subject
+
"-"
+
DateUtils
.
get
Yesterday
DateSimpleStr
()
+
".xlsx"
;
String
fileNameSrc
=
name
+
"-"
+
DateUtils
.
get
Yesterday
DateSimpleStr
()
+
".xlsx"
;
FileSystemResource
file
=
new
FileSystemResource
(
new
File
(
filePath
+
fileNameSrc
));
helper
.
addAttachment
(
fileName
,
file
);
//helper.addAttachment(MimeUtility.encodeWord(file.getFilename(),"utf-8","B"), file);
...
...
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/service/impl/ExcelServiceImpl.java
View file @
a0e6e63e
...
...
@@ -68,7 +68,7 @@ public class ExcelServiceImpl implements ExcelService {
// subject = name;
// }
try
{
FileOutputStream
out
=
new
FileOutputStream
(
filePath
+
name
+
"-"
+
DateUtils
.
get
Current
DateSimpleStr
()
+
".xlsx"
);
FileOutputStream
out
=
new
FileOutputStream
(
filePath
+
name
+
"-"
+
DateUtils
.
get
Yesterday
DateSimpleStr
()
+
".xlsx"
);
wb
.
write
(
out
);
out
.
close
();
}
catch
(
IOException
e
)
{
...
...
lib/java/bi-report-service/service-server/src/main/java/com/gmei/data/gateway/server/utils/DateUtils.java
View file @
a0e6e63e
package
com
.
gmei
.
data
.
gateway
.
server
.
utils
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
/**
...
...
@@ -32,7 +33,18 @@ public class DateUtils {
* 获取当前时间字符串
* @return
*/
public
static
String
getCurrentDateSimpleStr
()
{
return
new
SimpleDateFormat
(
DATE_FORMATE_YMD_SIMPLE
).
format
(
new
Date
());
// public static String getCurrentDateSimpleStr() {
// return new SimpleDateFormat(DATE_FORMATE_YMD_SIMPLE).format(new Date());
// }
/**
* 获取昨天的日期字符串
* @return
*/
public
static
String
getYesterdayDateSimpleStr
()
{
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
setTime
(
new
Date
());
instance
.
add
(
Calendar
.
DAY_OF_MONTH
,-
1
);
return
new
SimpleDateFormat
(
DATE_FORMATE_YMD_SIMPLE
).
format
(
instance
.
getTime
());
}
}
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