diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsImportListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsImportListener.java index a3df4b3b18..72c9201ca8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsImportListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsImportListener.java @@ -18,6 +18,7 @@ import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.HashMap; @@ -52,6 +53,46 @@ public class DangerousChemicalsImportListener extends AnalysisEventListener NumConstant.FIFTY){ + DangerousChemicalsModel.RowRemarkMessage row = ConvertUtils.sourceToTarget(data, DangerousChemicalsModel.RowRemarkMessage.class); + row.setRowNum(rowNum); + row.setErrorInfo("企业名称长度超出50字限制"); + errorRows.add(row); + } + if (data.getPrincipalMobile().length() > NumConstant.FIFTY){ + DangerousChemicalsModel.RowRemarkMessage row = ConvertUtils.sourceToTarget(data, DangerousChemicalsModel.RowRemarkMessage.class); + row.setRowNum(rowNum); + row.setErrorInfo("联系电话长度超出50字限制"); + errorRows.add(row); + } + if (data.getName().length() > NumConstant.FIFTY){ + DangerousChemicalsModel.RowRemarkMessage row = ConvertUtils.sourceToTarget(data, DangerousChemicalsModel.RowRemarkMessage.class); + row.setRowNum(rowNum); + row.setErrorInfo("经营地址长度超出50字限制"); + errorRows.add(row); + } IcDangerousChemicalsEntity e = ConvertUtils.sourceToTarget(data, IcDangerousChemicalsEntity.class); e.setSourceType("import"); e.setAgencyId(agencyInfo.getId()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java index 4f74294aeb..a56c947429 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/DangerousChemicalsModel.java @@ -48,6 +48,41 @@ public class DangerousChemicalsModel { @Data public static class RowRemarkMessage { + @ExcelProperty(value = "行号") + private Integer rowNum; + + @ColumnWidth(20) + @ExcelProperty(value = "企业名称") + private String name; + + @ColumnWidth(20) + @ExcelProperty(value = "企业类型") + private String categoryName; + + @ColumnWidth(20) + @ExcelProperty(value = "周边安全间距(公里)") + private String safeDistance = NumConstant.ZERO_STR; + + @ColumnWidth(20) + @ExcelProperty(value = "危化品种类") + private String dangerTypeName; + + @ColumnWidth(20) + @ExcelProperty(value = "负责人") + private String principalName; + + @ColumnWidth(20) + @ExcelProperty(value = "联系电话") + private String principalMobile; + + @ColumnWidth(40) + @ExcelProperty(value = "经营地址") + private String address; + + @ColumnWidth(60) + @ExcelProperty(value = "备注") + private String remark; + @ColumnWidth(60) @ExcelProperty("错误信息") private String errorInfo;