From a2a6884c3b9dfdbd739c06a673dff4f4e7417892 Mon Sep 17 00:00:00 2001 From: zhangwenqing Date: Mon, 14 Jan 2019 12:02:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9P2P=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E9=85=8D=E7=BD=AE=E5=AF=BC=E5=85=A5=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=89=B9=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/util/excel/ExportExcel.java | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/nis/util/excel/ExportExcel.java b/src/main/java/com/nis/util/excel/ExportExcel.java index 810a34542..4c66b11b8 100644 --- a/src/main/java/com/nis/util/excel/ExportExcel.java +++ b/src/main/java/com/nis/util/excel/ExportExcel.java @@ -495,16 +495,21 @@ public class ExportExcel { commentStr=""; List dict=DictUtils.getDictList("DO_LOG"); if(dict !=null && dict.size()>0){ - String configDoLog = service.getConfigDoLog(); - String doLogOption = configDoLog.substring(configDoLog.indexOf(";"), configDoLog.lastIndexOf(";")); - for (SysDataDictionaryItem sysDataDictionaryItem : dict) { - String itemCode = sysDataDictionaryItem.getItemCode(); - if(doLogOption.contains(itemCode)) { - commentStr=commentStr+itemCode+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n"; - index++; + if(StringUtil.isEmpty(service.getConfigDoLog())){ + headerStr=""; + commentStr=""; + }else{ + String configDoLog = service.getConfigDoLog(); + String doLogOption = configDoLog.substring(configDoLog.indexOf(";"), configDoLog.lastIndexOf(";")); + for (SysDataDictionaryItem sysDataDictionaryItem : dict) { + String itemCode = sysDataDictionaryItem.getItemCode(); + if(doLogOption.contains(itemCode)) { + commentStr=commentStr+itemCode+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue(),sysDataDictionaryItem.getItemValue())+")\n"; + index++; + } } + defaultValue = configDoLog.substring(configDoLog.lastIndexOf(";")+1); } - defaultValue = configDoLog.substring(configDoLog.lastIndexOf(";")+1); } commentStr=msgProp.getProperty("select")+":\n"+commentStr; index++; @@ -1288,7 +1293,11 @@ public class ExportExcel { commentStr=commentStr+msgProp.getProperty("rule_desc_tip")+":\n"; index++; //2、默认值说明 - commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":0\n"; + if(region.getDictId().equals(159)) { // P2P文件标识配置 + commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":1\n"; + }else { + commentStr=commentStr+"▶"+msgProp.getProperty("default_value")+":0\n"; + } index++; } } @@ -1318,10 +1327,19 @@ public class ExportExcel { } }else{ for (SysDataDictionaryItem sysDataDictionaryItem : isCaseSenstive) { - if(sysDataDictionaryItem.getItemCode().equals("1")){ - commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; - list.add(sysDataDictionaryItem.getItemCode()); - index++; + if(region.getDictId().equals(159)) { // P2P文件标识配置 + if(sysDataDictionaryItem.getItemCode().equals("0")){ + commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; + list.add(sysDataDictionaryItem.getItemCode()); + index++; + } + }else { + if(sysDataDictionaryItem.getItemCode().equals("1")){ + commentStr=commentStr+sysDataDictionaryItem.getItemCode()+"("+msgProp.getProperty(sysDataDictionaryItem.getItemValue())+")"+"\n"; + list.add(sysDataDictionaryItem.getItemCode()); + index++; + } + } } }