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
6922af6c
Commit
6922af6c
authored
Oct 09, 2023
by
liuChang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
概览
parent
4dc4ae51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
MarketAnalysisService.java
...in/java/com/dsk/search/service/MarketAnalysisService.java
+39
-0
No files found.
dsk-module/dsk-biz-api/src/main/java/com/dsk/search/service/MarketAnalysisService.java
View file @
6922af6c
...
...
@@ -4,9 +4,13 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson2.JSONObject
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.jsk.service.EnterpriseService
;
import
org.apache.commons.collections4.MapUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -20,6 +24,9 @@ public class MarketAnalysisService {
@Autowired
private
DskOpenApiUtil
dskOpenApiUtil
;
@Autowired
private
EnterpriseService
enterpriseService
;
public
AjaxResult
areaGroupByProvince
()
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/marketAnalysis/areaGroupByProvince"
,
new
JSONObject
());
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
...
...
@@ -117,11 +124,27 @@ public class MarketAnalysisService {
public
AjaxResult
combineRecentlyBid
(
JSONObject
object
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/marketAnalysis/combine/recentlyBid"
,
object
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
List
<
Map
<
String
,
Object
>>
list
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"data"
);
list
.
parallelStream
().
forEach
(
res
->
{
Integer
companyId
=
MapUtils
.
getInteger
(
res
,
"companyId"
);
String
companyName
=
MapUtils
.
getString
(
res
,
"companyName"
);
res
.
put
(
"uipId"
,
enterpriseService
.
getUipIdByCompanyNameOrCompanyId
(
companyName
,
companyId
));
});
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
public
AjaxResult
combineBidByYear
(
JSONObject
object
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/marketAnalysis/combine/bidByYear"
,
object
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
List
<
Map
<
String
,
Object
>>
list
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"data"
);
list
.
parallelStream
().
forEach
(
res
->
{
Integer
companyId
=
MapUtils
.
getInteger
(
res
,
"tendereeId"
);
String
companyName
=
MapUtils
.
getString
(
res
,
"tenderee"
);
res
.
put
(
"uipId"
,
enterpriseService
.
getUipIdByCompanyNameOrCompanyId
(
companyName
,
companyId
));
});
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
@@ -132,6 +155,14 @@ public class MarketAnalysisService {
public
AjaxResult
combineGroupByType
(
JSONObject
object
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/marketAnalysis/combine/groupByType"
,
object
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
List
<
Map
<
String
,
Object
>>
list
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"data"
);
list
.
parallelStream
().
forEach
(
res
->
{
Integer
companyId
=
MapUtils
.
getInteger
(
res
,
"companyId"
);
String
companyName
=
MapUtils
.
getString
(
res
,
"companyName"
);
res
.
put
(
"uipId"
,
enterpriseService
.
getUipIdByCompanyNameOrCompanyId
(
companyName
,
companyId
));
});
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
@@ -142,6 +173,14 @@ public class MarketAnalysisService {
public
AjaxResult
combinePeojectTop
(
JSONObject
object
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/marketAnalysis/combine/peojectTop"
,
object
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"data"
)))
{
List
<
Map
<
String
,
Object
>>
list
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"data"
);
list
.
parallelStream
().
forEach
(
res
->
{
Integer
companyId
=
MapUtils
.
getInteger
(
res
,
"projectUnitId"
);
String
companyName
=
MapUtils
.
getString
(
res
,
"projectUnit"
);
res
.
put
(
"uipId"
,
enterpriseService
.
getUipIdByCompanyNameOrCompanyId
(
companyName
,
companyId
));
});
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
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