Parcourir la source

徐明浩
下载月度检查记录-数据判空处理

徐明浩 il y a 3 ans
Parent
commit
f79dd3a370

+ 1 - 1
master/src/main/java/com/ruoyi/project/sems/controller/TReportMonthController.java

@@ -135,7 +135,7 @@ public class TReportMonthController extends BaseController
             HistoricTaskInstanceQuery htiq = historyService.createHistoricTaskInstanceQuery();
             List<HistoricTaskInstance> htiLists = htiq.processInstanceId(approveId).finished().orderByHistoricTaskInstanceEndTime().asc().list();
             logger.info("历史任务:" + JSON.toJSONString(htiLists));
-            if( htiLists != null ){
+            if( htiLists != null && htiLists.size() > 0 ){
                 SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                 map.put("jxwxSign",htiLists.get(0).getName());
                 map.put("jxwxEndTime",sdf2.format(htiLists.get(0).getEndTime()));