Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cfld-postcard-service
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
cfld-backend
cfld-postcard-service
Commits
7bbfa0f6
Commit
7bbfa0f6
authored
Dec 17, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
招商引资
parent
14e5c6ed
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
46 deletions
+50
-46
DevelopmentInfoController.java
...dle/development/controller/DevelopmentInfoController.java
+2
-2
FactorCostEnum.java
...card/service/moudle/development/enums/FactorCostEnum.java
+14
-6
DevelopmentInfoService.java
...ce/moudle/development/service/DevelopmentInfoService.java
+1
-2
DevelopmentInfoServiceImpl.java
.../development/service/impl/DevelopmentInfoServiceImpl.java
+19
-21
DevelopmentDetailVo.java
...rd/service/moudle/development/vo/DevelopmentDetailVo.java
+14
-15
No files found.
src/main/java/com/postcard/service/moudle/development/controller/DevelopmentInfoController.java
View file @
7bbfa0f6
...
@@ -31,8 +31,8 @@ public class DevelopmentInfoController {
...
@@ -31,8 +31,8 @@ public class DevelopmentInfoController {
@GetMapping
(
"/detail/{id}"
)
@GetMapping
(
"/detail/{id}"
)
@ApiOperation
(
value
=
"开发区-招商引资"
)
@ApiOperation
(
value
=
"开发区-招商引资"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"开发区详情id"
,
type
=
"Integer"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"开发区详情id"
,
type
=
"Integer"
)
public
DevelopmentDetailVo
detail
(
@PathVariable
Integer
id
){
public
DevelopmentDetailVo
detail
(){
return
developmentInfoSerivce
.
detail
(
id
);
return
developmentInfoSerivce
.
detail
();
}
}
}
}
src/main/java/com/postcard/service/moudle/development/enums/FactorCostEnum.java
View file @
7bbfa0f6
...
@@ -4,10 +4,14 @@ import com.postcard.service.enums.PersonStatusEnum;
...
@@ -4,10 +4,14 @@ import com.postcard.service.enums.PersonStatusEnum;
public
enum
FactorCostEnum
{
public
enum
FactorCostEnum
{
ELECTRICITY
(
"electricity"
,
"一般工业用电"
),
ELECTRICITY
(
"electricitys"
,
"一般工业用电"
),
BIGELECTRICITY
(
"bigElectricity"
,
"大工业用电"
),
BIGELECTRICITY
(
"bigElectricitys"
,
"大工业用电"
),
WORKER
(
"worker"
,
"用工"
),
WORKER
(
"workers"
,
"用工"
),
NATURALGAS
(
"naturalGas"
,
"工业商用天然气"
);
NATURALGAS
(
"naturalGass"
,
"工业商用天然气"
),
LIGHT
(
"investmentLights"
,
"区域亮点"
),
INDUSRTY
(
"primaryIndustrys"
,
"产业情况"
);
private
String
code
;
private
String
code
;
private
String
name
;
private
String
name
;
...
@@ -21,7 +25,11 @@ public enum FactorCostEnum {
...
@@ -21,7 +25,11 @@ public enum FactorCostEnum {
return
code
;
return
code
;
}
}
public
static
String
getName
(
String
code
){
public
String
getName
()
{
return
name
;
}
public
static
String
getNameByCode
(
String
code
){
for
(
FactorCostEnum
bt:
values
()){
for
(
FactorCostEnum
bt:
values
()){
if
(
bt
.
code
.
equals
(
code
)){
if
(
bt
.
code
.
equals
(
code
)){
return
bt
.
name
;
return
bt
.
name
;
...
@@ -30,7 +38,7 @@ public enum FactorCostEnum {
...
@@ -30,7 +38,7 @@ public enum FactorCostEnum {
return
null
;
return
null
;
}
}
public
static
String
getCode
(
String
name
){
public
static
String
getCode
ByName
(
String
name
){
for
(
FactorCostEnum
bt:
values
()){
for
(
FactorCostEnum
bt:
values
()){
if
(
bt
.
name
.
equals
(
name
)){
if
(
bt
.
name
.
equals
(
name
)){
return
bt
.
code
;
return
bt
.
code
;
...
...
src/main/java/com/postcard/service/moudle/development/service/DevelopmentInfoService.java
View file @
7bbfa0f6
...
@@ -40,8 +40,7 @@ public interface DevelopmentInfoService extends IService<DevelopmentInfo> {
...
@@ -40,8 +40,7 @@ public interface DevelopmentInfoService extends IService<DevelopmentInfo> {
/**
/**
* @description: 开发区详情
* @description: 开发区详情
* @date: 2023/11/21 17:40
* @date: 2023/11/21 17:40
* @param: [id]
* @return: com.lyy.admin.moudle.park.vo.ParkInfoAllVO
* @return: com.lyy.admin.moudle.park.vo.ParkInfoAllVO
**/
**/
DevelopmentDetailVo
detail
(
Integer
id
);
DevelopmentDetailVo
detail
();
}
}
src/main/java/com/postcard/service/moudle/development/service/impl/DevelopmentInfoServiceImpl.java
View file @
7bbfa0f6
...
@@ -135,24 +135,19 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
...
@@ -135,24 +135,19 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
}
}
@Override
@Override
public
DevelopmentDetailVo
detail
(
Integer
id
)
{
public
DevelopmentDetailVo
detail
()
{
// 园区基本信息
// 园区基本信息
DevelopmentInfo
developmentInfo
=
this
.
getById
(
i
d
);
DevelopmentInfo
developmentInfo
=
this
.
getById
(
developMentI
d
);
DevelopmentDetailVo
developmentDetailVo
=
DevelopmentDetailVo
developmentDetailVo
=
BeanUtil
.
copyProperties
(
developmentInfo
,
DevelopmentDetailVo
.
class
);
BeanUtil
.
copyProperties
(
developmentInfo
,
DevelopmentDetailVo
.
class
);
// developmentDetailVo.setSewageWaterPrice(developmentInfo.getSewageWaterPrice()
);
// 产业政策
// 产业政策
LambdaQueryWrapper
<
DevelopmentIndustryPolicyInfo
>
DIPIQueryWrqpper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
DevelopmentIndustryPolicyInfo
>
DIPIQueryWrqpper
=
new
LambdaQueryWrapper
<>();
DIPIQueryWrqpper
.
eq
(
DevelopmentIndustryPolicyInfo:
:
getDevelopmentId
,
id
);
DIPIQueryWrqpper
.
eq
(
DevelopmentIndustryPolicyInfo:
:
getDevelopmentId
,
developMentId
);
List
<
DevelopmentIndustryPolicyInfo
>
list1
=
List
<
DevelopmentIndustryPolicyInfo
>
list1
=
developmentIndustryPolicyInfoService
.
list
(
DIPIQueryWrqpper
);
developmentIndustryPolicyInfoService
.
list
(
DIPIQueryWrqpper
);
List
<
DevelopmentPolicyVo
>
developmentPolicyVos
=
Convert
.
toList
(
DevelopmentPolicyVo
.
class
,
list1
);
List
<
DevelopmentPolicyVo
>
developmentPolicyVos
=
LinkedHashMap
<
String
,
List
<
DevelopmentPolicyVo
>>
collect3
=
developmentPolicyVos
.
stream
()
Convert
.
toList
(
DevelopmentPolicyVo
.
class
,
list1
);
.
collect
(
Collectors
.
groupingBy
(
DevelopmentPolicyVo:
:
getType
,
LinkedHashMap:
:
new
,
Collectors
.
toList
()));
LinkedHashMap
<
String
,
List
<
DevelopmentPolicyVo
>>
collect3
=
developmentPolicyVos
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
DevelopmentPolicyVo:
:
getType
,
LinkedHashMap:
:
new
,
Collectors
.
toList
()));
JSONArray
policyJsonArray
=
new
JSONArray
();
JSONArray
policyJsonArray
=
new
JSONArray
();
for
(
Map
.
Entry
<
String
,
List
<
DevelopmentPolicyVo
>>
entry
:
collect3
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
DevelopmentPolicyVo
>>
entry
:
collect3
.
entrySet
())
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
@@ -160,20 +155,23 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
...
@@ -160,20 +155,23 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
jsonObject
.
putOpt
(
"info"
,
entry
.
getValue
());
jsonObject
.
putOpt
(
"info"
,
entry
.
getValue
());
policyJsonArray
.
add
(
jsonObject
);
policyJsonArray
.
add
(
jsonObject
);
}
}
developmentDetailVo
.
setPolicyList
(
policyJsonArray
);
developmentDetailVo
.
setPolicys
(
policyJsonArray
);
//
//产业情况 区域亮点
developmentDetailVo
.
setStarObjectExtensionInfoMap
(
starObjectExtensionInfoService
.
detail
(
id
));
Map
<
String
,
List
<
StarObjectExtensionInfoVO
>>
detail
=
starObjectExtensionInfoService
.
detail
(
developMentId
);
//
developmentDetailVo
.
setInvestmentLights
(
detail
.
get
(
FactorCostEnum
.
LIGHT
.
getName
()));
ScSourceInfoEntity
scSourceInfoEntity
=
scSourceInfoService
.
getById
(
id
);
developmentDetailVo
.
setPrimaryIndustrys
(
detail
.
get
(
FactorCostEnum
.
INDUSRTY
.
getName
()));
//要素成本
LambdaQueryWrapper
<
ScSourceInfoEntity
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
ScSourceInfoEntity:
:
getDevelopmentId
,
developMentId
);
ScSourceInfoEntity
scSourceInfoEntity
=
scSourceInfoService
.
getOne
(
lambdaQueryWrapper
);
String
investment
=
scSourceInfoEntity
.
getR1
();
String
investment
=
scSourceInfoEntity
.
getR1
();
JSONArray
array
=
JSONUtil
.
parseArray
(
investment
);
JSONArray
array
=
JSONUtil
.
parseArray
(
investment
);
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
JSONObject
obj
=
array
.
getJSONObject
(
i
);
JSONObject
obj
=
array
.
getJSONObject
(
i
);
String
key
=
obj
.
getStr
(
"key"
);
String
key
=
obj
.
getStr
(
"key"
);
JSONArray
value
=
obj
.
getJSONArray
(
"value"
);
JSONArray
value
=
obj
.
getJSONArray
(
"value"
);
MethodUtils
.
setValue
(
developmentDetailVo
,
FactorCostEnum
.
getCode
(
key
),
value
);
MethodUtils
.
setValue
(
developmentDetailVo
,
FactorCostEnum
.
getCode
ByName
(
key
),
value
);
}
}
return
developmentDetailVo
;
return
developmentDetailVo
;
}
}
...
...
src/main/java/com/postcard/service/moudle/development/vo/DevelopmentDetailVo.java
View file @
7bbfa0f6
...
@@ -35,39 +35,38 @@ public class DevelopmentDetailVo implements Serializable {
...
@@ -35,39 +35,38 @@ public class DevelopmentDetailVo implements Serializable {
@ApiModelProperty
(
value
=
"开发区名称"
)
@ApiModelProperty
(
value
=
"开发区名称"
)
private
String
name
;
private
String
name
;
// //------------------招商亮点---------------------------------------------
//------------------招商亮点---------------------------------------------
// @ApiModelProperty(value = "招商亮点")
@ApiModelProperty
(
value
=
"招商亮点"
)
// private JSONArray investmentLight;
private
List
<
StarObjectExtensionInfoVO
>
investmentLights
;
//
//------------------重点产业---------------------------------------------
// //------------------重点产业---------------------------------------------
@ApiModelProperty
(
value
=
"重点产业"
)
// @ApiModelProperty(value = "重点产业")
private
List
<
StarObjectExtensionInfoVO
>
primaryIndustrys
;
// private JSONArray primaryIndustry;
@ApiModelProperty
(
value
=
"招商亮点 重点产业"
)
//
@ApiModelProperty(value = "招商亮点 重点产业")
private
Map
<
String
,
List
<
StarObjectExtensionInfoVO
>>
starObjectExtensionInfoMap
;
//
private Map<String, List<StarObjectExtensionInfoVO>> starObjectExtensionInfoMap;
//------------------招商政策---------------------------------------------
//------------------招商政策---------------------------------------------
@ApiModelProperty
(
value
=
"招商政策"
)
@ApiModelProperty
(
value
=
"招商政策"
)
private
JSONArray
policy
List
=
new
JSONArray
();
private
JSONArray
policy
s
=
new
JSONArray
();
//------------要素成本------------------------------------------------
//------------要素成本------------------------------------------------
@ApiModelProperty
(
value
=
"一般公共用电"
)
@ApiModelProperty
(
value
=
"一般公共用电"
)
private
JSONArray
electricity
=
new
JSONArray
();
private
JSONArray
electricity
s
=
new
JSONArray
();
@ApiModelProperty
(
value
=
"大工业用电"
)
@ApiModelProperty
(
value
=
"大工业用电"
)
private
JSONArray
bigElectricity
=
new
JSONArray
();
private
JSONArray
bigElectricity
s
=
new
JSONArray
();
@ApiModelProperty
(
value
=
"用工"
)
@ApiModelProperty
(
value
=
"用工"
)
private
JSONArray
worker
=
new
JSONArray
();
private
JSONArray
worker
s
=
new
JSONArray
();
@ApiModelProperty
(
value
=
"工业商用天然气"
)
@ApiModelProperty
(
value
=
"工业商用天然气"
)
private
JSONArray
naturalGas
=
new
JSONArray
();
private
JSONArray
naturalGas
s
=
new
JSONArray
();
@ApiModelProperty
(
value
=
"工业用水单价(元/吨)"
)
@ApiModelProperty
(
value
=
"工业用水单价(元/吨)"
)
private
String
industrialWaterPrice
;
private
String
industrialWaterPrice
;
@ApiModelProperty
(
value
=
"污水处理价格(元/吨)"
)
@ApiModelProperty
(
value
=
"污水处理价格(元/吨)"
)
private
String
sewageWaterPrice
;
private
BigDecimal
sewageWaterPrice
;
}
}
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