diff --git a/archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesServiceImpl.java b/archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesServiceImpl.java index b1067f5..84fd5f6 100644 --- a/archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesServiceImpl.java +++ b/archives/src/main/java/com/storeroom/modules/archives/service/impl/ArchivesServiceImpl.java @@ -154,11 +154,11 @@ public class ArchivesServiceImpl implements ArchivesService { insertFiled +=archivesDictionary.getFieldName()+","; insertValue += archivesDictionary.getIsDataType() == 1 ? null == json.get(archivesDictionary.getFieldName()) || "null".equals(json.get(archivesDictionary.getFieldName())+"") ? null+"," : "'"+json.get(archivesDictionary.getFieldName())+"'," - : json.get(archivesDictionary.getFieldName()) +","; + : StringUtils.isEmpty(json.get(archivesDictionary.getFieldName())+"") ? null +"," : json.get(archivesDictionary.getFieldName()) +","; }else { String thisValue = archivesDictionary.getIsDataType() == 1 ? json.get(archivesDictionary.getFieldName()) == null || "null".equals(json.get(archivesDictionary.getFieldName())+"") ? null : "'" + json.get(archivesDictionary.getFieldName()) + "'" - : json.get(archivesDictionary.getFieldName()) + ""; + : StringUtils.isEmpty(json.get(archivesDictionary.getFieldName())+"") ? null : json.get(archivesDictionary.getFieldName()) + ""; updateValue += archivesDictionary.getFieldName() + "=" + thisValue + ","; } } @@ -207,7 +207,7 @@ public class ArchivesServiceImpl implements ArchivesService { archivesSummary.setRetention(json.get("retention")==null?null:json.get("retention")+""); //归档年度 if(filedNameList.contains("archive_year")) - archivesSummary.setArchiveYear(json.get("archive_year")==null?null:Integer.parseInt(json.get("archive_year")+"")); + archivesSummary.setArchiveYear(json.get("archive_year")==null || "".equals(json.get("archive_year")) ? null:Integer.parseInt(json.get("archive_year")+"")); //责任人 if(filedNameList.contains("responsibleby")) archivesSummary.setResponsibleby(json.get("responsibleby")==null?null:json.get("responsibleby")+""); @@ -232,6 +232,7 @@ public class ArchivesServiceImpl implements ArchivesService { @Override public Object editFile(ArchivesDTO dto) { + return null; }