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
a43eaead
Commit
a43eaead
authored
Jul 27, 2023
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-
parent
0c1d9d7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
25 deletions
+51
-25
EnterpriseService.java
...ain/java/com/dsk/system/dskService/EnterpriseService.java
+39
-25
UrbanInvestmentPlatformServiceImpl.java
...stem/service/impl/UrbanInvestmentPlatformServiceImpl.java
+12
-0
No files found.
dsk-system/src/main/java/com/dsk/system/dskService/EnterpriseService.java
View file @
a43eaead
...
...
@@ -149,31 +149,34 @@ public class EnterpriseService {
return
new
TableDataInfo
(
new
ArrayList
<>(),
0
);
}
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/investment"
,
BeanUtil
.
beanToMap
(
body
,
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
(
CollectionUtils
.
isEmpty
(
list
))
{
return
new
TableDataInfo
(
list
,
0
);
}
List
<
Object
>
newList
=
new
ArrayList
<>(
20
);
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
String
businessStatus
=
MapUtils
.
getString
(
companyMap
,
"businessStatus"
);
if
(!
"注销"
.
equals
(
businessStatus
))
{
newList
.
add
(
companyMap
);
}
}
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
String
businessStatus
=
MapUtils
.
getString
(
companyMap
,
"businessStatus"
);
if
(
"注销"
.
equals
(
businessStatus
))
{
newList
.
add
(
companyMap
);
}
}
return
new
TableDataInfo
(
newList
,
MapUtils
.
getInteger
(
data
,
"totalCount"
,
0
));
return
dskOpenApiUtil
.
responsePage
(
map
);
// Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/enterprise/investment", BeanUtil.beanToMap(body, 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 (CollectionUtils.isEmpty(list)) {
// return new TableDataInfo(list, 0);
// }
// List<Object> newList = new ArrayList<>(20);
// for (Object companyObj : list) {
// Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
// String businessStatus = MapUtils.getString(companyMap, "businessStatus");
// if (!"注销".equals(businessStatus)) {
// newList.add(companyMap);
// }
// }
// for (Object companyObj : list) {
// Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
// String businessStatus = MapUtils.getString(companyMap, "businessStatus");
// if ("注销".equals(businessStatus)) {
// newList.add(companyMap);
// }
// }
// return new TableDataInfo(newList, MapUtils.getInteger(data, "totalCount", 0));
}
public
TableDataInfo
affiliates
(
EnterpriseAffiliatesBody
body
)
throws
Exception
{
...
...
@@ -256,6 +259,17 @@ public class EnterpriseService {
//按照城投企业id合并两个list
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
companyMap
.
put
(
"cid"
,
MapUtils
.
getString
(
companyMap
,
"companyId"
));
companyMap
.
put
(
"bratingSubjectLevel"
,
null
);
Map
<
String
,
Object
>
bondCreditRatingMap
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/bondCreditRating"
,
companyMap
);
Integer
codeRating
=
MapUtils
.
getInteger
(
bondCreditRatingMap
,
"code"
,
300
);
if
(
codeRating
.
equals
(
HttpStatus
.
OK
.
value
()))
{
Object
object
=
bondCreditRatingMap
.
get
(
"data"
);
if
(
ObjectUtil
.
isNotEmpty
(
object
))
{
Object
[]
obj
=
(
Object
[])
object
;
companyMap
.
put
(
"bratingSubjectLevel"
,
obj
[
0
]);
}
}
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
);
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"
)));
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/UrbanInvestmentPlatformServiceImpl.java
View file @
a43eaead
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.core.domain.AjaxResult
;
import
com.dsk.common.dtos.UrbanInvestmentPlatformDto
;
...
...
@@ -58,6 +59,17 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
//按照城投企业id合并两个list
for
(
Object
companyObj
:
list
)
{
Map
<
String
,
Object
>
companyMap
=
CommonUtils
.
assertAsMap
(
companyObj
);
companyMap
.
put
(
"bratingSubjectLevel"
,
null
);
companyMap
.
put
(
"cid"
,
MapUtils
.
getString
(
companyMap
,
"companyId"
));
Map
<
String
,
Object
>
bondCreditRatingMap
=
dskOpenApiUtil
.
requestBody
(
"/operate/enterprise/bondCreditRating"
,
companyMap
);
Integer
codeRating
=
MapUtils
.
getInteger
(
bondCreditRatingMap
,
"code"
,
300
);
if
(
codeRating
.
equals
(
HttpStatus
.
OK
.
value
()))
{
Object
object
=
bondCreditRatingMap
.
get
(
"data"
);
if
(
ObjectUtil
.
isNotEmpty
(
object
))
{
Object
[]
obj
=
(
Object
[])
object
;
companyMap
.
put
(
"bratingSubjectLevel"
,
obj
[
0
]);
}
}
String
uipId
=
MapUtils
.
getString
(
companyMap
,
"uipId"
);
companyMap
.
put
(
"claimStatus"
,
0
);
for
(
CustomerStatusListVo
vo
:
customerStatusListVos
)
{
...
...
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