修改日期格式化问题

This commit is contained in:
tangfutang 2021-01-12 16:18:49 +08:00
parent 9e6b752293
commit 1ef2917ea4
6 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ public class InvoiceDownloadServlet extends HttpServlet {
File file = new File(localFile);
if (!file.exists())
throw new Exception("文件不存在");
SimpleDateFormat dateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String filename = contract_no+dateFormat.format(new Date()) + ".pdf";
//String filename = contract_no + ".pdf";
response.setContentType(getServletContext().getMimeType(filename));

View File

@ -125,7 +125,7 @@ public class InvoiceLotDownloadServlet extends HttpServlet {
ARE.getLog().error("AttachmentView SQL Error:", e);
}
}
SimpleDateFormat dateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String filename = dateFormat.format(new Date()) + ".zip";
//String zipFilename ="E:/liuzhaoCopyPDF/"+filename;
String zipFilename =zipLocalPath+"/"+filename;

View File

@ -124,7 +124,7 @@ public class AssetsOffCallBack extends BaseImportExcelCallBack{
boolean flag = false;
String insertSql="";
Date date = new Date();
String date1 = new SimpleDateFormat("YYYY/MM/dd HH:mm:ss").format(date);
String date1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date);
/**
* 校验重复导入

View File

@ -1128,7 +1128,7 @@ public class rentPlanInvoiceDirectManager extends BaseTable{
pdfurl = responseBase.getBody().getPdfurl();
if (confirmResult == null || "".equals(localF)
|| localF == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat("YYYYMMdd");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
String ydm = dateFormat.format(new Date());
path = File.separator + ydm.substring(0, 4)

View File

@ -692,7 +692,7 @@ public class rentPlanInvoiceManager extends BaseTable {
if (confirmResult == null || "".equals(localF)
|| localF == null) {
SimpleDateFormat dateFormat = new SimpleDateFormat(
"YYYYMMdd");
"yyyyMMdd");
String ydm = dateFormat.format(new Date());
path = File.separator + ydm.substring(0, 4)

View File

@ -816,7 +816,7 @@ public class InvoiceManagerController extends BaseTable{
String path="";
if("0".equals(returncode)){
pdfurl = responseBase.getBody().getPdfurl();
SimpleDateFormat dateFormat = new SimpleDateFormat("YYYYMMdd");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
String ydm = dateFormat.format(new Date());
path = File.separator + ydm.substring(0, 4)+File.separator + ydm.substring(4, 6)+File.separator + ydm.substring(6, 8);