From fed7c8763f270582f5872b003579ff40a9a1a69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Wed, 12 May 2021 10:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E8=AE=A1=E5=AF=BC?= =?UTF-8?q?=E5=87=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/temp/shenjian/dingding/TaskExport.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/dingding/TaskExport.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/dingding/TaskExport.groovy index 632d6ecb9..a86e1a959 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/dingding/TaskExport.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/dingding/TaskExport.groovy @@ -101,8 +101,14 @@ public class TaskExport { } def total = [] total[2] = "小计" - total[3] = map.get(result[result.size() - 1][0]).get("totalScore") - total[4] = map.get(result[result.size() - 1][0]).get("workTime") + if (map.get(result[result.size() - 1][0]) != null) { + total[3] = map.get(result[result.size() - 1][0]).get("totalScore") + total[4] = map.get(result[result.size() - 1][0]).get("workTime") + } else { + total[3] = 0 + total[4] = 0 + print("无该信息" + result[result.size() - 1][0]) + } result << total for (Map info : map.values()) {