浏览代码

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 年之前
父节点
当前提交
a2fda08b6d

+ 6 - 2
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExaminationBasicServiceImpl.java

@@ -450,9 +450,15 @@ public class ExaminationBasicServiceImpl extends BaseServiceImpl<Long, Examinati
     @Override
     public Map<String, Object> getHomePageExams(Integer organId) {
         Map<String, Object> result=new HashMap<>();
+
         List<Integer> childOrganIds = organizationService.getChildOrganIds(organId, true);
+
+        ExamStatisticsDto tenantExamStatistics = examinationBasicDao.getTenantExamStatistics(childOrganIds);
+        result.put("statistics", tenantExamStatistics);
+
         List<ExaminationBasicDto> dataList = examinationBasicDao.getUnderwayExams(organId,childOrganIds);
         if(CollectionUtils.isEmpty(dataList)){
+            result.put("exams", Collections.EMPTY_LIST);
             return result;
         }
 
@@ -476,8 +482,6 @@ public class ExaminationBasicServiceImpl extends BaseServiceImpl<Long, Examinati
             examinationBasicDto.setTotalPaymentAmount(totalPaymentAmount);
         }
         result.put("exams", dataList);
-        ExamStatisticsDto tenantExamStatistics = examinationBasicDao.getTenantExamStatistics(childOrganIds);
-        result.put("statistics", tenantExamStatistics);
         return result;
     }
 

+ 1 - 1
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExaminationBasicMapper.xml

@@ -304,7 +304,7 @@
 				)
 		</if>
 		ORDER BY
-		create_time_ DESC
+		eb.id_
 		LIMIT 6;
 	</select>
 

+ 6 - 1
edu-util/src/main/java/com/keao/edu/util/excel/POIUtil.java

@@ -17,6 +17,7 @@ import java.util.Map.Entry;
 
 import org.apache.commons.beanutils.NestedNullException;
 import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFCellStyle;
 import org.apache.poi.hssf.usermodel.HSSFFont;
@@ -478,6 +479,7 @@ public class POIUtil {
 			rowIter = sheet.iterator();
 			while (rowIter.hasNext()) {
 				Map<String, Object> obj = null;
+				boolean hasVal = false;
 				// 获取当前行
 				row = rowIter.next();
 				if (row != null) {
@@ -511,11 +513,14 @@ public class POIUtil {
 						cell = cellIter.next();
 						cell.setCellType(Cell.CELL_TYPE_STRING);
 						String fieldValue = cell.getStringCellValue();
+						if(StringUtils.isNotBlank(fieldValue)){
+							hasVal  = true;
+						}
 						obj.put(fieldsName[currentCellNum], fieldValue);
 						currentCellNum++;
 					}
 				}
-				if (obj != null)
+				if (obj != null && hasVal)
 					datas.add(obj);
 
 			}