Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
5b15f04a
Commit
5b15f04a
authored
Feb 25, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
815440f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
15 deletions
+36
-15
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+36
-15
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
5b15f04a
...
@@ -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
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment