From 395bbce86a24138a3534c41c8a568a7c8d97da67 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 10 五月 2023 21:22:24 +0800
Subject: [PATCH] 下载代码修改
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
index 8cf63f9..cb60c65 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
@@ -859,11 +859,16 @@
map.put("DA", s.getDeparture() == null ? "" : s.getDeparture());
Date et = s.getEndtime();
- SimpleDateFormat formatter_et = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- String date_et = formatter_et.format(et);
- String year_et = date_et.substring(0, 4);
- String month_et = date_et.substring(5, 7);
- String day_et = date_et.substring(8, 10);
+ String year_et = null;
+ String month_et = null;
+ String day_et = null;
+ if (et != null) {
+ SimpleDateFormat formatter_et = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ String date_et = formatter_et.format(et);
+ year_et = date_et.substring(0, 4);
+ month_et = date_et.substring(5, 7);
+ day_et = date_et.substring(8, 10);
+ }
map.put("AY", year_et == null ? "" : year_et);
map.put("AM", month_et == null ? "" : month_et);
--
Gitblit v1.9.3