Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
4df06171
Commit
4df06171
authored
Nov 22, 2023
by
tianhongyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'V20230915' of
http://192.168.60.201/root/dsk-operate-sys
into V20230915
parents
130390bc
77fe4119
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
14 deletions
+17
-14
application-prod.yml
dsk-admin/src/main/resources/application-prod.yml
+1
-0
ExportController.java
...main/java/com/dsk/search/controller/ExportController.java
+3
-3
ExportService.java
...i/src/main/java/com/dsk/search/service/ExportService.java
+6
-6
SysRoleServiceImpl.java
.../java/com/dsk/system/service/impl/SysRoleServiceImpl.java
+7
-5
No files found.
dsk-admin/src/main/resources/application-prod.yml
View file @
4df06171
...
...
@@ -190,3 +190,4 @@ sms:
territory
:
ap-guangzhou
dsk
:
exportBackUrl
:
https://szhapi.jiansheku.com/export/backUrl
\ No newline at end of file
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/controller/ExportController.java
View file @
4df06171
...
...
@@ -52,7 +52,6 @@ public class ExportController {
public
AjaxResult
enterpriseInfoExport
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
if
(
null
==
compose
.
getAptitudeQueryDto
()
||
CollectionUtils
.
isEmpty
(
compose
.
getAptitudeQueryDto
().
getAptitudeDtoList
())
||
!
ObjectUtils
.
hasValueThroughObj
(
compose
.
getAptitudeQueryDto
(),
null
,
Arrays
.
asList
(
"and"
,
"or"
,
"yes"
,
"no"
,
"level"
,
"qualification"
,
"new"
,
"only"
)))
{
return
AjaxResult
.
warn
(
"导出筛选条件为空!"
);
}
...
...
@@ -60,6 +59,7 @@ public class ExportController {
object
.
put
(
"exportExeclName"
,
"企业基本信息导出"
);
}
object
.
put
(
"exportTemplateName"
,
"szh-enterprise-info.xlsx"
);
object
.
put
(
"exportStartRow"
,
3
);
return
exportService
.
enterpriseInfoExport
(
object
);
}
...
...
@@ -70,14 +70,14 @@ public class ExportController {
public
AjaxResult
enterpriseAptitudeExport
(
@RequestBody
JSONObject
object
)
{
ComposeQueryDto
compose
=
JSONObject
.
parseObject
(
object
.
toJSONString
(),
ComposeQueryDto
.
class
);
if
(
null
==
compose
.
getAptitudeQueryDto
()
||
CollectionUtils
.
isEmpty
(
compose
.
getAptitudeQueryDto
().
getAptitudeDtoList
())
||
!
ObjectUtils
.
hasValueThroughObj
(
compose
.
getAptitudeQueryDto
().
getAptitudeDtoList
().
get
(
0
),
null
,
Arrays
.
asList
(
"and"
,
"or"
,
"yes"
,
"no"
,
"level"
,
"qualification"
,
"new"
,
"only"
)))
{
||
!
ObjectUtils
.
hasValueThroughObj
(
compose
.
getAptitudeQueryDto
(),
null
,
Arrays
.
asList
(
"and"
,
"or"
,
"yes"
,
"no"
,
"level"
,
"qualification"
,
"new"
,
"only"
)))
{
return
AjaxResult
.
warn
(
"导出筛选条件为空!"
);
}
if
(
StringUtils
.
isEmpty
(
compose
.
getExportExeclName
())){
object
.
put
(
"exportExeclName"
,
"企业资质信息导出"
);
}
object
.
put
(
"exportTemplateName"
,
"szh-cert-info.xlsx"
);
object
.
put
(
"exportStartRow"
,
3
);
return
exportService
.
enterpriseAptitudeExport
(
object
);
}
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/service/ExportService.java
View file @
4df06171
...
...
@@ -46,7 +46,7 @@ public class ExportService {
//企业基本信息导出
public
AjaxResult
enterpriseInfoExport
(
JSONObject
object
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
());
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
()
.
concat
(
Constants
.
SUFFIX_XLSX
)
);
fileRecord
.
setType
(
1
);
//生成中
fileRecord
.
setStatus
(
2
);
...
...
@@ -62,7 +62,7 @@ public class ExportService {
//企业资质导出
public
AjaxResult
enterpriseAptitudeExport
(
JSONObject
object
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
());
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
()
.
concat
(
Constants
.
SUFFIX_XLSX
)
);
fileRecord
.
setType
(
1
);
//生成中
fileRecord
.
setStatus
(
2
);
...
...
@@ -78,7 +78,7 @@ public class ExportService {
//重点项目清单
public
AjaxResult
importantExport
(
JSONObject
object
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
());
fileRecord
.
setFileName
(
object
.
get
(
"exportExeclName"
).
toString
()
.
concat
(
Constants
.
SUFFIX_XLSX
)
);
fileRecord
.
setType
(
1
);
//生成中
fileRecord
.
setStatus
(
2
);
...
...
@@ -94,7 +94,7 @@ public class ExportService {
//集团成员导出
public
AjaxResult
memberListExport
(
JskCombineSearchDto
dto
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
dto
.
getExportExeclName
());
fileRecord
.
setFileName
(
dto
.
getExportExeclName
()
.
concat
(
Constants
.
SUFFIX_XLSX
)
);
fileRecord
.
setType
(
1
);
//生成中
fileRecord
.
setStatus
(
2
);
...
...
@@ -110,7 +110,7 @@ public class ExportService {
//集团中标业绩导出
public
AjaxResult
exportWinBid
(
JskCombineSearchDto
dto
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
dto
.
getExportExeclName
());
fileRecord
.
setFileName
(
dto
.
getExportExeclName
()
.
concat
(
Constants
.
SUFFIX_XLSX
)
);
fileRecord
.
setType
(
1
);
//生成中
fileRecord
.
setStatus
(
2
);
...
...
@@ -126,7 +126,7 @@ public class ExportService {
//集团招标业绩
public
AjaxResult
exportBid
(
JskCombineSearchDto
dto
)
{
SysUserFileRecord
fileRecord
=
new
SysUserFileRecord
();
fileRecord
.
setFileName
(
dto
.
getExportExeclName
());
fileRecord
.
setFileName
(
dto
.
getExportExeclName
()
.
concat
(
Constants
.
SUFFIX_XLSX
)
);
fileRecord
.
setType
(
1
);
//生成中
fileRecord
.
setStatus
(
2
);
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysRoleServiceImpl.java
View file @
4df06171
...
...
@@ -406,15 +406,15 @@ public class SysRoleServiceImpl implements ISysRoleService {
*/
@Override
public
int
deleteAuthUser
(
SysUserRole
userRole
)
{
//校验企业管理员角色下是否至少有一个账号
checkAdminHasUsers
(
userRole
.
getRoleId
());
//若该账号仅有一个角色,则不允许取消授权
SysUser
sysUser
=
userMapper
.
selectUserById
(
userRole
.
getUserId
());
if
(
sysUser
.
getRoles
().
size
()
==
1
)
{
throw
new
ServiceException
(
"至少保留一个角色在该账号下"
);
}
//校验企业管理员角色下是否至少有一个账号
checkAdminHasUsers
(
userRole
.
getRoleId
());
int
rows
=
userRoleMapper
.
delete
(
new
LambdaQueryWrapper
<
SysUserRole
>()
.
eq
(
SysUserRole:
:
getRoleId
,
userRole
.
getRoleId
())
.
eq
(
SysUserRole:
:
getUserId
,
userRole
.
getUserId
()));
...
...
@@ -433,6 +433,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
*/
@Override
public
int
deleteAuthUsers
(
Long
roleId
,
Long
[]
userIds
)
{
//校验企业管理员角色下是否至少有一个账号
Integer
users
=
checkAdminHasUsers
(
roleId
);
//若该账号仅有一个角色,则不允许取消授权
StringBuilder
lackRoleAccount
=
new
StringBuilder
();
for
(
Long
userId
:
userIds
)
{
...
...
@@ -441,13 +444,12 @@ public class SysRoleServiceImpl implements ISysRoleService {
lackRoleAccount
.
append
(
sysUser
.
getUserName
()).
append
(
","
);
}
}
//将缺少角色的账号返回给前端
if
(
lackRoleAccount
.
toString
().
contains
(
","
))
{
throw
new
ServiceException
(
lackRoleAccount
.
substring
(
0
,
lackRoleAccount
.
length
()-
1
));
}
//校验企业管理员角色下是否至少有一个账号
Integer
users
=
checkAdminHasUsers
(
roleId
);
//如果取消授权企业管理员角色下所有账号,则抛异常
if
(
users
!=
null
&&
userIds
.
length
==
users
)
{
throw
new
ServiceException
(
"至少要保留一个账号在企业管理员角色下!"
);
...
...
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