Commit a0e6e63e authored by 赵建伟's avatar 赵建伟

update codes

parent 5cb748fc
......@@ -124,7 +124,7 @@
<workItem from="1588220085338" duration="7993000" />
<workItem from="1588248522289" duration="2820000" />
<workItem from="1588344251422" duration="21636000" />
<workItem from="1588761853482" duration="1400000" />
<workItem from="1588761853482" duration="3655000" />
</task>
<task id="LOCAL-00001" summary="add init codes.">
<created>1587723565207</created>
......
......@@ -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="1588761074648">
<screen x="0" y="22" width="1920" height="1129" />
<state width="1878" height="243" key="GridCell.Tab.0.bottom" timestamp="1588837938683">
<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="1588756924804" />
<state width="1878" height="243" key="GridCell.Tab.0.center" timestamp="1588761074647">
<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="1588837938683" />
<state width="1878" height="243" key="GridCell.Tab.0.center" timestamp="1588837938682">
<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="1588756924803" />
<state width="1878" height="243" key="GridCell.Tab.0.left" timestamp="1588761074647">
<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="1588837938682" />
<state width="1878" height="243" key="GridCell.Tab.0.left" timestamp="1588837938682">
<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="1588756924802" />
<state width="1878" height="243" key="GridCell.Tab.0.right" timestamp="1588761074648">
<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="1588837938682" />
<state width="1878" height="243" key="GridCell.Tab.0.right" timestamp="1588837938683">
<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="1588756924804" />
<state width="1878" height="243" key="GridCell.Tab.0.right/246.1080.1920.1151/0.22.1920.1058@246.1080.1920.1151" timestamp="1588837938683" />
<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="1588756924830">
<state x="715" y="1270" width="670" height="675" key="run.anything.popup" timestamp="1588837938694">
<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="1588756924830" />
<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="1588837938694" />
</component>
</project>
\ No newline at end of file
......@@ -62,8 +62,8 @@ public class EmailServiceImpl implements EmailService {
String[] bccUsers = bcc.split(",");
helper.setBcc(bccUsers);
}
String fileName = subject + "-" + DateUtils.getCurrentDateSimpleStr() + ".xlsx";
String fileNameSrc = name + "-" + DateUtils.getCurrentDateSimpleStr() + ".xlsx";
String fileName = subject + "-" + DateUtils.getYesterdayDateSimpleStr() + ".xlsx";
String fileNameSrc = name + "-" + DateUtils.getYesterdayDateSimpleStr() + ".xlsx";
FileSystemResource file = new FileSystemResource(new File(filePath + fileNameSrc));
helper.addAttachment(fileName, file);
//helper.addAttachment(MimeUtility.encodeWord(file.getFilename(),"utf-8","B"), file);
......
......@@ -68,7 +68,7 @@ public class ExcelServiceImpl implements ExcelService {
// subject = name;
// }
try {
FileOutputStream out = new FileOutputStream(filePath + name + "-" + DateUtils.getCurrentDateSimpleStr() + ".xlsx");
FileOutputStream out = new FileOutputStream(filePath + name + "-" + DateUtils.getYesterdayDateSimpleStr() + ".xlsx");
wb.write(out);
out.close();
} catch (IOException e) {
......
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());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment