xiatian 1 gadu atpakaļ
vecāks
revīzija
465d0b3258

+ 4 - 1
examcloud-core-questions-api-provider/src/main/java/cn/com/qmth/examcloud/core/questions/api/controller/CopyDataController.java

@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.constraints.NotNull;
 
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -116,7 +117,9 @@ public class CopyDataController extends ControllerSupport {
 				} catch (Exception e) {
 					code = (row.getCell(0).getNumericCellValue() + "").trim();
 				}
-				list.add(code);
+				if(StringUtils.isNotBlank(code)) {
+					list.add(code);
+				}
 			}
 		} catch (IOException e) {
 			throw new RuntimeException(e);