|
@@ -880,6 +880,9 @@ public class WbsTreeContractController extends BladeController {
|
|
|
sql = "update " + byId.getInitTableName() + " set ";
|
|
|
//导入的数据
|
|
|
Set<Map.Entry<String, String>> entries = stringStringMap.entrySet();
|
|
|
+ if(entries.isEmpty()){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
Map<String, Object> finalInitId = initId;
|
|
|
entries.forEach(f -> {
|
|
@@ -921,6 +924,9 @@ public class WbsTreeContractController extends BladeController {
|
|
|
sql = sql + sb + "where id = " + initId.get("id");
|
|
|
} else {
|
|
|
Set<String> strings = stringStringMap.keySet();
|
|
|
+ if(strings.isEmpty()){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
Collection<String> values = stringStringMap.values();
|
|
|
//转换成sql能够使用的字符串
|
|
|
ArrayList<String> strings1 = new ArrayList<>();
|
|
@@ -952,6 +958,8 @@ public class WbsTreeContractController extends BladeController {
|
|
|
}
|
|
|
}
|
|
|
return R.success("ok");
|
|
|
+ } catch (IndexOutOfBoundsException e) {
|
|
|
+ return R.fail("导入失败,请检查导入表格:是否有修改导入模板(如:拆分、合并、增加或减少行列)、本次导入模版是否统一。");
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
|
} finally {
|