添加导入试题排除空的选项

This commit is contained in:
yangjun 2024-11-15 17:35:54 +08:00
parent ee3971b6ce
commit 7eadfc2b0e
4 changed files with 94 additions and 79 deletions

View File

@ -470,6 +470,7 @@ public class WjxWjxxTmlbController extends JeecgController<WjxWjxxTmlb, IWjxWjxx
List<WjxWjxxImportPage> list = ExcelImportUtil.importExcel(file.getInputStream(), WjxWjxxImportPage.class, params);
int i=0;
for (WjxWjxxImportPage page : list) {
if(StringUtils.isNotBlank(page.getWjTitle())){
i = i+1;
WjxWjxxTmlb po = new WjxWjxxTmlb();
po.setWjLeixing("6");
@ -547,7 +548,8 @@ public class WjxWjxxTmlbController extends JeecgController<WjxWjxxTmlb, IWjxWjxx
}
wjxWjxxTmlbService.saveMain(po, wjxWjxxTmxxList);
}
return Result.OK("文件导入成功!数据行数:" + list.size());
}
return Result.OK("文件导入成功!数据行数:" + i);
} catch (Exception e) {
log.error(e.getMessage(),e);
return Result.error("文件导入失败:"+e.getMessage());

View File

@ -141,9 +141,15 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
# multi-oracle:
# url: jdbc:oracle:thin:@//192.168.2.185:1521/BLXC
# username: test7788
# password: test7788
# url: jdbc:oracle:thin:@//192.168.2.14:1521/orcl
# username: kczx
# password: kczx
# driver-class-name: oracle.jdbc.OracleDriver
# multi-oracle:
# url: jdbc:oracle:thin:@192.168.2.14:1521:orcl?useUnicode=true&characterEncoding=utf8
# username: kczx
# password: kczx
# driver-class-name: oracle.jdbc.OracleDriver
#redis 配置
redis:

View File

@ -137,8 +137,14 @@ spring:
# password: root
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
# multi-oracle:
# url: jdbc:oracle:thin:@202.198.129.24:1521:orcl?useUnicode=true&characterEncoding=utf8
# username: C##XSKC
# password: mAPP2t2ABAfx7
# driver-class-name: oracle.jdbc.OracleDriver
multi-oracle:
url: jdbc:oracle:thin:@202.198.129.24:1521:orcl
url: jdbc:oracle:thin:@//202.198.129.24:1521/orcl
username: C##XSKC
password: mAPP2t2ABAfx7
driver-class-name: oracle.jdbc.OracleDriver

View File

@ -2,4 +2,5 @@ spring:
application:
name: jeecg-system
profiles:
active: '@profile.name@'
#active: '@profile.name@'
active: dev