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
2f5fd16b
Commit
2f5fd16b
authored
Jul 28, 2023
by
danfuman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev20230707' of
http://192.168.60.201/root/dsk-operate-sys
into dev20230707
parents
7f986620
2a73e4b2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
35 deletions
+51
-35
CacheConstants.java
...src/main/java/com/dsk/common/constant/CacheConstants.java
+6
-0
EnterpriseService.java
...ain/java/com/dsk/system/dskService/EnterpriseService.java
+8
-14
CustomerServiceImpl.java
...java/com/dsk/system/service/impl/CustomerServiceImpl.java
+15
-3
EconomicServiceImpl.java
...java/com/dsk/system/service/impl/EconomicServiceImpl.java
+17
-1
UrbanInvestmentPlatformServiceImpl.java
...stem/service/impl/UrbanInvestmentPlatformServiceImpl.java
+5
-17
No files found.
dsk-common/src/main/java/com/dsk/common/constant/CacheConstants.java
View file @
2f5fd16b
...
...
@@ -58,5 +58,11 @@ public class CacheConstants
public
static
final
String
DATA_FINANCIAL
=
"data:financial"
;
/**
* 全国经济大全-默认
*/
public
static
final
String
DATA_ECONOMIC
=
"data:economic"
;
}
dsk-system/src/main/java/com/dsk/system/dskService/EnterpriseService.java
View file @
2f5fd16b
...
...
@@ -71,17 +71,10 @@ public class EnterpriseService {
Map
uipData
=
MapUtils
.
getMap
(
uipMap
,
"data"
,
new
HashMap
<>());
String
uipId
=
MapUtils
.
getString
(
uipData
,
"uipId"
,
null
);
companyData
.
put
(
"uipId"
,
uipId
);
if
(!
ObjectUtil
.
isEmpty
(
uipId
))
{
ArrayList
<
String
>
uipIds
=
new
ArrayList
<>();
uipIds
.
add
(
uipId
);
companyData
.
put
(
"claimStatus"
,
CollectionUtils
.
isEmpty
(
iCustomerService
.
selectStatusList
(
uipIds
))
?
0
:
1
);
}
else
{
Integer
status
=
iCustomerService
.
status
(
companyName
);
if
(
ObjectUtil
.
isNotEmpty
(
status
))
{
companyData
.
put
(
"claimStatus"
,
status
.
equals
(
0
)
?
1
:
0
);
}
Integer
status
=
iCustomerService
.
status
(
companyName
);
if
(
ObjectUtil
.
isNotEmpty
(
status
))
{
companyData
.
put
(
"claimStatus"
,
status
.
equals
(
0
)
?
1
:
0
);
}
Map
<
String
,
Object
>
bondCreditRatingMap
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/bondCreditRating"
,
map
);
Integer
bondCreditRatingCode
=
MapUtils
.
getInteger
(
bondCreditRatingMap
,
"code"
,
300
);
if
(
200
!=
bondCreditRatingCode
)
return
R
.
ok
(
companyData
);
...
...
@@ -249,14 +242,14 @@ public class EnterpriseService {
return
new
TableDataInfo
(
list
,
0
);
}
ArrayList
<
String
>
uipId
s
=
new
ArrayList
<>();
ArrayList
<
String
>
companyName
s
=
new
ArrayList
<>();
ArrayList
<
Long
>
cIds
=
new
ArrayList
<>();
for
(
Object
dataMap
:
list
)
{
uipIds
.
add
(
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"uipId
"
));
companyNames
.
add
(
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"companyName
"
));
cIds
.
add
(
MapUtils
.
getLong
(
CommonUtils
.
assertAsMap
(
dataMap
),
"companyId"
));
}
List
<
CustomerStatusListVo
>
claimStatusList
=
iCustomerService
.
selectStatusList
(
uipId
s
);
List
<
CustomerStatusListVo
>
claimStatusList
=
iCustomerService
.
selectStatusList
ByCompanyName
(
companyName
s
);
Map
<
String
,
Object
>
bondCreditRatingBatchMap
=
new
HashMap
<>(
1
);
bondCreditRatingBatchMap
.
put
(
"cIds"
,
cIds
);
...
...
@@ -275,6 +268,7 @@ public class EnterpriseService {
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
companyMap
.
put
(
"bratingSubjectLevel"
,
null
);
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
);
String
companyName
=
MapUtils
.
getString
(
companyMap
,
"companyName"
,
""
);
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"
)));
...
...
@@ -314,7 +308,7 @@ public class EnterpriseService {
companyMap
.
put
(
"claimStatus"
,
0
);
for
(
CustomerStatusListVo
vo
:
claimStatusList
)
{
if
(
uipId
.
equals
(
vo
.
getUipId
()))
{
if
(
companyName
.
equals
(
vo
.
getCompanyName
()))
{
companyMap
.
put
(
"claimStatus"
,
1
);
}
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/CustomerServiceImpl.java
View file @
2f5fd16b
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.common.annotation.DataScope
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.utils.SecurityUtils
;
...
...
@@ -27,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -52,6 +54,7 @@ public class CustomerServiceImpl implements ICustomerService {
private
BusinessOpportunityRadarService
opportunityRadarService
;
@Override
// @DataScope(deptAlias = "d", userAlias = "u")
public
List
<
CustomerListVo
>
selectList
(
CustomerSearchDto
dto
)
{
dto
.
setUserId
(
SecurityUtils
.
getUserId
());
dto
.
setStatus
(
ObjectUtils
.
isEmpty
(
dto
.
getStatus
())
?
0
:
dto
.
getStatus
());
...
...
@@ -74,9 +77,18 @@ public class CustomerServiceImpl implements ICustomerService {
dealWithcustomerData
(
customer
);
if
(
ObjectUtils
.
isEmpty
(
customer
.
getUipId
()))
{
try
{
R
res
=
enterpriseService
.
getUipId
(
customer
.
getCompanyName
());
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
()))
{
customer
.
setUipId
(
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
res
.
getData
()),
"uipId"
));
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
customer
.
getCompanyId
());
R
res
=
enterpriseService
.
getUipIdByCid
(
list
);
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
())){
List
<
Map
<
String
,
Object
>>
data
=
(
List
<
Map
<
String
,
Object
>>)
res
.
getData
();
customer
.
setUipId
(
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
data
.
get
((
0
))),
"uipId"
));
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getUipId
())){
res
=
enterpriseService
.
getUipId
(
customer
.
getCompanyName
());
if
(!
ObjectUtils
.
isEmpty
(
res
.
getData
()))
{
customer
.
setUipId
(
MapUtil
.
getStr
(
BeanUtil
.
beanToMap
(
res
.
getData
()),
"uipId"
));
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"获取城投平台企业id错误!error:{}"
,
e
.
getMessage
());
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/EconomicServiceImpl.java
View file @
2f5fd16b
...
...
@@ -2,6 +2,7 @@ package com.dsk.system.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.dsk.acc.openapi.client.util.CommonUtils
;
import
com.dsk.common.constant.CacheConstants
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.redis.RedisCache
;
...
...
@@ -15,7 +16,6 @@ import org.springframework.http.HttpStatus;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -40,7 +40,23 @@ public class EconomicServiceImpl implements EconomicService {
if
(
ObjectUtil
.
isEmpty
(
dto
.
getYear
()))
{
dto
.
setYear
(
DateUtils
.
getYear
()
-
1
);
}
String
redisKey
=
CacheConstants
.
DATA_ECONOMIC
+
dto
.
getYear
()
+
dto
.
getProvinceIds
()
+
dto
.
getCityIds
()
+
dto
.
getAreaIds
();
Map
<
String
,
Object
>
cacheMap
=
redisCache
.
getCacheObject
(
redisKey
);
if
(
ObjectUtil
.
isNotEmpty
(
cacheMap
))
{
return
BeanUtil
.
toBean
(
cacheMap
,
AjaxResult
.
class
);
}
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/national/nationalPage"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Integer
code
=
MapUtils
.
getInteger
(
map
,
"code"
,
300
);
if
(!
code
.
equals
(
HttpStatus
.
OK
.
value
()))
{
throw
new
RuntimeException
();
}
Map
data
=
MapUtils
.
getMap
(
map
,
"data"
,
null
);
List
<
Object
>
list
=
CommonUtils
.
assertAsArray
(
MapUtils
.
getObject
(
data
,
"list"
,
""
));
if
(
ObjectUtil
.
isNotEmpty
(
list
))
{
if
(
ObjectUtil
.
isEmpty
(
dto
.
getProvinceIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getCityIds
())
&&
ObjectUtil
.
isEmpty
(
dto
.
getAreaIds
()))
{
redisCache
.
setCacheObject
(
redisKey
,
map
);
}
}
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/UrbanInvestmentPlatformServiceImpl.java
View file @
2f5fd16b
...
...
@@ -49,14 +49,13 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
ArrayList
<
String
>
uipId
s
=
new
ArrayList
<>();
ArrayList
<
String
>
companyName
s
=
new
ArrayList
<>();
ArrayList
<
Long
>
cIds
=
new
ArrayList
<>();
for
(
Object
dataMap
:
list
)
{
uipIds
.
add
(
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"uipId
"
));
companyNames
.
add
(
MapUtils
.
getString
(
CommonUtils
.
assertAsMap
(
dataMap
),
"companyName
"
));
cIds
.
add
(
MapUtils
.
getLong
(
CommonUtils
.
assertAsMap
(
dataMap
),
"companyId"
));
}
// List<String> claimStatusList = iCustomerService.selectUipIdList(uipIds);
List
<
CustomerStatusListVo
>
customerStatusListVos
=
iCustomerService
.
selectStatusList
(
uipIds
);
List
<
CustomerStatusListVo
>
customerStatusListVos
=
iCustomerService
.
selectStatusListByCompanyName
(
companyNames
);
Map
<
String
,
Object
>
bondCreditRatingBatchMap
=
new
HashMap
<>(
1
);
bondCreditRatingBatchMap
.
put
(
"cIds"
,
cIds
);
...
...
@@ -76,10 +75,11 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
Long
companyId
=
MapUtils
.
getLong
(
companyMap
,
"companyId"
);
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
);
String
companyName
=
MapUtils
.
getString
(
companyMap
,
"companyName"
,
""
);
companyMap
.
put
(
"claimStatus"
,
0
);
companyMap
.
put
(
"bratingSubjectLevel"
,
null
);
for
(
CustomerStatusListVo
vo
:
customerStatusListVos
)
{
if
(
uipId
.
equals
(
vo
.
getUipId
()))
{
if
(
companyName
.
equals
(
vo
.
getCompanyName
()))
{
companyMap
.
put
(
"claimStatus"
,
1
);
}
}
...
...
@@ -91,18 +91,6 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
}
}
}
// for (Object companyObj : list) {
// Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
// String uipId = MapUtils.getString(companyMap, "uipId","uipId");
// if (CollectionUtils.isEmpty(claimStatusList)) {
// companyMap.put("claimStatus", 0);
// } else if (claimStatusList.contains(uipId)) {
// companyMap.put("claimStatus", 1);
// } else {
// companyMap.put("claimStatus", 0);
// }
// }
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