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
c9a9cd41
Commit
c9a9cd41
authored
Aug 02, 2023
by
huangjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev20230707' of
http://192.168.60.201/root/dsk-operate-sys
into dev20230707
parents
a549fdd9
d6320625
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1795 additions
and
795 deletions
+1795
-795
ContactInfoController.java
...om/dsk/web/controller/customer/ContactInfoController.java
+4
-4
macro.js
dsk-operate-ui/src/api/macro/macro.js
+42
-0
localEconomy.vue
...e-ui/src/views/macro/economies/component/localEconomy.vue
+2
-2
regionalEconomy.vue
...i/src/views/macro/economies/component/regionalEconomy.vue
+24
-12
sjxmfx.vue
...ui/src/views/macro/nationalEconomies/component/sjxmfx.vue
+34
-604
tdjy.vue
...e-ui/src/views/macro/nationalEconomies/component/tdjy.vue
+899
-0
zhaobiao.vue
.../src/views/macro/nationalEconomies/component/zhaobiao.vue
+635
-0
index.vue
dsk-operate-ui/src/views/macro/nationalEconomies/index.vue
+4
-4
index.vue
dsk-operate-ui/src/views/macro/urban/index.vue
+16
-16
EnterpriseService.java
...ain/java/com/dsk/system/dskService/EnterpriseService.java
+78
-46
IBusinessInfoService.java
...ain/java/com/dsk/system/service/IBusinessInfoService.java
+0
-7
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+9
-58
BusinessRelateCompanyServiceImpl.java
...system/service/impl/BusinessRelateCompanyServiceImpl.java
+24
-38
ContactInfoServiceImpl.java
...a/com/dsk/system/service/impl/ContactInfoServiceImpl.java
+22
-2
ContactInfoMapper.xml
...in/resources/mapper/system/customer/ContactInfoMapper.xml
+2
-2
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/customer/ContactInfoController.java
View file @
c9a9cd41
...
...
@@ -28,7 +28,7 @@ public class ContactInfoController extends BaseController {
/**
* 联系人列表
*/
// @PreAuthorize("@ss.hasPermi('contact:list')")
// @PreAuthorize("@ss.hasPermi('contact:
info:
list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
selectPageList
(
ContactInfoSearchDto
dto
){
startPage
();
...
...
@@ -47,7 +47,7 @@ public class ContactInfoController extends BaseController {
/**
* 添加用户联系人
*/
// @PreAuthorize("@ss.hasPermi('contact:add')")
// @PreAuthorize("@ss.hasPermi('contact:
info:
add')")
@PostMapping
()
@RepeatSubmit
()
public
AjaxResult
add
(
@RequestBody
ContactInfo
baen
){
...
...
@@ -57,7 +57,7 @@ public class ContactInfoController extends BaseController {
/**
* 编辑用户联系人
*/
// @PreAuthorize("@ss.hasPermi('contact:edit')")
// @PreAuthorize("@ss.hasPermi('contact:
info:
edit')")
@PutMapping
()
@RepeatSubmit
()
public
AjaxResult
edit
(
@RequestBody
ContactInfo
baen
){
...
...
@@ -67,7 +67,7 @@ public class ContactInfoController extends BaseController {
/**
* 删除用户联系人
*/
// @PreAuthorize("@ss.hasPermi('contact:del')")
// @PreAuthorize("@ss.hasPermi('contact:
info:
del')")
@DeleteMapping
(
"/{id}"
)
@RepeatSubmit
()
public
AjaxResult
del
(
@PathVariable
(
"id"
)
Long
id
){
...
...
dsk-operate-ui/src/api/macro/macro.js
View file @
c9a9cd41
...
...
@@ -51,6 +51,48 @@ export function getYear() {
})
}
//全国商机项目分析-全国土地交易项目
export
function
countLandMarketByType
(
param
)
{
return
request
({
url
:
'/marketAnalysis/countLandMarketByType'
,
method
:
'POST'
,
data
:
param
})
}
//全国商机项目分析-全国土地交易项目地区TOP10
export
function
countLandMarketByProvince
(
param
)
{
return
request
({
url
:
'/marketAnalysis/countLandMarketByProvince'
,
method
:
'POST'
,
data
:
param
})
}
//全国商机项目分析-全国各地区招标统计TOP10
export
function
countNewsBidByProvince
(
param
)
{
return
request
({
url
:
'/marketAnalysis/countNewsBidByProvince'
,
method
:
'POST'
,
data
:
param
})
}
//全国商机项目分析-全国土地交易项目年份统计
export
function
countLandMarketByYear
()
{
return
request
({
url
:
'/marketAnalysis/countLandMarketByYear'
,
method
:
'POST'
,
})
}
//全国商机项目分析-全国土地交易项目年份统计
export
function
countBidGroupByProvince
(
param
)
{
return
request
({
url
:
'/marketAnalysis/countBidGroupByProvince'
,
method
:
'POST'
,
data
:
param
})
}
//全国建筑企业概览-资质等级按照行业、等级类型分组
export
function
certGroupByMajorAndLevel
()
{
...
...
dsk-operate-ui/src/views/macro/economies/component/localEconomy.vue
View file @
c9a9cd41
...
...
@@ -36,12 +36,12 @@
</el-table-column>
<el-table-column
prop=
"gdp"
label=
"GDP(亿元)"
sortable
width=
"120"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gdpGrowth"
label=
"GDP增速"
sortable
width=
"100"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gdpGrowth"
label=
"GDP增速
(%)
"
sortable
width=
"100"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gdpPerCapita"
label=
"人均GDP(元)"
sortable
width=
"130"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"population"
label=
"人口(万人)"
sortable
width=
"120"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"fixedInvestment"
label=
"固定资产投资 (亿元) "
sortable
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gbr"
label=
"一般公共预算收入(亿元)"
sortable
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gbe"
label=
"一般公共预算支出(亿
元)"
sortable
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"gbe"
label=
"一般公共预算支出(亿元)"
sortable
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"govFundIncome"
label=
"政府性基金收入(亿元)"
sortable
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"govDebtBalance"
label=
"地方政府债务余额(亿元)"
sortable
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"uipInterestBearingDebt"
label=
"城投平台有息债务(亿元)"
sortable
width=
"200"
:formatter=
"formatStatus"
/>
...
...
dsk-operate-ui/src/views/macro/economies/component/regionalEconomy.vue
View file @
c9a9cd41
...
...
@@ -66,8 +66,8 @@
<div
class=
"content content2"
>
<div
class=
"common-title"
>
经济信息
</div>
<div
class=
"content-box"
>
<span
class=
"text"
@
click=
"childMethod(1)"
style=
"cursor: pointer;"
><img
src=
"@/assets/images/economies/icon_1.png"
><span>
下属辖区
</span>
<label>
{{
recentlyYear
.
subordinateJurisdiction
}}
<i>
个
</i></label></span>
<span
class=
"text"
@
click=
"childMethod(2)"
style=
"cursor: pointer;"
><img
src=
"@/assets/images/economies/icon_2.png"
><span>
城投平台
</span>
<label>
{{
recentlyYear
.
urbanInvestmentPlatform
}}
<i>
家
</i></label></span>
<span
class=
"text
hover
"
@
click=
"childMethod(1)"
style=
"cursor: pointer;"
><img
src=
"@/assets/images/economies/icon_1.png"
><span>
下属辖区
</span>
<label>
{{
recentlyYear
.
subordinateJurisdiction
}}
<i>
个
</i></label></span>
<span
class=
"text
hover
"
@
click=
"childMethod(2)"
style=
"cursor: pointer;"
><img
src=
"@/assets/images/economies/icon_2.png"
><span>
城投平台
</span>
<label>
{{
recentlyYear
.
urbanInvestmentPlatform
}}
<i>
家
</i></label></span>
<span
class=
"text"
><img
src=
"@/assets/images/economies/icon_3.png"
><span>
城投平台授信余额
</span>
<label>
{{
recentlyYear
.
creditBalance
}}
<i>
亿
</i></label></span>
<span
class=
"text"
><img
src=
"@/assets/images/economies/icon_4.png"
><span>
城投平台应收账款
</span>
<label>
{{
recentlyYear
.
accountsReceivable
}}
<i>
亿
</i></label></span>
<span
class=
"text"
><img
src=
"@/assets/images/economies/icon_5.png"
><span>
城投平台有息债务
</span>
<label>
{{
recentlyYear
.
uipInterestBearingDebt
}}
<i>
亿
</i></label></span>
...
...
@@ -163,6 +163,10 @@ export default {
prop
:
'industryTotalValue'
,
label
:
'工业总产值(亿元)'
,
},
{
prop
:
'fixedInvestment'
,
label
:
'固定资产投资(亿元)'
,
},
{
prop
:
'realEstateInvestment'
,
label
:
'房地产开发投资(亿元)'
,
...
...
@@ -376,7 +380,7 @@ export default {
grid
:
{
top
:
20
,
// right:15,
bottom
:
0
,
bottom
:
5
,
},
series
:
[
{
...
...
@@ -388,7 +392,7 @@ export default {
focus
:
'none'
},
label
:
{
show
:
t
ru
e
,
show
:
t
his
.
valData
[
1
]
?
true
:
fals
e
,
position
:
'top'
},
//设置折线颜色和粗细
...
...
@@ -438,7 +442,7 @@ export default {
},
grid
:
{
top
:
20
,
bottom
:
0
,
bottom
:
5
,
},
series
:
[
{
...
...
@@ -450,7 +454,7 @@ export default {
focus
:
'none'
},
label
:
{
show
:
t
ru
e
,
show
:
t
his
.
valData1
[
1
]
?
true
:
fals
e
,
position
:
'top'
},
itemStyle
:{
...
...
@@ -500,7 +504,7 @@ export default {
},
grid
:
{
top
:
20
,
bottom
:
0
,
bottom
:
5
,
},
series
:
[
{
...
...
@@ -512,7 +516,7 @@ export default {
focus
:
'none'
},
label
:
{
show
:
t
ru
e
,
show
:
t
his
.
valData2
[
1
]
?
true
:
fals
e
,
position
:
'top'
},
//设置折线颜色和粗细
...
...
@@ -562,7 +566,7 @@ export default {
},
grid
:
{
top
:
20
,
bottom
:
0
,
bottom
:
5
,
},
series
:
[
{
...
...
@@ -574,7 +578,7 @@ export default {
focus
:
'none'
},
label
:
{
show
:
t
ru
e
,
show
:
t
his
.
valData3
[
1
]
?
true
:
fals
e
,
position
:
'top'
},
//设置折线颜色和粗细
...
...
@@ -625,7 +629,7 @@ export default {
grid
:
{
top
:
20
,
// left:5,
bottom
:
0
,
bottom
:
5
,
},
series
:
[
{
...
...
@@ -637,7 +641,7 @@ export default {
focus
:
'none'
},
label
:
{
show
:
t
ru
e
,
show
:
t
his
.
valData4
[
1
]
?
true
:
fals
e
,
position
:
'top'
,
},
//设置折线颜色和粗细
...
...
@@ -793,6 +797,14 @@ export default {
.content2
{
.content-box
{
margin-top
:
18px
;
.hover
:hover
{
label
{
color
:
#0081ff
;
i
{
color
:
#0081ff
;
}
}
}
.text
{
border-right
:
1px
solid
#E4E4E4
;
display
:
inline-block
;
...
...
dsk-operate-ui/src/views/macro/nationalEconomies/component/sjxmfx.vue
View file @
c9a9cd41
<
template
>
<div
class=
"zhaobiao"
>
<div
class=
"zb-content content1"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国招标数量分析
</span>
</div>
</div>
<div
class=
"text"
>
{{
value
}}
全国项目招标数量达到
{{
totalCount
}}
万个,招标数量前五的地区分别是
{{
tableData
[
1
].
type
}}
(
{{
tableData
[
1
].
count
}}
个)、
{{
tableData
[
2
].
type
}}
(
{{
tableData
[
2
].
count
}}
个)、
{{
tableData
[
3
].
type
}}
(
{{
tableData
[
3
].
count
}}
个)、
{{
tableData
[
4
].
type
}}
(
{{
tableData
[
4
].
count
}}
个)、
{{
tableData
[
5
].
type
}}
(
{{
tableData
[
5
].
count
}}
个)。
</div>
<div
class=
"main1"
>
<div
id=
"zb-echarts"
style=
"height: 250px"
></div>
<p
class=
"tips"
><i
class=
"el-icon-info"
></i>
数据来源大司空建筑大数据平台,统计范围为
{{
value
}}
全国公开的招标项目,未公开的不含在内
</p>
</div>
<div
class=
"main2"
>
<div
class=
"flex-box query-box head"
>
<span>
{{
value
}}
全国招标总数
<span
class=
"number"
>
{{
totalCount
}}
</span>
万个
</span>
<div
class=
"select-popper"
style=
"position: relative;margin-right:0;"
>
<el-dropdown
@
command=
"handleDate"
trigger=
"click"
ref=
"punishDateShowPopper"
:hide-on-click=
"false"
>
<span
class=
"el-dropdown-link"
:class=
"punishDateValue ? 'color_text' : ''"
>
{{
punishDateValue
}}
<i
class=
"el-icon-arrow-down"
style=
"color:#313131;"
></i></span>
<div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-for=
"(item, i) in yearOptions"
:class=
" punishDateValue && punishDateValue == item.value? 'color_text': ''"
:key=
"i"
:command=
"item.value"
>
<div
@
mouseenter=
"hidePoper"
>
{{
item
.
label
}}
</div>
</el-dropdown-item>
<el-dropdown-item
command=
"自定义"
style=
"padding: 0; text-indent: 20px"
>
<div
@
mouseenter=
"mouseenter"
>
<span
:class=
"punishDateValue == '自定义' ? 'color_text' : ''"
>
自定义
<i
class=
"el-icon-arrow-right"
></i></span>
<el-date-picker
v-if=
"punishDateShowPopper"
@
change=
"changepunishDate"
class=
"land_date_picker"
v-model=
"punishDate"
ref=
"datePicker"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</div>
</el-dropdown>
</div>
</div>
<div
class=
"table-item"
>
<el-table
:data=
"tableData"
border
height=
"430"
fit
highlight-current-row
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"地区"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
type
===
'全国'
?
'未公示地区'
:
scope
.
row
.
type
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"count"
sortable
label=
"招标数量"
align=
"right"
/>
<el-table-column
prop=
"rate"
sortable
label=
"占比(%)"
align=
"right"
/>
</el-table>
</div>
</div>
</div>
<div
class=
"zb-content content2"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国招标项目概览
</span>
</div>
</div>
<div
class=
"text"
>
通过对{{year}}全国招标数据进行分析,发现主要集中在{{dataSort[0].label}}({{dataSort[0].count}}个)、{{dataSort[1].label}}({{dataSort[1].count}}个)进行招标。
</div>
<div
class=
"main1"
>
<div
id=
"gl-echarts"
style=
"height: 250px"
></div>
<p
class=
"tips"
><i
class=
"el-icon-info"
></i>
数据来源大司空建筑大数据平台,统计范围为{{year}}年全国公开的招标项目,未公开的不含在内
</p>
</div>
<div
class=
"main2"
>
<div
class=
"selectYear"
>
<el-select
v-model=
"year"
filterable
class=
"form-content-width"
placeholder=
"请选择"
@
change=
"changeValue()"
>
<el-option
v-for=
"(item, index) in yearData"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<div
class=
"table-item"
>
<el-table
:data=
"tableData1"
border
height=
"430"
fit
highlight-current-row
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"label"
label=
"月份"
/>
<el-table-column
prop=
"count"
sortable
label=
"招标数量"
align=
"right"
/>
<el-table-column
prop=
"rate"
sortable
label=
"占比(%)"
align=
"right"
/>
</el-table>
</div>
</div>
<div
class=
"shangji"
>
<div
class=
"tabs"
>
<span
:class=
"index === 0 ? 'color' : ''"
@
click=
"handleClick(0)"
>
土地交易
</span>
<span
:class=
"index === 1 ? 'color' : ''"
@
click=
"handleClick(1)"
>
招标公告
</span>
</div>
<Tdjy
v-if=
"index === 0"
></Tdjy>
<Zhaobiao
v-if=
"index === 1"
></Zhaobiao>
</div>
</
template
>
<
script
>
import
*
as
echarts
from
'echarts'
;
import
{
countGroupByMonth
,
countGroupByProvince
,
getYear
}
from
'@/api/macro/macro'
import
Tdjy
from
'./tdjy'
import
Zhaobiao
from
'./zhaobiao'
export
default
{
name
:
'NationalEconomies'
,
components
:
{
Tdjy
,
Zhaobiao
},
data
()
{
return
{
year
:
'近一年'
,
yearOptions
:
[
{
label
:
'近五年'
,
value
:
'近五年'
},
{
label
:
'近三年'
,
value
:
'近三年'
},
{
label
:
'近一年'
,
value
:
'近一年'
},
],
tableData
:[
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
],
tableData1
:[],
dataSort
:[
{
label
:
''
,
count
:
''
},
{
label
:
''
,
count
:
''
},
],
totalCount
:
''
,
punishDateValue
:
"请选择"
,
value
:
'近五年'
,
punishDateShowPopper
:
false
,
punishDate
:
""
,
yearData
:[
{
label
:
'近一年'
,
value
:
'近一年'
},
{
label
:
'近二年'
,
value
:
'近二年'
},
{
label
:
'近三年'
,
value
:
'近三年'
},
],
myChart
:
''
,
myChart1
:
''
,
index
:
0
,
}
},
created
()
{
this
.
getDataByProvince
({})
let
mydate
=
new
Date
();
var
startTime
,
endTime
,
Year
,
Month
,
Day
,
startyear
Year
=
mydate
.
getFullYear
();
Month
=
mydate
.
getMonth
()
+
1
;
Day
=
mydate
.
getDate
();
Month
=
Month
<
10
?
'0'
+
Month
:
Month
Day
=
Day
<
10
?
'0'
+
Day
:
Day
startyear
=
mydate
.
getFullYear
()
-
1
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
let
params
=
{
startDate
:
startTime
,
endDate
:
endTime
}
this
.
getDataByMonth
(
params
)
this
.
$nextTick
(()
=>
{
// this.initChart()
// this.initChart1()
})
window
.
addEventListener
(
"resize"
,
this
.
resizeEcharts
);
},
beforeDestroy
(){
window
.
removeEventListener
(
"resize"
,
this
.
resizeEcharts
);
},
activated
()
{
this
.
resizeEcharts
()
},
methods
:
{
resizeEcharts
(){
const
self
=
this
setTimeout
(
function
(){
//图表跟随页面大小变化宽度
self
.
myChart
.
resize
()
self
.
myChart1
.
resize
()
},
10
)
},
getDataByProvince
(
params
){
countGroupByProvince
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
data
.
provinceDate
;
let
arr
=
[]
for
(
let
i
=
0
;
i
<
res
.
data
.
provinceDate
.
length
;
i
++
){
if
(
res
.
data
.
provinceDate
[
i
].
type
!=
'全国'
){
arr
.
push
(
res
.
data
.
provinceDate
[
i
])
}
}
this
.
dataList
=
arr
;
this
.
totalCount
=
res
.
data
.
totalCount
;
this
.
initChart
()
})
},
getDataByMonth
(
params
){
countGroupByMonth
(
params
).
then
(
res
=>
{
this
.
tableData1
=
res
.
data
;
let
companyValue1
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableData1
))
let
arr
=
this
.
tableData1
.
sort
((
a
,
b
)
=>
{
return
b
.
count
-
a
.
count
})
this
.
tableData1
=
JSON
.
parse
(
JSON
.
stringify
(
companyValue1
))
this
.
dataSort
=
arr
;
this
.
initChart1
()
})
},
initChart
()
{
this
.
myChart
=
echarts
.
init
(
document
.
getElementById
(
"zb-echarts"
))
let
option
=
{
tooltip
:
{
trigger
:
'axis'
,
//坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'shadow'
// 默认为直线,可选为:'line' | 'shadow'
}
},
grid
:
{
left
:
'5'
,
right
:
'5'
,
top
:
'15'
,
bottom
:
'10'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
data
:
this
.
dataList
.
map
(
item
=>
item
.
type
),
axisLabel
:
{
show
:
true
,
// "interval": 0,
"rotate"
:
40
//X轴倾斜度
},
},
yAxis
:
{
type
:
'value'
,
},
series
:
[
{
data
:
this
.
dataList
.
map
(
item
=>
item
.
count
),
type
:
'bar'
,
barWidth
:
16
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
4
,
4
,
0
,
0
],
color
:
'#165DFF'
,
label
:
{
show
:
false
,
//开启显示
position
:
'top'
,
//在上方显示
textStyle
:
{
//数值样式
color
:
'#165DFF'
,
fontSize
:
16
}
}
},
// 移入当前的柱状图时改变颜色
emphasis
:
{
color
:
'#3384FF'
,
}
}
}
]
};
this
.
myChart
.
setOption
(
option
);
},
initChart1
()
{
this
.
myChart1
=
echarts
.
init
(
document
.
getElementById
(
"gl-echarts"
))
let
dataList
=
this
.
tableData1
;
let
option
=
{
tooltip
:
{
trigger
:
'axis'
,
//坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'shadow'
// 默认为直线,可选为:'line' | 'shadow'
}
},
grid
:
{
left
:
'5'
,
right
:
'5'
,
top
:
'20'
,
bottom
:
'10'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
data
:
this
.
tableData1
.
map
(
item
=>
item
.
label
),
axisLabel
:
{
show
:
true
,
// "interval": 0,
"rotate"
:
this
.
year
===
'近二年'
||
this
.
year
===
'近三年'
?
40
:
0
//X轴倾斜度
},
},
yAxis
:
{
type
:
'value'
},
series
:
[
{
data
:
this
.
tableData1
.
map
(
item
=>
item
.
count
),
type
:
'bar'
,
barWidth
:
16
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
4
,
4
,
0
,
0
],
// color: '#2ECFCF',
color
:
function
(
params
)
{
var
colorList
=
[]
//定义一个存储颜色的数组
//更改前二位柱形颜色
//定义一个变量 保存柱形图数据 因为sort方法排序会改变原数组 使用JSON方法深拷贝 将原数值暂存
let
dataArr
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
))
let
arr
=
dataList
.
sort
((
a
,
b
)
=>
{
return
b
.
count
-
a
.
count
})
//将原数组数据赋值回去 保持数据不变
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
dataArr
))
//遍历数据 将原数组和排序后的数组比较
dataList
.
map
(
i
=>
{
if
(
i
.
count
==
arr
[
0
].
count
)
{
colorList
.
push
(
'#F39F35'
)
}
else
if
(
i
.
count
==
arr
[
1
].
count
)
{
colorList
.
push
(
'#6675A5'
)
}
else
{
colorList
.
push
(
'#2ECFCF'
)
}
})
//返回一个存储着颜色的数组根据数据index顺序渲染到页面
return
colorList
[
params
.
dataIndex
]
},
},
}
}
]
};
this
.
myChart1
.
setOption
(
option
);
},
handleDate
(
command
)
{
if
(
command
&&
command
!=
"自定义"
)
{
this
.
punishDateValue
=
command
;
this
.
$refs
.
punishDateShowPopper
.
hide
();
this
.
value
=
command
;
let
mydate
=
new
Date
();
var
startTime
,
endTime
,
Year
,
Month
,
Day
,
startyear
Year
=
mydate
.
getFullYear
();
Month
=
mydate
.
getMonth
()
+
1
;
Day
=
mydate
.
getDate
();
Month
=
Month
<
10
?
'0'
+
Month
:
Month
Day
=
Day
<
10
?
'0'
+
Day
:
Day
switch
(
command
)
{
case
"近五年"
:
startyear
=
mydate
.
getFullYear
()
-
5
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近三年"
:
startyear
=
mydate
.
getFullYear
()
-
3
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近一年"
:
startyear
=
mydate
.
getFullYear
()
-
1
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
}
let
params
=
{
startDate
:
startTime
,
endDate
:
endTime
}
this
.
getDataByProvince
(
params
)
}
else
if
(
command
==
"自定义"
)
{
this
.
$refs
.
datePicker
.
pickerVisible
=
true
;
}
else
{
this
.
$refs
.
punishDateShowPopper
.
hide
();
this
.
punishDateValue
=
""
;
this
.
punishDate
=
""
;
}
},
changepunishDate
()
{
if
(
this
.
punishDate
)
{
this
.
punishDateValue
=
"自定义"
;
this
.
value
=
this
.
punishDate
[
0
]
+
' - '
+
this
.
punishDate
[
1
];
let
params
=
{
startDate
:
this
.
punishDate
[
0
],
endDate
:
this
.
punishDate
[
1
]
}
this
.
getDataByProvince
(
params
)
}
},
hidePoper
()
{
if
(
this
.
$refs
.
datePicker
)
{
this
.
$refs
.
datePicker
.
pickerVisible
=
false
;
}
},
mouseenter
()
{
this
.
punishDateShowPopper
=
true
;
if
(
this
.
punishDateValue
==
'自定义'
){
this
.
$nextTick
(()
=>
{
// this.$refs.datePicker.focus()
this
.
$refs
.
datePicker
.
pickerVisible
=
true
;
});
}
methods
:
{
handleClick
(
key
){
this
.
index
=
key
},
changeValue
(){
let
mydate
=
new
Date
();
var
startTime
,
endTime
,
Year
,
Month
,
Day
,
startyear
Year
=
mydate
.
getFullYear
();
Month
=
mydate
.
getMonth
()
+
1
;
Day
=
mydate
.
getDate
();
Month
=
Month
<
10
?
'0'
+
Month
:
Month
Day
=
Day
<
10
?
'0'
+
Day
:
Day
switch
(
this
.
year
)
{
case
"近三年"
:
startyear
=
mydate
.
getFullYear
()
-
3
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近二年"
:
startyear
=
mydate
.
getFullYear
()
-
2
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近一年"
:
startyear
=
mydate
.
getFullYear
()
-
1
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
}
let
params
=
{
startDate
:
startTime
,
endDate
:
endTime
}
this
.
getDataByMonth
(
params
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.land_date_picker
{
position
:
absolute
!
important
;
visibility
:
hidden
;
left
:
-645px
;
top
:
145px
;
}
::v-deep
.el-popper
.popper__arrow
,
.el-popper
.popper__arrow
::after
{
display
:
none
;
}
.color_text
{
background
:
#F3F4F5
;
border-radius
:
4px
;
color
:
#0081FF
;
}
.zhaobiao
{
.zb-content
{
background
:
#ffffff
;
border-radius
:
4px
;
margin-top
:
12px
;
padding
:
16px
;
}
.text
{
width
:
100%
;
line-height
:
28px
;
padding
:
0
16px
;
margin-top
:
24px
;
font-size
:
12px
;
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
background
:
#F4F4F5
;
border-radius
:
2px
;
margin-bottom
:
24px
;
}
.tips
{
margin
:
0
;
font-size
:
12px
;
color
:
rgba
(
35
,
35
,
35
,
0
.4
);
i
{
color
:
#909399
;
margin-right
:
9px
;
font-size
:
14px
;
.shangji
{
.tabs
{
.color
{
background
:
linear-gradient
(
136deg
,
#3181FA
0%
,
#1371FD
100%
);
box-shadow
:
0px
0px
1px
0px
rgba
(
49
,
129
,
250
,
0
.4471
);
color
:
#ffffff
;
}
}
.content1
{
.main2
{
margin-top
:
30px
;
.head
{
span
{
font-size
:
12px
;
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
}
.number
{
color
:
#FF3C3C
;
}
::v-deep
.el-select
{
width
:
100px
;
height
:
32px
;
.el-input
{
width
:
100%
;
height
:
32px
;
}
.el-input__inner
{
height
:
32px
!
important
;
line-height
:
32px
;
}
}
.el-dropdown-link
{
width
:
96px
;
height
:
32px
;
display
:
inline-block
;
line-height
:
32px
;
text-align
:
center
;
background
:
#FFFFFF
;
border-radius
:
4px
;
border
:
1px
solid
#D9D9D9
;
cursor
:
pointer
;
i
{
margin-left
:
8px
;
}
}
}
}
.table-item
{
margin-top
:
12px
;
}
}
.content2
{
.main2
{
.selectYear
{
height
:
32px
;
float
:
right
;
margin-bottom
:
16px
;
}
::v-deep
.el-select
{
width
:
100px
;
height
:
32px
;
.el-input
{
width
:
100%
;
height
:
32px
;
}
.el-input__inner
{
height
:
32px
!
important
;
line-height
:
32px
;
}
}
margin-top
:
32px
;
}
}
.table-item
{
::v-deep
.el-table
{
.el-table__header-wrapper
{
th
{
padding
:
0
;
}
}
.el-table__cell.is-right
{
text-align
:
right
;
}
.has-gutter
{
tr
{
th
:nth-child
(
4
)
{
border-right
:
0
;
.cell
{
padding-right
:
24px
!
important
;
}
}
}
}
.el-table__cell.gutter
{
background
:
#F0F3FA
;
width
:
16px
!
important
;
}
.el-table__row
{
td
:last-child
{
.cell
{
padding-right
:
24px
!
important
;
}
}
}
th
{
font-size
:
12px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
background
:
#F0F3FA
;
}
td
.el-table__cell
{
border-bottom
:
0
;
}
.caret-wrapper
{
width
:
10px
;
}
}
}
::v-deep
.el-input--medium
{
.el-input__icon
{
span
{
display
:
inline-block
;
width
:
88px
;
height
:
32px
;
line-height
:
32px
;
background
:
#FFFFFF
;
box-shadow
:
0px
0px
1px
0px
rgba
(
49
,
129
,
250
,
0
.4471
);
border-radius
:
2px
;
border
:
1px
solid
#0081FF
;
color
:
#0081FF
;
font-size
:
14px
;
text-align
:
center
;
margin
:
12px
16px
12px
0
;
cursor
:
pointer
;
}
}
}
...
...
dsk-operate-ui/src/views/macro/nationalEconomies/component/tdjy.vue
0 → 100644
View file @
c9a9cd41
<
template
>
<div
class=
"tdjy"
>
<p
class=
"text_p"
>
注:数据来源大司空建筑大数据平台,统计范围为全国公开的土地交易项目,未公开的不含在内
</p>
<div
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目供应方式
</span>
<el-select
v-model=
"years"
multiple
collapse-tags
filterable
class=
"form-content-width"
placeholder=
"请选择"
:popper-append-to-body=
'false'
size=
"small"
>
<el-option
v-for=
"(item, index) in yearOptions"
:key=
"index"
:label=
"item"
:value=
"item"
/>
</el-select>
</div>
</div>
<div
class=
"content_box"
>
<div
class=
"box-left"
>
<div
id=
"echarts1"
style=
"height: 280px"
></div>
</div>
<div
class=
"box-right"
>
<el-table
:data=
"gyfsList"
element-loading-text=
"Loading"
border
show-summary
max-height=
"280"
:summary-method=
"getSummaries"
fit
highlight-current-row
:default-sort =
"
{prop: 'count', order: 'descending'}"
>
<el-table-column
label=
"序号"
width=
"60"
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
label=
"供应方式"
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"count"
label=
"土地交易项目 (个)"
align=
"right"
:formatter=
"formatStatus"
sortable
width=
"160"
/>
<el-table-column
prop=
"rate"
label=
"占比"
align=
"right"
:formatter=
"formatStatus"
width=
"160"
/>
</el-table>
</div>
</div>
</div>
<div
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目土地用途
</span>
<el-select
v-model=
"years1"
multiple
collapse-tags
filterable
class=
"form-content-width"
placeholder=
"请选择"
:popper-append-to-body=
'false'
size=
"small"
>
<el-option
v-for=
"(item, index) in yearOptions"
:key=
"index"
:label=
"item"
:value=
"item"
/>
</el-select>
</div>
</div>
<div
class=
"content_box"
>
<div
class=
"box-left"
>
<div
id=
"echarts2"
style=
"height: 280px"
></div>
</div>
<div
class=
"box-right"
>
<el-table
:data=
"tdytList"
element-loading-text=
"Loading"
border
show-summary
max-height=
"280"
:summary-method=
"getSummaries"
fit
highlight-current-row
:default-sort =
"{prop: 'count', order: 'descending'}"
>
<el-table-column
label=
"序号"
width=
"60"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
label=
"供应方式"
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"count"
label=
"土地交易项目 (个)"
align=
"right"
:formatter=
"formatStatus"
sortable
width=
"160"
/>
<el-table-column
prop=
"rate"
label=
"占比"
align=
"right"
:formatter=
"formatStatus"
width=
"160"
/>
</el-table>
</div>
</div>
</div>
<div
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目地区Top10
</span>
<el-select
@
change=
"handleSearch"
style=
"margin-right: 8px"
v-model=
"address"
multiple
collapse-tags
filterable
class=
"form-content-width"
placeholder=
"地区筛选"
:popper-append-to-body=
'false'
size=
"small"
>
<el-option
v-for=
"(item, index) in addressList"
:key=
"index"
:label=
"item.label"
:value=
"item.id"
/>
</el-select>
<el-select
v-model=
"years2"
multiple
collapse-tags
filterable
class=
"form-content-width"
placeholder=
"请选择"
:popper-append-to-body=
'false'
size=
"small"
>
<el-option
v-for=
"(item, index) in yearOptions"
:key=
"index"
:label=
"item"
:value=
"item"
/>
</el-select>
</div>
</div>
<div
class=
"content_box"
>
<div
class=
"box-left"
>
<div
id=
"echarts3"
style=
"height: 300px"
></div>
</div>
<div
class=
"box-right"
>
<el-table
:data=
"topList"
element-loading-text=
"Loading"
border
show-summary
max-height=
"280"
:summary-method=
"getSummaries"
fit
highlight-current-row
:default-sort =
"{prop: 'count', order: 'descending'}"
>
<el-table-column
label=
"序号"
width=
"60"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"province"
label=
"地区"
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"count"
label=
"土地交易项目 (个)"
align=
"right"
:formatter=
"formatStatus"
sortable
width=
"160"
/>
<el-table-column
prop=
"rate"
label=
"占比"
align=
"right"
:formatter=
"formatStatus"
width=
"160"
/>
</el-table>
</div>
</div>
</div>
<div
class=
"td_content"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国土地交易项目年份统计
</span>
</div>
</div>
<div
class=
"content_box"
>
<div
class=
"box-left"
>
<div
id=
"echarts4"
style=
"height: 300px"
></div>
</div>
<div
class=
"box-right"
>
<el-table
:data=
"nftjList"
element-loading-text=
"Loading"
border
show-summary
max-height=
"290"
:summary-method=
"getSummaries"
fit
highlight-current-row
:default-sort =
"{prop: 'count', order: 'descending'}"
>
<el-table-column
label=
"序号"
width=
"60"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
label=
"年份"
width=
"200"
:formatter=
"formatStatus"
/>
<el-table-column
prop=
"count"
label=
"土地交易项目 (个)"
align=
"right"
:formatter=
"formatStatus"
sortable
width=
"160"
/>
<el-table-column
prop=
"rate"
label=
"占比"
align=
"right"
:formatter=
"formatStatus"
width=
"160"
/>
</el-table>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
*
as
echarts
from
'echarts'
;
import
dataRegion
from
'@/assets/json/dataRegion'
import
{
countLandMarketByType
,
countLandMarketByProvince
,
countLandMarketByYear
}
from
'@/api/macro/macro'
export
default
{
name
:
'NationalEconomies'
,
data
()
{
return
{
myChart1
:
''
,
myChart2
:
''
,
myChart3
:
''
,
myChart4
:
''
,
addressList
:[],
address
:[],
years
:[
'2023'
],
years1
:[
'2023'
],
years2
:[
'2022'
],
yearOptions
:[],
gyfsList
:[],
tdytList
:[],
topList
:[],
nftjList
:[],
}
},
created
()
{
this
.
dataRegion
()
this
.
yearsData
()
this
.
getCountLandMarketByType
()
this
.
getCountLandMarketByTypeTd
()
this
.
getCountLandMarketByProvince
()
this
.
getCountLandMarketByYear
()
window
.
addEventListener
(
"resize"
,
this
.
resizeEcharts
);
},
beforeDestroy
(){
window
.
removeEventListener
(
"resize"
,
this
.
resizeEcharts
);
},
activated
()
{
this
.
resizeEcharts
()
},
methods
:
{
getCountLandMarketByType
(){
countLandMarketByType
({
type
:
'供应方式'
,
yearStr
:
this
.
years
.
join
(
","
)}).
then
(
res
=>
{
this
.
gyfsList
=
res
.
data
.
provinceDate
;
var
list
=
[];
for
(
var
i
=
0
;
i
<
res
.
data
.
provinceDate
.
length
;
i
++
){
var
obj
=
{};
obj
.
name
=
res
.
data
.
provinceDate
[
i
].
type
;
obj
.
value
=
res
.
data
.
provinceDate
[
i
].
count
;
obj
.
rate
=
res
.
data
.
provinceDate
[
i
].
rate
;
list
.
push
(
obj
)
}
this
.
initChart1
(
list
)
})
},
getCountLandMarketByTypeTd
(){
countLandMarketByType
({
type
:
'土地用途'
,
yearStr
:
this
.
years1
.
join
(
","
)}).
then
(
res
=>
{
this
.
tdytList
=
res
.
data
.
provinceDate
;
var
list
=
[];
for
(
var
i
=
0
;
i
<
res
.
data
.
provinceDate
.
length
;
i
++
){
var
obj
=
{};
obj
.
name
=
res
.
data
.
provinceDate
[
i
].
type
;
obj
.
value
=
res
.
data
.
provinceDate
[
i
].
count
;
obj
.
rate
=
res
.
data
.
provinceDate
[
i
].
rate
;
list
.
push
(
obj
)
}
this
.
initChart2
(
list
)
})
},
getCountLandMarketByProvince
(){
let
params
=
{
yearStr
:
this
.
years2
.
join
(
","
)
}
if
(
this
.
address
.
length
>
0
){
params
.
provinceId
=
this
.
address
.
join
(
","
)
}
countLandMarketByProvince
(
params
).
then
(
res
=>
{
this
.
topList
=
res
.
data
.
provinceDate
;
this
.
initChart3
()
})
},
getCountLandMarketByYear
(){
countLandMarketByYear
().
then
(
res
=>
{
this
.
nftjList
=
res
.
data
.
yearDate
;
// var list=[];
// for(var i=0;i
<
res
.
data
.
provinceDate
.
length
;
i
++
){
// var obj={};
// obj.name=res.data.provinceDate[i].type;
// obj.value=res.data.provinceDate[i].count;
// obj.rate=res.data.provinceDate[i].rate;
// list.push(obj)
// }
// this.initChart2(list)
})
},
initChart1
(
data
)
{
this
.
$nextTick
(()
=>
{
this
.
myChart1
=
echarts
.
init
(
document
.
getElementById
(
"echarts1"
))
let
option
=
{
tooltip
:
{
trigger
:
'item'
,
borderWidth
:
0
,
backgroundColor
:
"rgba(255, 255, 255, 0.8)"
,
formatter
:
function
(
params
)
{
var
result
=
''
result
+=
'<h3 style="color: #232226;padding: 0 0 5px 0;margin: 0;">'
+
params
.
data
.
name
+
'</h3>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
value
+
'个 '
+
params
.
data
.
rate
+
'%</p>'
return
result
;
},
extraCssText
:
'width:150px!important;'
,
},
legend
:
{
type
:
'scroll'
,
orient
:
'horizontal'
,
bottom
:
0
,
data
:
data
,
itemHeight
:
8
,
itemWidth
:
12
,
pageButtonPosition
:
'end'
,
},
color
:[
'#8A82F3'
,
'#5B9CF7'
,
'#43BBE0'
,
'#8ECF95'
,
'#FFDC6B'
,
'#FFDC6B'
,
'#FFC08D'
,
'#FE9C77'
,
'#E8649B'
,
'#A151F5'
],
series
:
[
{
type
:
'pie'
,
radius
:
'55%'
,
center
:
[
'50%'
,
'50%'
],
data
:
data
,
emphasis
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
}
}
}
]
}
this
.
myChart1
.
setOption
(
option
);
})
},
initChart2
(
data
)
{
this
.
$nextTick
(()
=>
{
this
.
myChart2
=
echarts
.
init
(
document
.
getElementById
(
"echarts2"
))
let
option
=
{
tooltip
:
{
trigger
:
'item'
,
borderWidth
:
0
,
backgroundColor
:
"rgba(255, 255, 255, 0.8)"
,
formatter
:
function
(
params
)
{
var
result
=
''
result
+=
'<h3 style="color: #232226;padding: 0 0 5px 0;margin: 0;">'
+
params
.
data
.
name
+
'</h3>'
result
+=
'<p style="color: rgba(35,35,35,0.8);padding: 0;margin: 0;">'
+
params
.
data
.
value
+
'个 '
+
params
.
data
.
rate
+
'%</p>'
return
result
;
},
extraCssText
:
'width:150px!important;'
,
},
legend
:
{
type
:
'scroll'
,
orient
:
'horizontal'
,
bottom
:
0
,
data
:
data
,
itemHeight
:
8
,
itemWidth
:
12
,
pageButtonPosition
:
'end'
,
},
color
:[
'#8A82F3'
,
'#5B9CF7'
,
'#43BBE0'
,
'#8ECF95'
,
'#FFDC6B'
,
'#FFDC6B'
,
'#FFC08D'
,
'#FE9C77'
,
'#E8649B'
,
'#A151F5'
],
series
:
[
{
type
:
'pie'
,
radius
:
'55%'
,
center
:
[
'50%'
,
'50%'
],
data
:
data
,
emphasis
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
}
}
}
]
}
this
.
myChart2
.
setOption
(
option
);
})
},
initChart3
()
{
console
.
log
(
this
.
topList
)
this
.
$nextTick
(()
=>
{
this
.
myChart3
=
echarts
.
init
(
document
.
getElementById
(
"echarts3"
))
let
option
=
{
legend
:
{
x
:
'right'
,
padding
:[
3
,
120
,
0
,
0
],
itemHeight
:
8
,
itemWidth
:
16
,
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'line'
,
label
:
{
backgroundColor
:
'#FFFFFF'
}
}
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
jyfxData
,
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
40
,
left
:
30
,
right
:
10
,
bottom
:
20
,
},
series
:
[
{
data
:
this
.
topList
.
map
(
item
=>
item
.
count
),
name
:
this
.
topList
.
map
(
item
=>
item
.
province
),
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#81D4BC"
,
},
itemStyle
:{
color
:
"#81D4BC"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(189, 249, 232, 1)'
},
{
offset
:
1
,
color
:
'rgba(189, 249, 232, 0)'
}
],
global
:
false
}
},
},
]
}
this
.
myChart3
.
setOption
(
option
);
})
},
initChart4
()
{
this
.
$nextTick
(()
=>
{
this
.
myChart4
=
echarts
.
init
(
document
.
getElementById
(
"echarts4"
))
let
option
=
{
legend
:
{
x
:
'right'
,
padding
:[
3
,
120
,
0
,
0
],
itemHeight
:
8
,
itemWidth
:
16
,
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'line'
,
label
:
{
backgroundColor
:
'#FFFFFF'
}
}
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
false
,
data
:
this
.
jyfxData
,
},
yAxis
:
{
type
:
'value'
,
},
grid
:
{
top
:
40
,
left
:
30
,
right
:
10
,
bottom
:
20
,
},
series
:
[
{
data
:
this
.
nftjList
.
map
(
item
=>
item
.
type
),
name
:
'待成交项目数'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#81D4BC"
,
},
itemStyle
:{
color
:
"#81D4BC"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(189, 249, 232, 1)'
},
{
offset
:
1
,
color
:
'rgba(189, 249, 232, 0)'
}
],
global
:
false
}
},
},
{
data
:
this
.
jyfxData1
.
map
(
item
=>
item
.
dcjzje
),
name
:
'待成交总金额'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#9EE474"
,
},
itemStyle
:{
color
:
"#9EE474"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(208, 250, 183, 1)'
},
{
offset
:
1
,
color
:
'rgba(208, 250, 183, 0)'
}
],
global
:
false
}
},
},
{
data
:
this
.
jyfxData1
.
map
(
item
=>
item
.
cjxmje
),
name
:
'成交项目金额'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#E1B3FF"
,
},
itemStyle
:{
color
:
"#E1B3FF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(233, 200, 255, 1)'
},
{
offset
:
1
,
color
:
'rgba(233, 200, 255, 0)'
}
],
global
:
false
}
},
},
{
data
:
this
.
jyfxData1
.
map
(
item
=>
item
.
cjxmzs
),
name
:
'成交项目总数'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#ADC0FF"
,
},
itemStyle
:{
color
:
"#ADC0FF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(173, 192, 255, 1)'
},
{
offset
:
1
,
color
:
'rgba(173, 192, 255, 0)'
}
],
global
:
false
}
},
},
{
data
:
this
.
jyfxData1
.
map
(
item
=>
item
.
cbxmzs
),
name
:
'储备项目总数'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#67B3FD"
,
},
itemStyle
:{
color
:
"#67B3FD"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(192, 224, 255, 1)'
},
{
offset
:
1
,
color
:
'rgba(192, 224, 255, 0)'
}
],
global
:
false
}
},
},
{
data
:
this
.
jyfxData1
.
map
(
item
=>
item
.
cbxmzje
),
name
:
'储备项目总金额'
,
type
:
'line'
,
smooth
:
true
,
emphasis
:
{
disabled
:
true
,
focus
:
'none'
},
//设置折线颜色和粗细
lineStyle
:
{
width
:
2
,
color
:
"#BEECFF"
,
},
itemStyle
:{
color
:
"#BEECFF"
,
},
//设置面积区域为渐变效果
areaStyle
:
{
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
0
,
color
:
'rgba(165, 229, 255, 1)'
},
{
offset
:
1
,
color
:
'rgba(165, 229, 255, 0)'
}
],
global
:
false
}
},
},
]
}
this
.
myChart4
.
setOption
(
option
);
})
},
//地区
async
dataRegion
()
{
var
str
=
[];
for
(
let
x
=
0
;
x
<
3
;
x
++
)
{
for
(
let
i
=
0
;
i
<
dataRegion
.
length
;
i
++
)
{
if
(
dataRegion
[
i
].
regionLevel
==
x
+
1
&&
x
+
1
==
1
)
{
str
.
push
({
'id'
:
dataRegion
[
i
].
id
,
"label"
:
dataRegion
[
i
].
regionName
,
"short"
:
dataRegion
[
i
].
short
,
"value"
:
dataRegion
[
i
].
parentId
,
"children"
:
[]
});
}
}
}
this
.
addressList
=
str
;
},
handleSearch
(){
// console.log(this.address)
},
yearsData
(){
let
mydate
=
new
Date
();
let
Year
=
mydate
.
getFullYear
();
let
startyear
=
mydate
.
getFullYear
()
-
4
;
let
Years
=
[];
for
(
var
i
=
startyear
;
i
<=
Year
;
i
++
){
Years
.
push
(
i
);
}
this
.
yearOptions
=
Years
.
reverse
()
},
resizeEcharts
(){
const
self
=
this
setTimeout
(
function
(){
//图表跟随页面大小变化宽度
self
.
myChart1
.
resize
()
self
.
myChart2
.
resize
()
// self.myChart3.resize()
// self.myChart4.resize()
},
10
)
},
formatStatus
:
function
(
row
,
column
,
cellValue
)
{
return
cellValue
?
cellValue
:
'-'
},
getSummaries
(
param
){
const
{
columns
,
data
}
=
param
;
const
sums
=
[];
columns
.
forEach
((
column
,
index
)
=>
{
if
(
index
===
0
)
{
sums
[
index
]
=
'合计'
;
return
;
}
if
(
index
===
1
)
{
sums
[
index
]
=
'-'
;
return
;
}
if
(
index
===
3
)
{
sums
[
index
]
=
'100'
;
return
;
}
const
values
=
data
.
map
(
item
=>
Number
(
item
[
column
.
property
]));
sums
[
index
]
=
values
.
reduce
((
prev
,
curr
)
=>
{
const
value
=
Number
(
curr
);
if
(
!
isNaN
(
value
))
{
return
Number
(
prev
)
+
Number
(
curr
)
}
else
{
return
prev
;
}
},
0
);
if
(
index
===
1
)
{
sums
[
index
]
=
Number
(
sums
[
index
]).
toFixed
(
0
);
return
;
}
});
return
sums
;
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.land_date_picker
{
position
:
absolute
!
important
;
visibility
:
hidden
;
left
:
-645px
;
top
:
145px
;
}
::v-deep
.el-popper
.popper__arrow
,
.el-popper
.popper__arrow
::after
{
display
:
none
;
}
.color_text
{
background
:
#F3F4F5
;
border-radius
:
4px
;
color
:
#0081FF
;
}
.tdjy
{
.text_p
{
color
:
#999999
;
font-size
:
14px
;
margin
:
0
;
}
.query-params
{
.common-title
{
margin-right
:
24px
;
}
::v-deep
.form-content-width
{
width
:
135px
;
.el-select__input
{
width
:
10px
!
important
;
max-width
:
10px
!
important
;
margin-left
:
0
;
}
}
::v-deep
.el-cascader
{
width
:
220px
;
.el-cascader__tags
{
flex-wrap
:
inherit
;
.el-tag
{
max-width
:
130px
;
}
}
}
}
.td_content
{
background
:
#ffffff
;
border-radius
:
4px
;
margin-top
:
12px
;
padding
:
16px
52px
16px
16px
;
}
.content_box
{
display
:
flex
;
justify-content
:
space-between
;
.box-left
{
width
:
50%
;
}
.box-right
{
float
:
right
;
::v-deep
.el-table
{
.sort-caret.ascending
{
border-bottom-color
:
rgba
(
0
,
129
,
255
,
0
.5
);
}
.ascending
.sort-caret.ascending
{
border-bottom-color
:
#0081FF
;
}
.sort-caret.descending
{
border-top-color
:
rgba
(
0
,
129
,
255
,
0
.5
);
}
.descending
.sort-caret.descending
{
border-top-color
:
#0081FF
;
}
.el-table__header-wrapper
{
background
:
#F0F3FA
;
th
{
background
:
#F0F3FA
;
/*text-align: left;*/
}
}
.el-table__footer-wrapper
{
background
:
#F0F3FA
;
}
th
{
font-size
:
13px
!
important
;
font-weight
:
400
!
important
;
}
.cell
{
padding-right
:
12px
!
important
;
padding-left
:
12px
!
important
;
line-height
:
18px
;
}
.el-table__fixed-header-wrapper
{
th
{
background
:
#F0F3FA
;
}
}
td
.el-table__cell
{
border-bottom
:
0
;
}
tr
{
&
.current-row
>
td
{
background-color
:
initial
;
}
&
:nth-child
(
2n
)
{
background
:
#F8FBFF
;
}
}
.el-table__cell
{
height
:
40px
;
padding
:
0
;
line-height
:
40px
;
}
.el-table__body
tr
:hover
>
td
.el-table__cell
{
background
:
#DCEBFF
;
}
::-webkit-scrollbar-track-piece
{
//滚动条凹槽的颜色,还可以设置边框属性
background-color
:
#F3F4F5
;
height
:
16px
;
padding
:
0
4px
;
}
//滚动条的宽度
::-webkit-scrollbar
{
width
:
8px
;
height
:
8px
;
background-color
:
#F3F4F5
;
border-radius
:
6px
;
}
//滚动条的滑块
::-webkit-scrollbar-thumb
{
border-radius
:
8px
;
height
:
8px
;
margin
:
0
4px
;
background
:
rgba
(
98
,
110
,
126
,
0
.2
);
border
:
4px
solid
rgba
(
98
,
110
,
126
,
0
.2
);;
&
:hover
{
background
:
#566380
;
}
}
.has-gutter
{
tr
{
th
:nth-child
(
4
)
{
border-right
:
0
;
}
td
:nth-child
(
4
)
{
border-right
:
0
;
}
}
}
.el-table__cell.gutter
{
background
:
#F0F3FA
;
}
.el-table__row
{
td
:last-child
{
.cell
{
padding-right
:
12px
!
important
;
}
}
}
}
}
}
::v-deep
.el-input--medium
{
.el-input__icon
{
line-height
:
32px
;
}
}
}
</
style
>
dsk-operate-ui/src/views/macro/nationalEconomies/component/zhaobiao.vue
0 → 100644
View file @
c9a9cd41
<
template
>
<div
class=
"zhaobiao"
>
<p
class=
"text_p"
>
注:数据来源大司空建筑大数据平台,统计范围为全国公开的招标项目,未公开的不含在内
</p>
<div
class=
"zb-content content1"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国招标数量分析
</span>
</div>
</div>
<div
class=
"text"
>
{{
value
}}
全国项目招标数量达到
{{
totalCount
}}
万个,招标数量前五的地区分别是
{{
tableData
[
1
].
type
}}
(
{{
tableData
[
1
].
count
}}
个)、
{{
tableData
[
2
].
type
}}
(
{{
tableData
[
2
].
count
}}
个)、
{{
tableData
[
3
].
type
}}
(
{{
tableData
[
3
].
count
}}
个)、
{{
tableData
[
4
].
type
}}
(
{{
tableData
[
4
].
count
}}
个)、
{{
tableData
[
5
].
type
}}
(
{{
tableData
[
5
].
count
}}
个)。
</div>
<div
class=
"main1"
>
<div
id=
"zb-echarts"
style=
"height: 250px"
></div>
<p
class=
"tips"
><i
class=
"el-icon-info"
></i>
数据来源大司空建筑大数据平台,统计范围为
{{
value
}}
全国公开的招标项目,未公开的不含在内
</p>
</div>
<div
class=
"main2"
>
<div
class=
"flex-box query-box head"
>
<span>
{{
value
}}
全国招标总数
<span
class=
"number"
>
{{
totalCount
}}
</span>
万个
</span>
<div
class=
"select-popper"
style=
"position: relative;margin-right:0;"
>
<el-dropdown
@
command=
"handleDate"
trigger=
"click"
ref=
"punishDateShowPopper"
:hide-on-click=
"false"
>
<span
class=
"el-dropdown-link"
:class=
"punishDateValue ? 'color_text' : ''"
>
{{
punishDateValue
}}
<i
class=
"el-icon-arrow-down"
style=
"color:#313131;"
></i></span>
<div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-for=
"(item, i) in yearOptions"
:class=
" punishDateValue && punishDateValue == item.value? 'color_text': ''"
:key=
"i"
:command=
"item.value"
>
<div
@
mouseenter=
"hidePoper"
>
{{
item
.
label
}}
</div>
</el-dropdown-item>
<el-dropdown-item
command=
"自定义"
style=
"padding: 0; text-indent: 20px"
>
<div
@
mouseenter=
"mouseenter"
>
<span
:class=
"punishDateValue == '自定义' ? 'color_text' : ''"
>
自定义
<i
class=
"el-icon-arrow-right"
></i></span>
<el-date-picker
v-if=
"punishDateShowPopper"
@
change=
"changepunishDate"
class=
"land_date_picker"
v-model=
"punishDate"
ref=
"datePicker"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</div>
</el-dropdown>
</div>
</div>
<div
class=
"table-item"
>
<el-table
:data=
"tableData"
border
height=
"430"
fit
highlight-current-row
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
label=
"地区"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
type
===
'全国'
?
'未公示地区'
:
scope
.
row
.
type
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"count"
sortable
label=
"招标数量"
align=
"right"
/>
<el-table-column
prop=
"rate"
sortable
label=
"占比(%)"
align=
"right"
/>
</el-table>
</div>
</div>
</div>
<div
class=
"zb-content content2"
>
<div
class=
"flex-box query-box"
>
<div
class=
"flex-box query-params"
>
<span
class=
"common-title"
>
全国招标项目概览
</span>
</div>
</div>
<div
class=
"text"
>
通过对{{year}}全国招标数据进行分析,发现主要集中在{{dataSort[0].label}}({{dataSort[0].count}}个)、{{dataSort[1].label}}({{dataSort[1].count}}个)进行招标。
</div>
<div
class=
"main1"
>
<div
id=
"gl-echarts"
style=
"height: 250px"
></div>
<p
class=
"tips"
><i
class=
"el-icon-info"
></i>
数据来源大司空建筑大数据平台,统计范围为{{year}}年全国公开的招标项目,未公开的不含在内
</p>
</div>
<div
class=
"main2"
>
<div
class=
"selectYear"
>
<el-select
v-model=
"year"
filterable
class=
"form-content-width"
placeholder=
"请选择"
@
change=
"changeValue()"
>
<el-option
v-for=
"(item, index) in yearData"
:key=
"index"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<div
class=
"table-item"
>
<el-table
:data=
"tableData1"
border
height=
"430"
fit
highlight-current-row
>
<el-table-column
label=
"序号"
width=
"60"
align=
"left"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"label"
label=
"月份"
/>
<el-table-column
prop=
"count"
sortable
label=
"招标数量"
align=
"right"
/>
<el-table-column
prop=
"rate"
sortable
label=
"占比(%)"
align=
"right"
/>
</el-table>
</div>
</div>
</div>
</div>
</template>
<
script
>
import
*
as
echarts
from
'echarts'
;
import
{
countGroupByMonth
,
countGroupByProvince
,
getYear
}
from
'@/api/macro/macro'
export
default
{
name
:
'NationalEconomies'
,
data
()
{
return
{
year
:
'近一年'
,
yearOptions
:
[
{
label
:
'近五年'
,
value
:
'近五年'
},
{
label
:
'近三年'
,
value
:
'近三年'
},
{
label
:
'近一年'
,
value
:
'近一年'
},
],
tableData
:[
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
{
type
:
''
,
count
:
''
,
},
],
tableData1
:[],
dataSort
:[
{
label
:
''
,
count
:
''
},
{
label
:
''
,
count
:
''
},
],
totalCount
:
''
,
punishDateValue
:
"请选择"
,
value
:
'近五年'
,
punishDateShowPopper
:
false
,
punishDate
:
""
,
yearData
:[
{
label
:
'近一年'
,
value
:
'近一年'
},
{
label
:
'近二年'
,
value
:
'近二年'
},
{
label
:
'近三年'
,
value
:
'近三年'
},
],
myChart
:
''
,
myChart1
:
''
,
}
},
created
()
{
this
.
getDataByProvince
({})
let
mydate
=
new
Date
();
var
startTime
,
endTime
,
Year
,
Month
,
Day
,
startyear
Year
=
mydate
.
getFullYear
();
Month
=
mydate
.
getMonth
()
+
1
;
Day
=
mydate
.
getDate
();
Month
=
Month
<
10
?
'0'
+
Month
:
Month
Day
=
Day
<
10
?
'0'
+
Day
:
Day
startyear
=
mydate
.
getFullYear
()
-
1
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
let
params
=
{
startDate
:
startTime
,
endDate
:
endTime
}
this
.
getDataByMonth
(
params
)
this
.
$nextTick
(()
=>
{
// this.initChart()
// this.initChart1()
})
window
.
addEventListener
(
"resize"
,
this
.
resizeEcharts
);
},
beforeDestroy
(){
window
.
removeEventListener
(
"resize"
,
this
.
resizeEcharts
);
},
activated
()
{
this
.
resizeEcharts
()
},
methods
:
{
resizeEcharts
(){
const
self
=
this
setTimeout
(
function
(){
//图表跟随页面大小变化宽度
self
.
myChart
.
resize
()
self
.
myChart1
.
resize
()
},
10
)
},
getDataByProvince
(
params
){
countGroupByProvince
(
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
data
.
provinceDate
;
let
arr
=
[]
for
(
let
i
=
0
;
i
<
res
.
data
.
provinceDate
.
length
;
i
++
){
if
(
res
.
data
.
provinceDate
[
i
].
type
!=
'全国'
){
arr
.
push
(
res
.
data
.
provinceDate
[
i
])
}
}
this
.
dataList
=
arr
;
this
.
totalCount
=
res
.
data
.
totalCount
;
this
.
initChart
()
})
},
getDataByMonth
(
params
){
countGroupByMonth
(
params
).
then
(
res
=>
{
this
.
tableData1
=
res
.
data
;
let
companyValue1
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tableData1
))
let
arr
=
this
.
tableData1
.
sort
((
a
,
b
)
=>
{
return
b
.
count
-
a
.
count
})
this
.
tableData1
=
JSON
.
parse
(
JSON
.
stringify
(
companyValue1
))
this
.
dataSort
=
arr
;
this
.
initChart1
()
})
},
initChart
()
{
this
.
myChart
=
echarts
.
init
(
document
.
getElementById
(
"zb-echarts"
))
let
option
=
{
tooltip
:
{
trigger
:
'axis'
,
//坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'shadow'
// 默认为直线,可选为:'line' | 'shadow'
}
},
grid
:
{
left
:
'5'
,
right
:
'5'
,
top
:
'15'
,
bottom
:
'10'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
data
:
this
.
dataList
.
map
(
item
=>
item
.
type
),
axisLabel
:
{
show
:
true
,
// "interval": 0,
"rotate"
:
40
//X轴倾斜度
},
},
yAxis
:
{
type
:
'value'
,
},
series
:
[
{
data
:
this
.
dataList
.
map
(
item
=>
item
.
count
),
type
:
'bar'
,
barWidth
:
16
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
4
,
4
,
0
,
0
],
color
:
'#165DFF'
,
label
:
{
show
:
false
,
//开启显示
position
:
'top'
,
//在上方显示
textStyle
:
{
//数值样式
color
:
'#165DFF'
,
fontSize
:
16
}
}
},
// 移入当前的柱状图时改变颜色
emphasis
:
{
color
:
'#3384FF'
,
}
}
}
]
};
this
.
myChart
.
setOption
(
option
);
},
initChart1
()
{
this
.
myChart1
=
echarts
.
init
(
document
.
getElementById
(
"gl-echarts"
))
let
dataList
=
this
.
tableData1
;
let
option
=
{
tooltip
:
{
trigger
:
'axis'
,
//坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'shadow'
// 默认为直线,可选为:'line' | 'shadow'
}
},
grid
:
{
left
:
'5'
,
right
:
'5'
,
top
:
'20'
,
bottom
:
'10'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
data
:
this
.
tableData1
.
map
(
item
=>
item
.
label
),
axisLabel
:
{
show
:
true
,
// "interval": 0,
"rotate"
:
this
.
year
===
'近二年'
||
this
.
year
===
'近三年'
?
40
:
0
//X轴倾斜度
},
},
yAxis
:
{
type
:
'value'
},
series
:
[
{
data
:
this
.
tableData1
.
map
(
item
=>
item
.
count
),
type
:
'bar'
,
barWidth
:
16
,
itemStyle
:
{
normal
:
{
barBorderRadius
:
[
4
,
4
,
0
,
0
],
// color: '#2ECFCF',
color
:
function
(
params
)
{
var
colorList
=
[]
//定义一个存储颜色的数组
//更改前二位柱形颜色
//定义一个变量 保存柱形图数据 因为sort方法排序会改变原数组 使用JSON方法深拷贝 将原数值暂存
let
dataArr
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
))
let
arr
=
dataList
.
sort
((
a
,
b
)
=>
{
return
b
.
count
-
a
.
count
})
//将原数组数据赋值回去 保持数据不变
dataList
=
JSON
.
parse
(
JSON
.
stringify
(
dataArr
))
//遍历数据 将原数组和排序后的数组比较
dataList
.
map
(
i
=>
{
if
(
i
.
count
==
arr
[
0
].
count
)
{
colorList
.
push
(
'#F39F35'
)
}
else
if
(
i
.
count
==
arr
[
1
].
count
)
{
colorList
.
push
(
'#6675A5'
)
}
else
{
colorList
.
push
(
'#2ECFCF'
)
}
})
//返回一个存储着颜色的数组根据数据index顺序渲染到页面
return
colorList
[
params
.
dataIndex
]
},
},
}
}
]
};
this
.
myChart1
.
setOption
(
option
);
},
handleDate
(
command
)
{
if
(
command
&&
command
!=
"自定义"
)
{
this
.
punishDateValue
=
command
;
this
.
$refs
.
punishDateShowPopper
.
hide
();
this
.
value
=
command
;
let
mydate
=
new
Date
();
var
startTime
,
endTime
,
Year
,
Month
,
Day
,
startyear
Year
=
mydate
.
getFullYear
();
Month
=
mydate
.
getMonth
()
+
1
;
Day
=
mydate
.
getDate
();
Month
=
Month
<
10
?
'0'
+
Month
:
Month
Day
=
Day
<
10
?
'0'
+
Day
:
Day
switch
(
command
)
{
case
"近五年"
:
startyear
=
mydate
.
getFullYear
()
-
5
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近三年"
:
startyear
=
mydate
.
getFullYear
()
-
3
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近一年"
:
startyear
=
mydate
.
getFullYear
()
-
1
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
}
let
params
=
{
startDate
:
startTime
,
endDate
:
endTime
}
this
.
getDataByProvince
(
params
)
}
else
if
(
command
==
"自定义"
)
{
this
.
$refs
.
datePicker
.
pickerVisible
=
true
;
}
else
{
this
.
$refs
.
punishDateShowPopper
.
hide
();
this
.
punishDateValue
=
""
;
this
.
punishDate
=
""
;
}
},
changepunishDate
()
{
if
(
this
.
punishDate
)
{
this
.
punishDateValue
=
"自定义"
;
this
.
value
=
this
.
punishDate
[
0
]
+
' - '
+
this
.
punishDate
[
1
];
let
params
=
{
startDate
:
this
.
punishDate
[
0
],
endDate
:
this
.
punishDate
[
1
]
}
this
.
getDataByProvince
(
params
)
}
},
hidePoper
()
{
if
(
this
.
$refs
.
datePicker
)
{
this
.
$refs
.
datePicker
.
pickerVisible
=
false
;
}
},
mouseenter
()
{
this
.
punishDateShowPopper
=
true
;
if
(
this
.
punishDateValue
==
'自定义'
){
this
.
$nextTick
(()
=>
{
// this.$refs.datePicker.focus()
this
.
$refs
.
datePicker
.
pickerVisible
=
true
;
});
}
},
changeValue
(){
let
mydate
=
new
Date
();
var
startTime
,
endTime
,
Year
,
Month
,
Day
,
startyear
Year
=
mydate
.
getFullYear
();
Month
=
mydate
.
getMonth
()
+
1
;
Day
=
mydate
.
getDate
();
Month
=
Month
<
10
?
'0'
+
Month
:
Month
Day
=
Day
<
10
?
'0'
+
Day
:
Day
switch
(
this
.
year
)
{
case
"近三年"
:
startyear
=
mydate
.
getFullYear
()
-
3
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近二年"
:
startyear
=
mydate
.
getFullYear
()
-
2
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
case
"近一年"
:
startyear
=
mydate
.
getFullYear
()
-
1
;
startTime
=
startyear
+
"-"
+
Month
+
"-"
+
Day
;
endTime
=
Year
+
"-"
+
Month
+
"-"
+
Day
;
break
;
}
let
params
=
{
startDate
:
startTime
,
endDate
:
endTime
}
this
.
getDataByMonth
(
params
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.land_date_picker
{
position
:
absolute
!
important
;
visibility
:
hidden
;
left
:
-645px
;
top
:
145px
;
}
::v-deep
.el-popper
.popper__arrow
,
.el-popper
.popper__arrow
::after
{
display
:
none
;
}
.color_text
{
background
:
#F3F4F5
;
border-radius
:
4px
;
color
:
#0081FF
;
}
.shangji
{
.zb-content
{
background
:
#ffffff
;
border-radius
:
4px
;
margin-top
:
12px
;
padding
:
16px
;
}
.text
{
width
:
100%
;
line-height
:
28px
;
padding
:
0
16px
;
margin-top
:
24px
;
font-size
:
12px
;
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
background
:
#F4F4F5
;
border-radius
:
2px
;
margin-bottom
:
24px
;
}
.tips
{
margin
:
0
;
font-size
:
12px
;
color
:
rgba
(
35
,
35
,
35
,
0
.4
);
i
{
color
:
#909399
;
margin-right
:
9px
;
font-size
:
14px
;
}
}
.content1
{
.main2
{
margin-top
:
30px
;
.head
{
span
{
font-size
:
12px
;
color
:
rgba
(
35
,
35
,
35
,
0
.8
);
}
.number
{
color
:
#FF3C3C
;
}
::v-deep
.el-select
{
width
:
100px
;
height
:
32px
;
.el-input
{
width
:
100%
;
height
:
32px
;
}
.el-input__inner
{
height
:
32px
!
important
;
line-height
:
32px
;
}
}
.el-dropdown-link
{
width
:
96px
;
height
:
32px
;
display
:
inline-block
;
line-height
:
32px
;
text-align
:
center
;
background
:
#FFFFFF
;
border-radius
:
4px
;
border
:
1px
solid
#D9D9D9
;
cursor
:
pointer
;
i
{
margin-left
:
8px
;
}
}
}
}
.table-item
{
margin-top
:
12px
;
}
}
.content2
{
.main2
{
.selectYear
{
height
:
32px
;
float
:
right
;
margin-bottom
:
16px
;
}
::v-deep
.el-select
{
width
:
100px
;
height
:
32px
;
.el-input
{
width
:
100%
;
height
:
32px
;
}
.el-input__inner
{
height
:
32px
!
important
;
line-height
:
32px
;
}
}
margin-top
:
32px
;
}
}
.table-item
{
::v-deep
.el-table
{
.el-table__header-wrapper
{
th
{
padding
:
0
;
}
}
.el-table__cell.is-right
{
text-align
:
right
;
}
.has-gutter
{
tr
{
th
:nth-child
(
4
)
{
border-right
:
0
;
.cell
{
padding-right
:
24px
!
important
;
}
}
}
}
.el-table__cell.gutter
{
background
:
#F0F3FA
;
width
:
16px
!
important
;
}
.el-table__row
{
td
:last-child
{
.cell
{
padding-right
:
24px
!
important
;
}
}
}
th
{
font-size
:
12px
!
important
;
font-weight
:
400
!
important
;
}
.el-table__fixed-header-wrapper
th
{
background
:
#F0F3FA
;
}
td
.el-table__cell
{
border-bottom
:
0
;
}
.caret-wrapper
{
width
:
10px
;
}
}
}
::v-deep
.el-input--medium
{
.el-input__icon
{
line-height
:
32px
;
}
}
}
</
style
>
dsk-operate-ui/src/views/macro/nationalEconomies/index.vue
View file @
c9a9cd41
...
...
@@ -4,14 +4,14 @@
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"全国经济大全"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"全国商机项目分析"
name=
"second"
></el-tab-pane>
<
el-tab-pane
label=
"全国中标市场分析"
name=
"third"
></el-tab-pane
>
<el-tab-pane
label=
"全国
建筑企业
分析"
name=
"fourth"
></el-tab-pane>
<
!--
<el-tab-pane
label=
"全国中标市场分析"
name=
"third"
></el-tab-pane>
--
>
<el-tab-pane
label=
"全国
中标市场
分析"
name=
"fourth"
></el-tab-pane>
</el-tabs>
</div>
<Economic
v-if=
"activeName === 'first'"
></Economic>
<Sjxmfx
v-if=
"activeName === 'second'"
></Sjxmfx>
<
Zhongbiao
v-if=
"activeName === 'third'"
></Zhongbiao
>
<
!--
<Zhongbiao
v-if=
"activeName === 'third'"
></Zhongbiao>
--
>
<Jzqyfx
v-if=
"activeName === 'fourth'"
></Jzqyfx>
</div>
</
template
>
...
...
@@ -28,7 +28,7 @@ export default {
},
data
()
{
return
{
activeName
:
'
first
'
activeName
:
'
second
'
}
},
created
()
{
...
...
dsk-operate-ui/src/views/macro/urban/index.vue
View file @
c9a9cd41
...
...
@@ -162,8 +162,8 @@
<el-table-column
prop=
"companyName"
label=
"公司名称"
width=
"300"
fixed
>
<
template
slot-scope=
"scope"
>
<router-link
:to=
"`/enterprise/$
{encodeStr(scope.row.companyId)}`" tag="a" class="a-link companyName" v-html="scope.row.companyName" >
</router-link>
<span
@
click=
"handleClick(scope.row)"
class=
"table-span"
style=
"color: #3D3D3D;cursor: pointer;"
v-if=
"scope.row.claimStatus ===
0
"
><img
src=
"@/assets/images/urban/rl_icon1.png"
/>
认领
</span>
<span
@
click=
"cancelClaim(scope.row.companyName)"
class=
"table-span"
style=
"color: rgba(35,35,35,0.4);cursor: pointer;"
v-if=
"scope.row.claimStatus ===
1
"
><img
src=
"@/assets/images/urban/rl_icon2.png"
/>
已认领
</span>
<span
@
click=
"handleClick(scope.row)"
class=
"table-span"
style=
"color: #3D3D3D;cursor: pointer;"
v-if=
"scope.row.claimStatus ===
null || scope.row.claimStatus === 1
"
><img
src=
"@/assets/images/urban/rl_icon1.png"
/>
认领
</span>
<span
@
click=
"cancelClaim(scope.row.companyName)"
class=
"table-span"
style=
"color: rgba(35,35,35,0.4);cursor: pointer;"
v-if=
"scope.row.claimStatus ===
0
"
><img
src=
"@/assets/images/urban/rl_icon2.png"
/>
已认领
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"city"
label=
"区域"
:formatter=
"formatStatus"
width=
"150"
>
...
...
@@ -785,20 +785,20 @@ export default {
registerAddress
:
registerAddress
,
creditCode
:
res
.
data
.
creditCode
,
}
customerStatus
(
item
.
companyName
.
replace
(
/<
[^
>
]
+>/g
,
''
)).
then
(
res
=>
{
if
(
res
.
data
===
1
){
this
.
claimVisible1
=
true
;
}
else
{
claim
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
){
this
.
claimVisible
=
true
;
this
.
customerId
=
res
.
data
.
customerId
;
this
.
querySubmit
()
}
})
}
})
if
(
item
.
claimStatus
===
1
)
{
this
.
claimVisible1
=
true
;
}
else
{
claim
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
claimVisible
=
true
;
this
.
customerId
=
res
.
data
.
customerId
;
this
.
querySubmit
()
}
})
}
// customerStatus(item.companyName.replace(/
<
[
^>
]
+>
/g, ''
))
.then
(
res =>
{
//
//
})
}
})
}
...
...
dsk-system/src/main/java/com/dsk/system/dskService/EnterpriseService.java
View file @
c9a9cd41
package
com
.
dsk
.
system
.
dskService
;
import
cn.hutool.core.bean.BeanException
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
...
...
@@ -13,6 +14,7 @@ import com.dsk.common.core.redis.RedisCache;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.common.utils.EncodeIdUtil
;
import
com.dsk.system.domain.customer.vo.CustomerStatusListVo
;
import
com.dsk.system.searchService.BusinessOpportunityRadarService
;
import
com.dsk.system.service.ICustomerService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.MapUtils
;
...
...
@@ -21,11 +23,9 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
/**
...
...
@@ -80,7 +80,7 @@ public class EnterpriseService {
Integer
bondCreditRatingCode
=
MapUtils
.
getInteger
(
bondCreditRatingMap
,
"code"
,
300
);
if
(
200
!=
bondCreditRatingCode
)
return
R
.
ok
(
companyData
);
List
<
Map
<
String
,
Object
>>
bondCreditRatingList
=
(
List
<
Map
<
String
,
Object
>>)
MapUtils
.
getObject
(
bondCreditRatingMap
,
"data"
,
new
ArrayList
<>());
List
<
Map
<
String
,
Object
>>
bondCreditRatingList
=
(
List
<
Map
<
String
,
Object
>>)
MapUtils
.
getObject
(
bondCreditRatingMap
,
"data"
,
new
ArrayList
<>());
if
(
CollectionUtils
.
isEmpty
(
bondCreditRatingList
))
return
R
.
ok
(
companyData
);
companyData
.
put
(
"bratingSubjectLevel"
,
MapUtils
.
getString
(
bondCreditRatingList
.
get
(
0
),
"bratingSubjectLevel"
,
null
));
...
...
@@ -248,8 +248,8 @@ public class EnterpriseService {
for
(
Object
dataMap
:
list
)
{
String
name
=
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"companyName"
);
if
(
ObjectUtil
.
isNotEmpty
(
name
)
&&
ObjectUtil
.
isNotEmpty
(
body
.
getKeys
()))
{
name
=
name
.
replaceAll
(
"<font color='red'>"
,
""
);
name
=
name
.
replaceAll
(
"</font>"
,
""
);
name
=
name
.
replaceAll
(
"<font color='red'>"
,
""
);
name
=
name
.
replaceAll
(
"</font>"
,
""
);
companyNames
.
add
(
name
);
}
else
{
companyNames
.
add
(
name
);
...
...
@@ -267,7 +267,7 @@ public class EnterpriseService {
if
(
codeRating
.
equals
(
HttpStatus
.
OK
.
value
()))
{
Object
object
=
bondCreditRatingMap
.
get
(
"data"
);
if
(
ObjectUtil
.
isNotEmpty
(
object
))
{
objArrayList
=
(
ArrayList
)
object
;
objArrayList
=
(
ArrayList
)
object
;
}
}
...
...
@@ -278,45 +278,45 @@ public class EnterpriseService {
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
);
String
companyName
=
MapUtils
.
getString
(
companyMap
,
"companyName"
,
""
);
if
(
ObjectUtil
.
isNotEmpty
(
companyName
)
&&
ObjectUtil
.
isNotEmpty
(
body
.
getKeys
()))
{
companyName
=
companyName
.
replace
(
"<font color='red'>"
,
""
);
companyName
=
companyName
.
replace
(
"</font>"
,
""
);
companyName
=
companyName
.
replace
(
"<font color='red'>"
,
""
);
companyName
=
companyName
.
replace
(
"</font>"
,
""
);
}
Long
companyId
=
MapUtils
.
getLong
(
companyMap
,
"companyId"
);
companyMap
.
put
(
"bondBalance"
,
MapUtils
.
getDouble
(
companyMap
,
"bondBalance"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"bondBalance"
)));
companyMap
.
put
(
"totalAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"totalAssets"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"totalAssets"
)));
companyMap
.
put
(
"belongNetAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetAssets"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetAssets"
)));
companyMap
.
put
(
"monetaryFunds"
,
MapUtils
.
getDouble
(
companyMap
,
"monetaryFunds"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"monetaryFunds"
)));
companyMap
.
put
(
"landAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"landAssets"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"landAssets"
)));
companyMap
.
put
(
"restrictedAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"restrictedAssets"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"restrictedAssets"
)));
companyMap
.
put
(
"accountsReceivable"
,
MapUtils
.
getDouble
(
companyMap
,
"accountsReceivable"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"accountsReceivable"
)));
companyMap
.
put
(
"otherReceivable"
,
MapUtils
.
getDouble
(
companyMap
,
"otherReceivable"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"otherReceivable"
)));
companyMap
.
put
(
"econData_001"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_001"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_001"
)));
companyMap
.
put
(
"govSubsidy"
,
MapUtils
.
getDouble
(
companyMap
,
"govSubsidy"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"govSubsidy"
)));
companyMap
.
put
(
"specialPayable"
,
MapUtils
.
getDouble
(
companyMap
,
"specialPayable"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"specialPayable"
)));
companyMap
.
put
(
"operatingIncome"
,
MapUtils
.
getDouble
(
companyMap
,
"operatingIncome"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"operatingIncome"
)));
companyMap
.
put
(
"belongNetProfit"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetProfit"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetProfit"
)));
companyMap
.
put
(
"roe"
,
MapUtils
.
getDouble
(
companyMap
,
"roe"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"roe"
)));
companyMap
.
put
(
"netOperatingCashFlow"
,
MapUtils
.
getDouble
(
companyMap
,
"netOperatingCashFlow"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"netOperatingCashFlow"
)));
companyMap
.
put
(
"netFinancingCashFlow"
,
MapUtils
.
getDouble
(
companyMap
,
"netFinancingCashFlow"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"netFinancingCashFlow"
)));
companyMap
.
put
(
"netInvestmentCashFlow"
,
MapUtils
.
getDouble
(
companyMap
,
"netInvestmentCashFlow"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"netInvestmentCashFlow"
)));
companyMap
.
put
(
"totalLiabilities"
,
MapUtils
.
getDouble
(
companyMap
,
"totalLiabilities"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"totalLiabilities"
)));
companyMap
.
put
(
"uipInterestBearingDebt"
,
MapUtils
.
getDouble
(
companyMap
,
"uipInterestBearingDebt"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"uipInterestBearingDebt"
)));
companyMap
.
put
(
"econData_002"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_002"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_002"
)));
companyMap
.
put
(
"ofcb"
,
MapUtils
.
getDouble
(
companyMap
,
"ofcb"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"ofcb"
)));
companyMap
.
put
(
"cashRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"cashRatio"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"cashRatio"
)));
companyMap
.
put
(
"cashFlowRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"cashFlowRatio"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"cashFlowRatio"
)));
companyMap
.
put
(
"cashDebtRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"cashDebtRatio"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"cashDebtRatio"
)));
companyMap
.
put
(
"creditBalance"
,
MapUtils
.
getDouble
(
companyMap
,
"creditBalance"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"creditBalance"
)));
companyMap
.
put
(
"econData_003"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_003"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_003"
)));
companyMap
.
put
(
"ebitdaIcr"
,
MapUtils
.
getDouble
(
companyMap
,
"ebitdaIcr"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"ebitdaIcr"
)));
companyMap
.
put
(
"ppnBalanceProp"
,
MapUtils
.
getDouble
(
companyMap
,
"ppnBalanceProp"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"ppnBalanceProp"
)));
companyMap
.
put
(
"econData_004"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_004"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_004"
)));
companyMap
.
put
(
"econData_005"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_005"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_005"
)));
companyMap
.
put
(
"econData_006"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_006"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_006"
)));
companyMap
.
put
(
"nonStandardBalance"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardBalance"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardBalance"
)));
companyMap
.
put
(
"nonStandardRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardRatio"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardRatio"
)));
companyMap
.
put
(
"guaranteeAmount"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeAmount"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeAmount"
)));
companyMap
.
put
(
"guaranteeRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeRatio"
)==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeRatio"
)));
companyMap
.
put
(
"bondBalance"
,
MapUtils
.
getDouble
(
companyMap
,
"bondBalance"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"bondBalance"
)));
companyMap
.
put
(
"totalAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"totalAssets"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"totalAssets"
)));
companyMap
.
put
(
"belongNetAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetAssets"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetAssets"
)));
companyMap
.
put
(
"monetaryFunds"
,
MapUtils
.
getDouble
(
companyMap
,
"monetaryFunds"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"monetaryFunds"
)));
companyMap
.
put
(
"landAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"landAssets"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"landAssets"
)));
companyMap
.
put
(
"restrictedAssets"
,
MapUtils
.
getDouble
(
companyMap
,
"restrictedAssets"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"restrictedAssets"
)));
companyMap
.
put
(
"accountsReceivable"
,
MapUtils
.
getDouble
(
companyMap
,
"accountsReceivable"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"accountsReceivable"
)));
companyMap
.
put
(
"otherReceivable"
,
MapUtils
.
getDouble
(
companyMap
,
"otherReceivable"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"otherReceivable"
)));
companyMap
.
put
(
"econData_001"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_001"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_001"
)));
companyMap
.
put
(
"govSubsidy"
,
MapUtils
.
getDouble
(
companyMap
,
"govSubsidy"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"govSubsidy"
)));
companyMap
.
put
(
"specialPayable"
,
MapUtils
.
getDouble
(
companyMap
,
"specialPayable"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"specialPayable"
)));
companyMap
.
put
(
"operatingIncome"
,
MapUtils
.
getDouble
(
companyMap
,
"operatingIncome"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"operatingIncome"
)));
companyMap
.
put
(
"belongNetProfit"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetProfit"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"belongNetProfit"
)));
companyMap
.
put
(
"roe"
,
MapUtils
.
getDouble
(
companyMap
,
"roe"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"roe"
)));
companyMap
.
put
(
"netOperatingCashFlow"
,
MapUtils
.
getDouble
(
companyMap
,
"netOperatingCashFlow"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"netOperatingCashFlow"
)));
companyMap
.
put
(
"netFinancingCashFlow"
,
MapUtils
.
getDouble
(
companyMap
,
"netFinancingCashFlow"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"netFinancingCashFlow"
)));
companyMap
.
put
(
"netInvestmentCashFlow"
,
MapUtils
.
getDouble
(
companyMap
,
"netInvestmentCashFlow"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"netInvestmentCashFlow"
)));
companyMap
.
put
(
"totalLiabilities"
,
MapUtils
.
getDouble
(
companyMap
,
"totalLiabilities"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"totalLiabilities"
)));
companyMap
.
put
(
"uipInterestBearingDebt"
,
MapUtils
.
getDouble
(
companyMap
,
"uipInterestBearingDebt"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"uipInterestBearingDebt"
)));
companyMap
.
put
(
"econData_002"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_002"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_002"
)));
companyMap
.
put
(
"ofcb"
,
MapUtils
.
getDouble
(
companyMap
,
"ofcb"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"ofcb"
)));
companyMap
.
put
(
"cashRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"cashRatio"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"cashRatio"
)));
companyMap
.
put
(
"cashFlowRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"cashFlowRatio"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"cashFlowRatio"
)));
companyMap
.
put
(
"cashDebtRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"cashDebtRatio"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"cashDebtRatio"
)));
companyMap
.
put
(
"creditBalance"
,
MapUtils
.
getDouble
(
companyMap
,
"creditBalance"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"creditBalance"
)));
companyMap
.
put
(
"econData_003"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_003"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_003"
)));
companyMap
.
put
(
"ebitdaIcr"
,
MapUtils
.
getDouble
(
companyMap
,
"ebitdaIcr"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"ebitdaIcr"
)));
companyMap
.
put
(
"ppnBalanceProp"
,
MapUtils
.
getDouble
(
companyMap
,
"ppnBalanceProp"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"ppnBalanceProp"
)));
companyMap
.
put
(
"econData_004"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_004"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_004"
)));
companyMap
.
put
(
"econData_005"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_005"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_005"
)));
companyMap
.
put
(
"econData_006"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_006"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"econData_006"
)));
companyMap
.
put
(
"nonStandardBalance"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardBalance"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardBalance"
)));
companyMap
.
put
(
"nonStandardRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardRatio"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"nonStandardRatio"
)));
companyMap
.
put
(
"guaranteeAmount"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeAmount"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeAmount"
)));
companyMap
.
put
(
"guaranteeRatio"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeRatio"
)
==
null
?
null
:
String
.
format
(
"%.2f"
,
MapUtils
.
getDouble
(
companyMap
,
"guaranteeRatio"
)));
companyMap
.
put
(
"claimStatus"
,
null
);
for
(
CustomerStatusListVo
vo
:
claimStatusList
)
{
...
...
@@ -371,6 +371,7 @@ public class EnterpriseService {
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/bondCreditRating"
,
BeanUtil
.
beanToMap
(
body
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
R
.
class
);
}
public
R
getUipIdByCid
(
List
<
Integer
>
body
)
throws
Exception
{
if
(
CollectionUtils
.
isEmpty
(
body
))
return
R
.
ok
();
HashMap
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
...
...
@@ -396,9 +397,40 @@ public class EnterpriseService {
}
Object
data
=
map
.
get
(
"data"
);
if
(
ObjectUtil
.
isNotEmpty
(
data
))
{
redisCache
.
setCacheList
(
redisKey
,
(
List
)
data
);
redisCache
.
setCacheList
(
redisKey
,
(
List
)
data
);
redisCache
.
expire
(
redisKey
,
24
,
TimeUnit
.
HOURS
);
}
return
BeanUtil
.
toBean
(
map
,
R
.
class
);
}
@Autowired
private
BusinessOpportunityRadarService
opportunityRadarService
;
//企业id、uipId
public
Map
<
String
,
Object
>
getCidAndUipIdByCompanyName
(
String
companyName
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
if
(
ObjectUtils
.
isEmpty
(
companyName
))
return
result
;
try
{
Map
<
String
,
Object
>
map
=
opportunityRadarService
.
enterpriseByName
(
companyName
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
result
.
put
(
"companyId"
,
MapUtil
.
getInt
(
BeanUtil
.
beanToMap
(
map
.
get
(
"data"
)),
"jskEid"
));
}
if
(!
ObjectUtil
.
isEmpty
(
result
.
get
(
"companyId"
)))
{
R
res
=
this
.
getUipIdByCid
(
new
ArrayList
<>(
MapUtils
.
getInteger
(
result
,
"companyId"
)));
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
()))
{
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
res
.
getData
();
result
.
put
(
"uipId"
,
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
data
.
get
((
0
))),
"uipId"
));
}
}
if
(
ObjectUtil
.
isEmpty
(
result
.
get
(
"uipId"
)))
{
R
res
=
this
.
getUipId
(
companyName
);
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
()))
{
result
.
put
(
"uipId"
,
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
res
.
getData
()),
"uipId"
));
}
}
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取企业id错误!error:{}"
,
e
.
getMessage
());
}
return
result
;
}
}
dsk-system/src/main/java/com/dsk/system/service/IBusinessInfoService.java
View file @
c9a9cd41
...
...
@@ -100,11 +100,4 @@ public interface IBusinessInfoService
List
<
CustomerBusinessListVo
>
selectCustomerBusinessList
(
CustomerBusinessSearchDto
dto
);
/**
* 查询企业的城投id和建设库id
* @param companyName
* @return
*/
Map
queryUipIdOrCid
(
String
companyName
);
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
c9a9cd41
...
...
@@ -26,6 +26,7 @@ import com.dsk.system.domain.customer.vo.CustomerVo;
import
com.dsk.system.domain.business.vo.BusinessBrowseVo
;
import
com.dsk.system.domain.business.vo.BusinessLabelVo
;
import
com.dsk.system.domain.business.vo.BusinessListVo
;
import
com.dsk.system.dskService.EnterpriseService
;
import
com.dsk.system.mapper.BusinessInfoMapper
;
import
com.dsk.system.mapper.BusinessLabelMapper
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
...
...
@@ -66,6 +67,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
private
DskOpenApiUtil
dskOpenApiUtil
;
@Autowired
private
ICustomerService
customerService
;
@Autowired
private
EnterpriseService
enterpriseService
;
/**
...
...
@@ -98,8 +101,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
List
<
BusinessListVo
>
businessListVos
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
if
(!
CollectionUtils
.
isEmpty
(
businessListVos
)
&&
ObjectUtil
.
isNotEmpty
(
dto
.
getProjectName
()))
{
for
(
BusinessListVo
vo
:
businessListVos
)
{
vo
.
setProjectName
(
StringUtils
.
markInRed
(
vo
.
getProjectName
(),
dto
.
getProjectName
()));
vo
.
setOwnerCompany
(
StringUtils
.
markInRed
(
vo
.
getOwnerCompany
(),
dto
.
getProjectName
()));
vo
.
setProjectName
(
StringUtils
.
markInRed
(
vo
.
getProjectName
(),
dto
.
getProjectName
()));
vo
.
setOwnerCompany
(
StringUtils
.
markInRed
(
vo
.
getOwnerCompany
(),
dto
.
getProjectName
()));
}
}
return
businessListVos
;
...
...
@@ -144,7 +147,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
for
(
Map
<
String
,
Object
>
map
:
list
)
{
BusinessLikeProjectNameListVo
vo
=
new
BusinessLikeProjectNameListVo
();
vo
.
setProjectName
(
StringUtils
.
markInRed
(
MapUtil
.
getStr
(
map
,
"projectName"
),
dto
.
getProjectName
()));
vo
.
setProjectName
(
StringUtils
.
markInRed
(
MapUtil
.
getStr
(
map
,
"projectName"
),
dto
.
getProjectName
()));
vo
.
setCompanyName
(
MapUtil
.
getStr
(
map
,
"tenderee"
));
vo
.
setInvestmentAmount
(
Double
.
parseDouble
(
MapUtil
.
getStr
(
map
,
"projectContractAmount"
)));
vo
.
setProjectType
(
MapUtil
.
getStr
(
map
,
"projectType"
));
...
...
@@ -288,17 +291,12 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
if
(!
CheckUtils
.
isPhone
(
businessInfo
.
getConstructionPhone
())
||
!
CheckUtils
.
isPhone
(
businessInfo
.
getSupervisorPhone
()))
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
}
// BusinessInfo info = businessInfoMapper.selectBusinessInfoById(businessInfo.getId());
//查询企业的城投id和建设库id
BusinessRelateCompany
relateCompany
=
relateCompanyMapper
.
selectByProprietor
(
businessInfo
.
getId
());
if
(
ObjectUtil
.
isNotEmpty
(
businessInfo
.
getConstructionUnit
()))
{
Map
map
=
queryUipIdOrCid
(
businessInfo
.
getConstructionUnit
());
if
(
map
.
containsKey
(
"jskEid"
))
{
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessInfo
.
setConstructionUnitUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
Map
<
String
,
Object
>
map
=
enterpriseService
.
getCidAndUipIdByCompanyName
(
businessInfo
.
getConstructionUnit
());
businessInfo
.
setConstructionUnitUipId
(
MapUtils
.
getString
(
map
,
"uipId"
));
businessInfo
.
setConstructionUnitCid
(
MapUtils
.
getInteger
(
map
,
"companyId"
));
//相关企业
if
(
ObjectUtil
.
isEmpty
(
relateCompany
))
{
relateCompanyMapper
.
insertBusinessRelateCompany
(
dealwithCustomer
(
businessInfo
));
...
...
@@ -309,16 +307,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
relateCompany
.
setCompanyName
(
businessInfo
.
getConstructionUnit
());
relateCompanyMapper
.
updateBusinessRelateCompany
(
relateCompany
);
}
// //客户信息
// if(ObjectUtil.isNotEmpty(info.getCustomerId())){
// CustomerVo customerVo = customerService.info(info.getCustomerId());
// customerVo
// customerService.edit(customerVo);
// }else {
// Customer customer = new Customer();
// customer.setCompanyName()
// customerService.add()
// }
}
if
(
ObjectUtil
.
isNotEmpty
(
relateCompany
)
&&
...
...
@@ -382,43 +370,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
return
businessInfoMapper
.
selectCustomerBusinessList
(
dto
);
}
@Override
public
Map
queryUipIdOrCid
(
String
companyName
)
{
Map
<
Object
,
Object
>
map
=
MapUtil
.
builder
().
build
();
if
(
StringUtils
.
isEmpty
(
companyName
))
return
map
;
//查询城投企业
Map
<
String
,
Object
>
paramMap
=
MapUtil
.<
String
,
Object
>
builder
().
put
(
"companyName"
,
companyName
).
build
();
Map
<
String
,
Object
>
resultMap
=
dskOpenApiUtil
.
requestBody
(
"/urbanInvestment/detailsByCompanyName"
,
paramMap
);
Integer
code
=
MapUtils
.
getInteger
(
resultMap
,
"code"
,
300
);
if
(
code
==
HttpStatus
.
SUCCESS
)
{
Map
data
=
MapUtils
.
getMap
(
resultMap
,
"data"
,
null
);
if
(
data
!=
null
)
{
map
.
put
(
"uipId"
,
MapUtils
.
getString
(
data
,
"uipId"
,
null
));
map
.
put
(
"companyId"
,
MapUtils
.
getInteger
(
data
,
"companyId"
,
null
));
}
}
if
(
MapUtil
.
isEmpty
(
map
))
{
//查村建设库企业
Map
<
String
,
Object
>
jskParamMap
=
MapUtil
.<
String
,
Object
>
builder
()
.
put
(
"keyword"
,
companyName
)
.
put
(
"page"
,
MapUtil
.<
String
,
Object
>
builder
().
put
(
"page"
,
1
).
put
(
"limit"
,
10
).
build
())
.
build
();
Map
<
String
,
Object
>
jskResultMap
=
dskOpenApiUtil
.
requestBody
(
"/enterprise/index"
,
jskParamMap
);
if
(
MapUtils
.
getInteger
(
resultMap
,
"code"
,
300
).
equals
(
HttpStatus
.
SUCCESS
))
{
Map
data
=
MapUtils
.
getMap
(
jskResultMap
,
"data"
,
null
);
if
(
data
!=
null
)
{
List
<
Object
>
list
=
CommonUtils
.
assertAsArray
(
MapUtils
.
getObject
(
data
,
"list"
,
""
));
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
for
(
Object
obj
:
list
)
{
map
.
put
(
"jskEid"
,
MapUtils
.
getInteger
(
BeanUtil
.
beanToMap
(
obj
,
false
,
false
),
"jskEid"
,
null
));
}
}
}
}
}
return
map
;
}
private
BusinessRelateCompany
dealwithCustomer
(
BusinessInfo
bean
)
{
BusinessRelateCompany
relateCompany
=
new
BusinessRelateCompany
();
relateCompany
.
setBusinessId
(
bean
.
getId
());
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessRelateCompanyServiceImpl.java
View file @
c9a9cd41
...
...
@@ -7,10 +7,11 @@ import com.dsk.common.exception.base.BaseException;
import
com.dsk.common.utils.CheckUtils
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.system.domain.business.dto.BusinessIdDto
;
import
com.dsk.system.dskService.EnterpriseService
;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
import
com.dsk.system.service.IBusinessInfoService
;
import
com.dsk.system.service.IBusinessRelateCompanyService
;
import
org.apache.commons.collections4.MapUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -26,12 +27,11 @@ import java.util.stream.Collectors;
* @date 2023-05-17
*/
@Service
public
class
BusinessRelateCompanyServiceImpl
implements
IBusinessRelateCompanyService
{
public
class
BusinessRelateCompanyServiceImpl
implements
IBusinessRelateCompanyService
{
@Resource
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
@
Resource
private
IBusinessInfoService
businessInfo
Service
;
@
Autowired
private
EnterpriseService
enterprise
Service
;
/**
* 查询项目关联单位
...
...
@@ -40,8 +40,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 项目关联单位
*/
@Override
public
BusinessRelateCompany
selectBusinessRelateCompanyById
(
Long
id
)
{
public
BusinessRelateCompany
selectBusinessRelateCompanyById
(
Long
id
)
{
return
businessRelateCompanyMapper
.
selectBusinessRelateCompanyById
(
id
);
}
...
...
@@ -52,8 +51,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 项目关联单位
*/
@Override
public
List
<
BusinessRelateCompany
>
selectBusinessRelateCompanyList
(
BusinessRelateCompany
businessRelateCompany
)
{
public
List
<
BusinessRelateCompany
>
selectBusinessRelateCompanyList
(
BusinessRelateCompany
businessRelateCompany
)
{
return
businessRelateCompanyMapper
.
selectBusinessRelateCompanyList
(
businessRelateCompany
);
}
...
...
@@ -65,18 +63,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
*/
@Override
@Transactional
public
int
insertBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
// if(!CheckUtils.isPhone(businessRelateCompany.getPhone())) throw new BaseException("500","请输入正确的电话号码");
businessRelateCompany
.
setCreateTime
(
DateUtils
.
getNowDate
());
//查询企业的城投id和建设库id
Map
map
=
businessInfoService
.
queryUipIdOrCid
(
businessRelateCompany
.
getCompanyName
());
if
(
map
.
containsKey
(
"jskEid"
)){
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessRelateCompany
.
setCompanyUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
public
int
insertBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
if
(
ObjectUtil
.
isNotEmpty
(
businessRelateCompany
.
getPhone
())
&&
!
CheckUtils
.
isPhone
(
businessRelateCompany
.
getPhone
()))
{
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
}
//查询企业的城投id和建设库id
Map
<
String
,
Object
>
map
=
enterpriseService
.
getCidAndUipIdByCompanyName
(
businessRelateCompany
.
getCompanyName
());
businessRelateCompany
.
setCompanyUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
return
businessRelateCompanyMapper
.
insertBusinessRelateCompany
(
businessRelateCompany
);
}
...
...
@@ -88,20 +82,14 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
*/
@Override
@Transactional
public
int
updateBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
if
(
ObjectUtil
.
isNotEmpty
(
businessRelateCompany
.
getPhone
())){
if
(!
CheckUtils
.
isPhone
(
businessRelateCompany
.
getPhone
()))
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
public
int
updateBusinessRelateCompany
(
BusinessRelateCompany
businessRelateCompany
)
{
if
(
ObjectUtil
.
isNotEmpty
(
businessRelateCompany
.
getPhone
())
&&
!
CheckUtils
.
isPhone
(
businessRelateCompany
.
getPhone
()))
{
throw
new
BaseException
(
"500"
,
"请输入正确的电话号码"
);
}
businessRelateCompany
.
setUpdateTime
(
DateUtils
.
getNowDate
());
//查询企业的城投id和建设库id
Map
map
=
businessInfoService
.
queryUipIdOrCid
(
businessRelateCompany
.
getCompanyName
());
if
(
map
.
containsKey
(
"jskEid"
)){
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"jskEid"
,
null
));
}
else
{
businessRelateCompany
.
setCompanyUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
}
Map
<
String
,
Object
>
map
=
enterpriseService
.
getCidAndUipIdByCompanyName
(
businessRelateCompany
.
getCompanyName
());
businessRelateCompany
.
setCompanyUipId
(
MapUtils
.
getString
(
map
,
"uipId"
,
null
));
businessRelateCompany
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
,
null
));
return
businessRelateCompanyMapper
.
updateBusinessRelateCompany
(
businessRelateCompany
);
}
...
...
@@ -112,8 +100,7 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 结果
*/
@Override
public
int
deleteBusinessRelateCompanyByIds
(
Long
[]
ids
)
{
public
int
deleteBusinessRelateCompanyByIds
(
Long
[]
ids
)
{
return
businessRelateCompanyMapper
.
deleteBusinessRelateCompanyByIds
(
ids
);
}
...
...
@@ -124,18 +111,17 @@ public class BusinessRelateCompanyServiceImpl implements IBusinessRelateCompanyS
* @return 结果
*/
@Override
public
int
deleteBusinessRelateCompanyById
(
Long
id
)
{
public
int
deleteBusinessRelateCompanyById
(
Long
id
)
{
return
businessRelateCompanyMapper
.
deleteBusinessRelateCompanyById
(
id
);
}
@Override
public
List
<
String
>
companyRoleList
(
BusinessIdDto
dto
)
{
List
<
BusinessRelateCompany
>
roleList
=
businessRelateCompanyMapper
.
selectList
(
Wrappers
.<
BusinessRelateCompany
>
lambdaQuery
()
List
<
BusinessRelateCompany
>
roleList
=
businessRelateCompanyMapper
.
selectList
(
Wrappers
.<
BusinessRelateCompany
>
lambdaQuery
()
.
select
(
BusinessRelateCompany:
:
getCompanyRole
)
.
eq
(
BusinessRelateCompany:
:
getBusinessId
,
dto
.
getBusinessId
())
.
groupBy
(
BusinessRelateCompany:
:
getCompanyRole
)
.
orderByDesc
(
BusinessRelateCompany:
:
getCreateTime
));
return
roleList
.
stream
().
map
(
p
->
p
.
getCompanyRole
()).
collect
(
Collectors
.
toList
());
return
roleList
.
stream
().
map
(
p
->
p
.
getCompanyRole
()).
collect
(
Collectors
.
toList
());
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/ContactInfoServiceImpl.java
View file @
c9a9cd41
...
...
@@ -6,14 +6,18 @@ import com.dsk.common.utils.SecurityUtils;
import
com.dsk.system.domain.customer.ContactInfo
;
import
com.dsk.system.domain.customer.dto.ContactInfoSearchDto
;
import
com.dsk.system.domain.customer.vo.ContactInfoListVo
;
import
com.dsk.system.dskService.EnterpriseService
;
import
com.dsk.system.mapper.ContactInfoMapper
;
import
com.dsk.system.service.IContactInfoService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.MapUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
* 用户联系人(CustomerContact)表服务实现类
...
...
@@ -28,6 +32,12 @@ public class ContactInfoServiceImpl implements IContactInfoService {
@Resource
private
ContactInfoMapper
baseMapper
;
@Autowired
private
EnterpriseService
enterpriseService
;
// @Resource
// private ICustomerService customerService;
@Override
public
List
<
ContactInfoListVo
>
selectList
(
ContactInfoSearchDto
dto
)
{
return
baseMapper
.
selectPageList
(
dto
);
...
...
@@ -41,6 +51,7 @@ public class ContactInfoServiceImpl implements IContactInfoService {
@Override
public
boolean
insert
(
ContactInfo
bean
)
{
verifyParameter
(
bean
);
bean
.
setCreateBy
(
bean
.
getUpdateBy
());
return
baseMapper
.
insert
(
bean
)
>
0
;
}
...
...
@@ -60,9 +71,18 @@ public class ContactInfoServiceImpl implements IContactInfoService {
* 参数验证
*/
private
void
verifyParameter
(
ContactInfo
bean
)
{
// if (ObjectUtils.isEmpty(bean.getCustomerId())) throw new BeanException("客户id不能为空!");
if
(!
ObjectUtils
.
isEmpty
(
bean
.
getCompanyName
()))
{
Map
<
String
,
Object
>
map
=
enterpriseService
.
getCidAndUipIdByCompanyName
(
bean
.
getCompanyName
());
bean
.
setCompanyId
(
MapUtils
.
getInteger
(
map
,
"companyId"
));
bean
.
setUipId
(
MapUtils
.
getString
(
map
,
"uipId"
));
}
// if (!ObjectUtils.isEmpty(bean.getCustomerId()) && ObjectUtils.isEmpty(bean.getId())) {
// CustomerVo info = customerService.info(bean.getCustomerId());
// bean.setCompanyName(info.getCompanyName());
// bean.setCompanyId(info.getCompanyId());
// bean.setUipId(info.getUipId());
// }
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
bean
.
setCreateBy
(
loginUser
.
getUser
().
getNickName
());
bean
.
setUpdateId
(
loginUser
.
getUserId
());
bean
.
setUpdateBy
(
loginUser
.
getUser
().
getNickName
());
}
...
...
dsk-system/src/main/resources/mapper/system/customer/ContactInfoMapper.xml
View file @
c9a9cd41
...
...
@@ -10,8 +10,8 @@
from contact_info cc
left join business_info bi on cc.project_id = bi.id
<where>
<if
test=
"c
c.customerId != null and cc.customerId !='' "
>
and (cc.customer_id = #{customerId} or cc.company_name =#{companyName
})
</if>
<if
test=
"
cc.
projectId != null "
>
and cc.project_id = #{projectId}
</if>
<if
test=
"c
ustomerId != null and customerId !='' "
>
and (cc.customer_id = #{customerId} or bi.customer_id = #{customerId
})
</if>
<if
test=
"projectId != null "
>
and cc.project_id = #{projectId}
</if>
</where>
order by cc.create_time desc
</select>
...
...
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