Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
f7031374
Commit
f7031374
authored
Sep 13, 2023
by
danfuman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zuhuduan' of
http://192.168.60.201/root/dsk-operate-sys
into zuhuduan
parents
be603d50
1d53f458
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
177 additions
and
73 deletions
+177
-73
SysMenuController.java
...java/com/dsk/web/controller/system/SysMenuController.java
+1
-2
CustomerController.java
.../main/java/com/dsk/biz/controller/CustomerController.java
+2
-1
Customer.java
...sk-biz-api/src/main/java/com/dsk/biz/domain/Customer.java
+3
-0
ExcelUtils.java
...k-biz-api/src/main/java/com/dsk/biz/utils/ExcelUtils.java
+134
-0
package.json
dsk-operate-ui/package.json
+0
-1
Navbar.vue
dsk-operate-ui/src/layout/components/Navbar.vue
+7
-2
index.vue
dsk-operate-ui/src/layout/index.vue
+0
-1
tagsView.js
dsk-operate-ui/src/store/modules/tagsView.js
+0
-25
index.vue
...te-ui/src/views/enterpriseData/components/Owner/index.vue
+5
-11
programme.vue
dsk-operate-ui/src/views/enterpriseManagement/programme.vue
+1
-1
details.vue
dsk-operate-ui/src/views/macro/financing/details.vue
+20
-0
index.vue
...rate-ui/src/views/radar/components/MajorProject/index.vue
+1
-0
index.vue
...erate-ui/src/views/radar/components/debtProject/index.vue
+1
-1
ISysMenuService.java
...src/main/java/com/dsk/system/service/ISysMenuService.java
+0
-7
SysMenuServiceImpl.java
.../java/com/dsk/system/service/impl/SysMenuServiceImpl.java
+2
-21
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/system/SysMenuController.java
View file @
f7031374
...
...
@@ -39,8 +39,7 @@ public class SysMenuController extends BaseController {
@SaCheckPermission
(
"system:menu:list"
)
@GetMapping
(
"/list"
)
public
R
<
List
<
SysMenu
>>
list
(
SysMenu
menu
)
{
List
<
SysMenu
>
menus
=
menuService
.
selectAllMenu
(
menu
,
getUserId
());
//List<SysMenu> menus = menuService.selectMenuList(menu, getUserId());
List
<
SysMenu
>
menus
=
menuService
.
selectMenuList
(
menu
,
getUserId
());
return
R
.
ok
(
menus
);
}
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/controller/CustomerController.java
View file @
f7031374
...
...
@@ -9,6 +9,7 @@ import com.dsk.biz.domain.vo.CustomerBusinessListVo;
import
com.dsk.biz.domain.vo.CustomerListVo
;
import
com.dsk.biz.domain.vo.CustomerVo
;
import
com.dsk.biz.service.ICustomerService
;
import
com.dsk.biz.utils.ExcelUtils
;
import
com.dsk.common.annotation.Log
;
import
com.dsk.common.annotation.RepeatSubmit
;
import
com.dsk.common.core.controller.BaseController
;
...
...
@@ -118,7 +119,7 @@ public class CustomerController extends BaseController {
@PostMapping
(
"/importData"
)
// public R<List<String>> importData(@RequestPart("file") MultipartFile file) throws Exception {
public
AjaxResult
importData
(
@RequestPart
(
"file"
)
MultipartFile
file
)
throws
Exception
{
List
<
Customer
>
customerList
=
ExcelUtil
.
importExcel
(
file
.
getInputStream
(),
Customer
.
class
);
List
<
Customer
>
customerList
=
new
ExcelUtils
<>(
Customer
.
class
).
importExcel
(
file
.
getInputStream
(),
2
);
List
<
String
>
resultList
=
new
ArrayList
<>();
int
successCount
=
0
;
for
(
Customer
customer
:
customerList
)
{
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/domain/Customer.java
View file @
f7031374
package
com
.
dsk
.
biz
.
domain
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.dsk.common.annotation.Excel
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -33,6 +35,7 @@ public class Customer implements Serializable {
/**
* 客户名称(企业名称)
*/
@Excel
(
name
=
"企业名称"
)
private
String
companyName
;
/**
* 法定代表人
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/utils/ExcelUtils.java
View file @
f7031374
...
...
@@ -9,9 +9,11 @@ import com.dsk.common.utils.DictUtils;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.file.FileTypeUtils
;
import
com.dsk.common.utils.file.FileUploadUtils
;
import
com.dsk.common.utils.file.FileUtils
;
import
com.dsk.common.utils.file.ImageUtils
;
import
com.dsk.common.utils.poi.ExcelHandlerAdapter
;
import
com.dsk.common.utils.poi.ExcelUtil
;
import
com.dsk.common.utils.reflect.ReflectUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.RegExUtils
;
import
org.apache.commons.lang3.reflect.FieldUtils
;
...
...
@@ -1341,4 +1343,136 @@ public class ExcelUtils<T> {
}
return
method
;
}
/**
* 对excel表单默认第一个索引名转换成list
*
* @param is 输入流
* @param titleNum 标题占用行数
* @return 转换后集合
*/
public
List
<
T
>
importExcel
(
InputStream
is
,
int
titleNum
)
throws
Exception
{
return
importExcel
(
StringUtils
.
EMPTY
,
is
,
titleNum
);
}
/**
* 对excel表单指定表格索引名转换成list
*
* @param sheetName 表格索引名
* @param titleNum 标题占用行数
* @param is 输入流
* @return 转换后集合
*/
public
List
<
T
>
importExcel
(
String
sheetName
,
InputStream
is
,
int
titleNum
)
throws
Exception
{
this
.
type
=
Excel
.
Type
.
IMPORT
;
this
.
wb
=
WorkbookFactory
.
create
(
is
);
List
<
T
>
list
=
new
ArrayList
<
T
>();
// 如果指定sheet名,则取指定sheet中的内容 否则默认指向第1个sheet
Sheet
sheet
=
StringUtils
.
isNotEmpty
(
sheetName
)
?
wb
.
getSheet
(
sheetName
)
:
wb
.
getSheetAt
(
0
);
if
(
sheet
==
null
)
{
throw
new
IOException
(
"文件sheet不存在"
);
}
boolean
isXSSFWorkbook
=
!(
wb
instanceof
HSSFWorkbook
);
Map
<
String
,
PictureData
>
pictures
;
if
(
isXSSFWorkbook
)
{
pictures
=
getSheetPictures07
((
XSSFSheet
)
sheet
,
(
XSSFWorkbook
)
wb
);
}
else
{
pictures
=
getSheetPictures03
((
HSSFSheet
)
sheet
,
(
HSSFWorkbook
)
wb
);
}
// 获取最后一个非空行的行下标,比如总行数为n,则返回的为n-1
int
rows
=
sheet
.
getLastRowNum
();
if
(
rows
>
0
)
{
// 定义一个map用于存放excel列的序号和field.
Map
<
String
,
Integer
>
cellMap
=
new
HashMap
<
String
,
Integer
>();
// 获取表头
Row
heard
=
sheet
.
getRow
(
titleNum
);
for
(
int
i
=
0
;
i
<
heard
.
getPhysicalNumberOfCells
();
i
++)
{
Cell
cell
=
heard
.
getCell
(
i
);
if
(
ObjectUtils
.
isEmpty
(
cell
))
{
cellMap
.
put
(
null
,
i
);
}
else
{
String
value
=
this
.
getCellValue
(
heard
,
i
).
toString
();
cellMap
.
put
(
value
,
i
);
}
}
// 有数据时才处理 得到类的所有field.
List
<
Object
[]>
fields
=
this
.
getFields
();
Map
<
Integer
,
Object
[]>
fieldsMap
=
new
HashMap
<
Integer
,
Object
[]>();
for
(
Object
[]
objects
:
fields
)
{
Excel
attr
=
(
Excel
)
objects
[
1
];
Integer
column
=
cellMap
.
get
(
attr
.
name
());
if
(
column
!=
null
)
{
fieldsMap
.
put
(
column
,
objects
);
}
}
for
(
int
i
=
titleNum
+
1
;
i
<=
rows
;
i
++)
{
// 从第2行开始取数据,默认第一行是表头.
Row
row
=
sheet
.
getRow
(
i
);
// 判断当前行是否是空行
if
(
isRowEmpty
(
row
))
{
continue
;
}
T
entity
=
null
;
for
(
Map
.
Entry
<
Integer
,
Object
[]>
entry
:
fieldsMap
.
entrySet
())
{
Object
val
=
this
.
getCellValue
(
row
,
entry
.
getKey
());
// 如果不存在实例则新建.
entity
=
(
entity
==
null
?
clazz
.
newInstance
()
:
entity
);
// 从map中得到对应列的field.
Field
field
=
(
Field
)
entry
.
getValue
()[
0
];
Excel
attr
=
(
Excel
)
entry
.
getValue
()[
1
];
// 取得类型,并根据对象类型设置值.
Class
<?>
fieldType
=
field
.
getType
();
if
(
String
.
class
==
fieldType
)
{
String
s
=
Convert
.
toStr
(
val
);
if
(
StringUtils
.
endsWith
(
s
,
".0"
))
{
val
=
StringUtils
.
substringBefore
(
s
,
".0"
);
}
else
{
String
dateFormat
=
field
.
getAnnotation
(
Excel
.
class
).
dateFormat
();
if
(
StringUtils
.
isNotEmpty
(
dateFormat
))
{
val
=
parseDateToStr
(
dateFormat
,
val
);
}
else
{
val
=
Convert
.
toStr
(
val
);
}
}
}
else
if
((
Integer
.
TYPE
==
fieldType
||
Integer
.
class
==
fieldType
)
&&
StringUtils
.
isNumeric
(
Convert
.
toStr
(
val
)))
{
val
=
Convert
.
toInt
(
val
);
}
else
if
((
Long
.
TYPE
==
fieldType
||
Long
.
class
==
fieldType
)
&&
StringUtils
.
isNumeric
(
Convert
.
toStr
(
val
)))
{
val
=
Convert
.
toLong
(
val
);
}
else
if
(
Double
.
TYPE
==
fieldType
||
Double
.
class
==
fieldType
)
{
val
=
Convert
.
toDouble
(
val
);
}
else
if
(
Float
.
TYPE
==
fieldType
||
Float
.
class
==
fieldType
)
{
val
=
Convert
.
toFloat
(
val
);
}
else
if
(
BigDecimal
.
class
==
fieldType
)
{
val
=
Convert
.
toBigDecimal
(
val
);
}
else
if
(
Date
.
class
==
fieldType
)
{
if
(
val
instanceof
String
)
{
val
=
DateUtils
.
parseDate
(
val
);
}
else
if
(
val
instanceof
Double
)
{
val
=
DateUtil
.
getJavaDate
((
Double
)
val
);
}
}
else
if
(
Boolean
.
TYPE
==
fieldType
||
Boolean
.
class
==
fieldType
)
{
val
=
Convert
.
toBool
(
val
,
false
);
}
if
(!
ObjectUtils
.
isEmpty
(
fieldType
))
{
String
propertyName
=
field
.
getName
();
if
(
StringUtils
.
isNotEmpty
(
attr
.
targetAttr
()))
{
propertyName
=
field
.
getName
()
+
"."
+
attr
.
targetAttr
();
}
else
if
(
StringUtils
.
isNotEmpty
(
attr
.
readConverterExp
()))
{
val
=
reverseByExp
(
Convert
.
toStr
(
val
),
attr
.
readConverterExp
(),
attr
.
separator
());
}
else
if
(
StringUtils
.
isNotEmpty
(
attr
.
dictType
()))
{
val
=
reverseDictByExp
(
Convert
.
toStr
(
val
),
attr
.
dictType
(),
attr
.
separator
());
}
else
if
(!
attr
.
handler
().
equals
(
ExcelHandlerAdapter
.
class
))
{
val
=
dataFormatHandlerAdapter
(
val
,
attr
);
}
ReflectUtils
.
invokeSetter
(
entity
,
propertyName
,
val
);
}
}
list
.
add
(
entity
);
}
}
return
list
;
}
}
dsk-operate-ui/package.json
View file @
f7031374
...
...
@@ -45,7 +45,6 @@
"element-resize-detector"
:
"^1.2.4"
,
"element-ui"
:
"2.15.12"
,
"file-saver"
:
"2.0.5"
,
"flatted"
:
"^3.2.7"
,
"fuse.js"
:
"6.4.3"
,
"highlight.js"
:
"9.18.5"
,
"jquery"
:
"^3.7.0"
,
...
...
dsk-operate-ui/src/layout/components/Navbar.vue
View file @
f7031374
...
...
@@ -99,6 +99,7 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
localStorage
.
removeItem
(
'views'
)
//清空导航栏上的数据
location
.
href
=
'/index'
;
})
}).
catch
(()
=>
{});
...
...
@@ -110,8 +111,12 @@ export default {
setToken
(
res
.
data
.
token
)
setTenantid
(
id
)
store
.
commit
(
'SET_TOKEN'
,
res
.
data
.
token
)
location
.
reload
();
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
localStorage
.
removeItem
(
'views'
)
//清空导航栏上的数据
if
(
this
.
$route
.
path
==
'/index'
){
location
.
reload
();
}
else
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
}
}
})
}
...
...
dsk-operate-ui/src/layout/index.vue
View file @
f7031374
...
...
@@ -21,7 +21,6 @@ import ResizeMixin from './mixin/ResizeHandler'
import
{
mapState
}
from
'vuex'
import
variables
from
'@/assets/styles/variables.scss'
import
elementResizeDetectorMaker
from
"element-resize-detector"
import
{
parse
,
stringify
}
from
'flatted'
;
export
default
{
name
:
'Layout'
,
components
:
{
...
...
dsk-operate-ui/src/store/modules/tagsView.js
View file @
f7031374
import
{
parse
,
stringify
}
from
'flatted'
;
const
state
=
{
visitedViews
:
[],
cachedViews
:
[],
...
...
@@ -22,28 +21,6 @@ const mutations = {
title
:
view
.
meta
.
title
||
'no-name'
})
)
// console.log(state.visitedViews)
// try {
// stringify(view)
// }catch(e)
// {
//
// }
// console.log(
// localStorage.removeItem('views')
// let views =view
// let viewlist = localStorage.getItem("views")==null?[]:JSON.parse(localStorage.getItem("views"))
// let li = {}
// li.fullPath = view.fullPath
// li.hash = view.hash
// li.meta = view.meta
// li.name = view.name
// li.params = view.params
// li.path = view.path
// li.query = view.query
// viewlist.push(li)
// viewlist.push(parse(stringify(view)))
// localStorage.setItem("views",stringify(viewlist))
},
ADD_CACHED_VIEW
:
(
state
,
view
)
=>
{
if
(
state
.
cachedViews
.
includes
(
view
.
name
))
return
...
...
@@ -55,8 +32,6 @@ const mutations = {
for
(
const
[
i
,
v
]
of
state
.
visitedViews
.
entries
())
{
if
(
v
.
path
===
view
.
path
)
{
state
.
visitedViews
.
splice
(
i
,
1
)
let
visitedViews
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
visitedViews
))
localStorage
.
setItem
(
"views"
,
JSON
.
stringify
(
visitedViews
))
break
}
}
...
...
dsk-operate-ui/src/views/enterpriseData/components/Owner/index.vue
View file @
f7031374
...
...
@@ -582,15 +582,9 @@
},
computed
:
{
checkJskBidQueryDto
()
{
let
arr
=
[];
let
flag
=
false
;
let
data
=
{};
let
arr
=
[];
let
flag
=
false
;
let
data
=
{};
if
(
this
.
domicile
.
length
>
0
)
{
data
=
{
title
:
"行政区划:"
,
...
...
@@ -649,9 +643,9 @@
for
(
var
i
in
arr
)
{
if
(
arr
[
i
].
parent
)
{
if
(
!
arr
[
i
].
parent
.
checked
)
{
arr
[
i
].
hasChildren
&&
cityIds
.
push
(
arr
[
i
].
value
);
arr
[
i
].
hasChildren
&&
cityIds
.
push
(
arr
[
i
].
value
)
&&
provinceIds
.
push
(
arr
[
i
].
parent
.
value
)
;
arr
[
i
].
hasChildren
&&
this
.
domicile
.
push
(
arr
[
i
].
label
);
!
arr
[
i
].
hasChildren
&&
areaIds
.
push
(
arr
[
i
].
value
);
!
arr
[
i
].
hasChildren
&&
areaIds
.
push
(
arr
[
i
].
value
)
&&
cityIds
.
push
(
arr
[
i
].
parent
.
value
)
&&
provinceIds
.
push
(
arr
[
i
].
parent
.
parent
.
value
)
;
!
arr
[
i
].
hasChildren
&&
this
.
domicile
.
push
(
arr
[
i
].
label
);
}
}
else
{
...
...
dsk-operate-ui/src/views/enterpriseManagement/programme.vue
View file @
f7031374
...
...
@@ -336,7 +336,7 @@
checkedKeys
.
forEach
((
v
)
=>
{
v
=
v
.
trim
()
let
nodes
=
this
.
$refs
.
menu
.
getNode
(
v
)
if
(
nodes
.
isLeaf
&&
nodes
.
isLeaf
==
true
){
if
(
nodes
&&
nodes
.
isLeaf
&&
nodes
.
isLeaf
==
true
){
this
.
$refs
.
menu
.
setChecked
(
v
,
true
,
true
);
}
else
{
this
.
$refs
.
menu
.
setChecked
(
v
,
true
,
false
);
...
...
dsk-operate-ui/src/views/macro/financing/details.vue
View file @
f7031374
...
...
@@ -135,6 +135,16 @@
<el-table-column
prop=
"isUsedCapital"
label=
"是否资本金"
width=
"200"
:formatter=
"formatStatus"
/>
</el-table>
</div>
<div
class=
"pagination clearfix"
v-show=
"tableDataTotal>0"
>
<el-pagination
background
:page-size=
"pageSize"
:current-page=
"pageIndex"
@
current-change=
"handleCurrentChange"
layout=
"prev, pager, next"
:total=
"tableDataTotal"
>
</el-pagination>
</div>
</div>
</div>
</template>
...
...
@@ -166,6 +176,10 @@ export default {
this
.
getData
()
})
},
handleCurrentChange
(
pageNum
)
{
this
.
pageIndex
=
pageNum
;
this
.
getData
();
},
getData
(){
// const params = { pageNum: this.pageIndex, pageSize: this.pageSize,specialBondUuid:'2e59fca0-21a6-47db-975d-5481e1c52f45_74'}
const
params
=
{
pageNum
:
this
.
pageIndex
,
pageSize
:
this
.
pageSize
,
specialBondUuid
:
this
.
details
.
specialBondUuid
}
...
...
@@ -210,6 +224,12 @@ export default {
background
:
#FFFFFF
;
padding
:
16px
;
border-radius
:
4px
;
.pagination
{
padding
:
14px
;
.el-pagination
{
float
:
right
;
}
}
}
.common-title
{
margin-bottom
:
8px
;
...
...
dsk-operate-ui/src/views/radar/components/MajorProject/index.vue
View file @
f7031374
...
...
@@ -364,6 +364,7 @@ export default {
this
.
addressListfn
();
this
.
search
();
this
.
getComdtion
();
this
.
getImportantSelect
();
},
methods
:
{
getComdtion
(){
...
...
dsk-operate-ui/src/views/radar/components/debtProject/index.vue
View file @
f7031374
...
...
@@ -14,7 +14,7 @@
</div>
</div>
<div
class=
"content_item "
>
<div
class=
"label"
>
项目
主体
</div>
<div
class=
"label"
>
项目
当事人
</div>
<div
class=
"content_right"
>
<div
class=
"item_ckquery_list"
>
<div
class=
"ckquery_list_right"
>
...
...
dsk-system/src/main/java/com/dsk/system/service/ISysMenuService.java
View file @
f7031374
...
...
@@ -13,13 +13,6 @@ import java.util.Set;
* @author Lion Li
*/
public
interface
ISysMenuService
{
/**
* 根据用户查询全部系统菜单列表
*
* @param userId 用户ID
* @return 菜单列表
*/
List
<
SysMenu
>
selectAllMenu
(
SysMenu
menu
,
Long
userId
);
/**
* 根据用户查询系统菜单列表
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysMenuServiceImpl.java
View file @
f7031374
...
...
@@ -40,25 +40,6 @@ public class SysMenuServiceImpl implements ISysMenuService {
private
final
SysTenantMapper
tenantMapper
;
private
final
SysTenantPackageMapper
tenantPackageMapper
;
/**
* 根据用户查询全部系统菜单列表
*
* @param userId 用户ID
* @return 菜单列表
*/
@Override
public
List
<
SysMenu
>
selectAllMenu
(
SysMenu
menu
,
Long
userId
)
{
List
<
SysMenu
>
menuList
=
null
;
// 管理员显示所有菜单信息
if
(
LoginHelper
.
isSuperAdmin
(
userId
))
{
menuList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
SysMenu
>()
.
like
(
StringUtils
.
isNotBlank
(
menu
.
getMenuName
()),
SysMenu:
:
getMenuName
,
menu
.
getMenuName
())
.
orderByAsc
(
SysMenu:
:
getParentId
)
.
orderByAsc
(
SysMenu:
:
getOrderNum
));
}
return
menuList
;
}
/**
* 根据用户查询系统菜单列表
*
...
...
@@ -83,8 +64,8 @@ public class SysMenuServiceImpl implements ISysMenuService {
if
(
LoginHelper
.
isSuperAdmin
(
userId
))
{
menuList
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
SysMenu
>()
.
like
(
StringUtils
.
isNotBlank
(
menu
.
getMenuName
()),
SysMenu:
:
getMenuName
,
menu
.
getMenuName
())
.
eq
(
SysMenu:
:
getVisible
,
0
)
.
eq
(
SysMenu:
:
getStatus
,
0
)
//
.eq(SysMenu::getVisible, 0)
//
.eq(SysMenu::getStatus, 0)
.
orderByAsc
(
SysMenu:
:
getParentId
)
.
orderByAsc
(
SysMenu:
:
getOrderNum
));
}
else
{
...
...
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