Commit 5b15f04a authored by tangwei's avatar tangwei

修改bug

parent 815440f3
...@@ -213,15 +213,18 @@ public class ExcelServiceImpl { ...@@ -213,15 +213,18 @@ public class ExcelServiceImpl {
public void commonExport(HttpServletResponse response, ExcelDto excelDto, Map par) { public void commonExport(HttpServletResponse response, ExcelDto excelDto, Map par) {
ReginParams reginParams= getCurrentAllInfo(); // ReginParams reginParams= getCurrentAllInfo();
boolean authFalg= false; // boolean authFalg= false;
if(reginParams ==null) { // if(reginParams ==null) {
authFalg=true; // authFalg=true;
} // }
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode(); // String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
if(org.apache.commons.lang3.StringUtils.isBlank(bizOrgCode)){ // if(org.apache.commons.lang3.StringUtils.isBlank(bizOrgCode)){
authFalg=true; // authFalg=true;
} // }
//效验参数
boolean authFalg=getFlag(par);
switch (excelDto.getType()) { switch (excelDto.getType()) {
case "WHP": case "WHP":
...@@ -259,7 +262,7 @@ public class ExcelServiceImpl { ...@@ -259,7 +262,7 @@ public class ExcelServiceImpl {
FireExpertsDto.class, dataSourcesImpl, false); FireExpertsDto.class, dataSourcesImpl, false);
break; break;
case "SYXX": case "SYXX":
if(authFalg) { if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
WaterResourceDto.class, dataSourcesImpl, false); WaterResourceDto.class, dataSourcesImpl, false);
break; break;
...@@ -286,7 +289,10 @@ public class ExcelServiceImpl { ...@@ -286,7 +289,10 @@ public class ExcelServiceImpl {
AircraftDto.class, dataSourcesImpl, false); AircraftDto.class, dataSourcesImpl, false);
break; break;
case "XFDW": case "XFDW":
if(authFalg) {
if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
FireTeamDto.class, dataSourcesImpl, false); FireTeamDto.class, dataSourcesImpl, false);
break; break;
...@@ -296,7 +302,7 @@ public class ExcelServiceImpl { ...@@ -296,7 +302,7 @@ public class ExcelServiceImpl {
FireTeamDto.class, dataSourcesImpl, false); FireTeamDto.class, dataSourcesImpl, false);
break; break;
case "WXXFZ": case "WXXFZ":
if(authFalg) { if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
FireStationDto.class, null, false); FireStationDto.class, null, false);
break; break;
...@@ -312,7 +318,7 @@ public class ExcelServiceImpl { ...@@ -312,7 +318,7 @@ public class ExcelServiceImpl {
FireStationDto.class, null, false); FireStationDto.class, null, false);
break; break;
case "XFRY": case "XFRY":
if(authFalg) { if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
null, FirefightersExcelDto.class, null, false); null, FirefightersExcelDto.class, null, false);
break; break;
...@@ -328,7 +334,7 @@ public class ExcelServiceImpl { ...@@ -328,7 +334,7 @@ public class ExcelServiceImpl {
maintenancePersonExcelDtoList, MaintenancePersonExcleDto.class, null, false); maintenancePersonExcelDtoList, MaintenancePersonExcleDto.class, null, false);
break; break;
case "KEYSITE": case "KEYSITE":
if(authFalg) { if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
KeySiteExcleDto.class, null, false); KeySiteExcleDto.class, null, false);
break; break;
...@@ -348,7 +354,7 @@ public class ExcelServiceImpl { ...@@ -348,7 +354,7 @@ public class ExcelServiceImpl {
KeySiteExcleDto.class, null, false); KeySiteExcleDto.class, null, false);
break; break;
case "JCDWRY": case "JCDWRY":
if(authFalg) { if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
OrgUsrExcelDto.class, null, false); OrgUsrExcelDto.class, null, false);
break; break;
...@@ -1841,4 +1847,19 @@ public class ExcelServiceImpl { ...@@ -1841,4 +1847,19 @@ public class ExcelServiceImpl {
return JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(keyString, token)).toString(), return JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(keyString, token)).toString(),
ReginParams.class); ReginParams.class);
} }
public boolean getFlag(Map par){
ReginParams reginParams= getCurrentAllInfo();
boolean authFalg= false;
if(reginParams!=null&&reginParams.getPersonIdentity()!=null&&reginParams.getPersonIdentity().getBizOrgCode()!=null) {
authFalg=true;
}
if(authFalg&&par.containsKey("bizOrgCode")&& par.get("bizOrgCode")!=null&&!(par.get("bizOrgCode").toString()).equals("")){
return true;
}
return false;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment