From af870c02bbeff75f86613ff10cefa3844b5bce82 Mon Sep 17 00:00:00 2001 From: zhuyong <123@163.com> Date: Sat, 10 Apr 2021 22:29:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=89=A7=E8=A1=8C=E6=97=B6=E9=97=B4=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flowable/service/impl/FlowTaskServiceImpl.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java index 9f59569..a092231 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java @@ -890,15 +890,11 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask * @return */ private String getDate(long ms) { - int ss = 1000; - int mi = ss * 60; - int hh = mi * 60; - int dd = hh * 24; - - long day = ms / dd; - long hour = (ms - day * dd) / hh; - long minute = (ms - day - hour * hh) / mi; - long second = (ms - day - hour * mi) / ss; + + long day = ms / (24 * 60 * 60 * 1000); + long hour = (ms / (60 * 60 * 1000) - day * 24); + long minute = ((ms / (60 * 1000)) - day * 24 * 60 - hour * 60); + long second = (ms / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60); if (day > 0) { return day + "天" + hour + "小时" + minute + "分钟";