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
536fe16b
Commit
536fe16b
authored
Dec 16, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
招商引资+主导产业筛选项
parent
27c6ce72
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
36 deletions
+149
-36
FactorCostEnum.java
...card/service/moudle/development/enums/FactorCostEnum.java
+41
-0
DevelopmentInfoServiceImpl.java
.../development/service/impl/DevelopmentInfoServiceImpl.java
+19
-2
DevelopmentDetailVo.java
...rd/service/moudle/development/vo/DevelopmentDetailVo.java
+11
-32
ParkInfoController.java
...rd/service/moudle/park/controller/ParkInfoController.java
+2
-2
ParkPageDto.java
...ava/com/postcard/service/moudle/park/dto/ParkPageDto.java
+3
-0
PrimaryIndustryEnum.java
...stcard/service/moudle/park/enums/PrimaryIndustryEnum.java
+38
-0
ParkInfoService.java
...postcard/service/moudle/park/service/ParkInfoService.java
+8
-0
ParkInfoServiceImpl.java
...service/moudle/park/service/impl/ParkInfoServiceImpl.java
+22
-0
ParkInfoMapper.xml
src/main/resources/mapper/park/ParkInfoMapper.xml
+5
-0
No files found.
src/main/java/com/postcard/service/moudle/development/enums/FactorCostEnum.java
0 → 100644
View file @
536fe16b
package
com
.
postcard
.
service
.
moudle
.
development
.
enums
;
import
com.postcard.service.enums.PersonStatusEnum
;
public
enum
FactorCostEnum
{
ELECTRICITY
(
"electricity"
,
"一般工业用电"
),
BIGELECTRICITY
(
"bigElectricity"
,
"大工业用电"
),
WORKER
(
"worker"
,
"用工"
),
NATURALGAS
(
"naturalGas"
,
"工业商用天然气"
);
private
String
code
;
private
String
name
;
FactorCostEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
static
String
getName
(
String
code
){
for
(
FactorCostEnum
bt:
values
()){
if
(
bt
.
code
.
equals
(
code
)){
return
bt
.
name
;
}
}
return
null
;
}
public
static
String
getCode
(
String
name
){
for
(
FactorCostEnum
bt:
values
()){
if
(
bt
.
name
.
equals
(
name
)){
return
bt
.
code
;
}
}
return
null
;
}
}
src/main/java/com/postcard/service/moudle/development/service/impl/DevelopmentInfoServiceImpl.java
View file @
536fe16b
...
...
@@ -13,6 +13,7 @@ import com.postcard.service.moudle.carrier.vo.CarrierInvestmentVo;
import
com.postcard.service.moudle.development.entity.DevelopmentIndustryPolicyInfo
;
import
com.postcard.service.moudle.development.entity.DevelopmentInfo
;
import
com.postcard.service.moudle.development.entity.DevelopmentInvestmentDirectionInfo
;
import
com.postcard.service.moudle.development.enums.FactorCostEnum
;
import
com.postcard.service.moudle.development.mapper.DevelopmentInfoMapper
;
import
com.postcard.service.moudle.development.service.*
;
import
com.postcard.service.moudle.development.vo.DevelopmentDetailVo
;
...
...
@@ -29,6 +30,8 @@ import com.postcard.service.moudle.system.service.SysCarouselInfoService;
import
com.postcard.service.moudle.system.service.SysDictDataService
;
import
com.postcard.service.moudle.system.vo.ResourceVo
;
import
com.postcard.service.moudle.system.vo.VideoVo
;
import
com.postcard.service.util.JsonUtils
;
import
com.postcard.service.util.MethodUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -134,7 +137,10 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
@Override
public
DevelopmentDetailVo
detail
(
Integer
id
)
{
DevelopmentDetailVo
developmentDetailVo
=
new
DevelopmentDetailVo
();
// 园区基本信息
DevelopmentInfo
developmentInfo
=
this
.
getById
(
id
);
DevelopmentDetailVo
developmentDetailVo
=
BeanUtil
.
copyProperties
(
developmentInfo
,
DevelopmentDetailVo
.
class
);
// 产业政策
LambdaQueryWrapper
<
DevelopmentIndustryPolicyInfo
>
DIPIQueryWrqpper
=
new
LambdaQueryWrapper
<>();
DIPIQueryWrqpper
.
eq
(
DevelopmentIndustryPolicyInfo:
:
getDevelopmentId
,
id
);
...
...
@@ -155,9 +161,20 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
policyJsonArray
.
add
(
jsonObject
);
}
developmentDetailVo
.
setPolicyList
(
policyJsonArray
);
//
developmentDetailVo
.
setStarObjectExtensionInfoMap
(
starObjectExtensionInfoService
.
detail
(
id
));
//
ScSourceInfoEntity
scSourceInfoEntity
=
scSourceInfoService
.
getById
(
id
);
String
investment
=
scSourceInfoEntity
.
getR1
();
JSONArray
array
=
JSONUtil
.
parseArray
(
investment
);
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
JSONObject
obj
=
array
.
getJSONObject
(
i
);
String
key
=
obj
.
getStr
(
"key"
);
JSONArray
value
=
obj
.
getJSONArray
(
"value"
);
MethodUtils
.
setValue
(
developmentDetailVo
,
FactorCostEnum
.
getCode
(
key
),
value
);
}
return
null
;
return
developmentDetailVo
;
}
@Override
...
...
src/main/java/com/postcard/service/moudle/development/vo/DevelopmentDetailVo.java
View file @
536fe16b
package
com
.
postcard
.
service
.
moudle
.
development
.
vo
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.postcard.service.config.other.BigDecimal2String
;
import
com.postcard.service.config.other.String2String
;
...
...
@@ -47,48 +48,26 @@ public class DevelopmentDetailVo implements Serializable {
//------------------招商政策---------------------------------------------
@ApiModelProperty
(
value
=
"招商政策"
)
private
JSONArray
policyList
;
private
JSONArray
policyList
=
new
JSONArray
()
;
//------------要素成本------------------------------------------------
@ApiModelProperty
(
value
=
"人力成本(元/月)"
)
@JsonSerialize
(
using
=
BigDecimal2String
.
class
)
private
BigDecimal
laborCost
;
@ApiModelProperty
(
value
=
"土地成本(万元/亩)"
)
@JsonSerialize
(
using
=
BigDecimal2String
.
class
)
private
BigDecimal
landCost
;
@ApiModelProperty
(
value
=
"一般公共用电"
)
private
JSONArray
electricity
=
new
JSONArray
();
@ApiModelProperty
(
value
=
"工业用电(元/㎡/天)"
)
@JsonSerialize
(
using
=
String2String
.
class
)
private
String
industrialElectricity
;
@ApiModelProperty
(
value
=
"大工业用电"
)
private
JSONArray
bigElectricity
=
new
JSONArray
();
@ApiModelProperty
(
value
=
"
供电类型
"
)
private
String
powerSupplyType
;
@ApiModelProperty
(
value
=
"
用工
"
)
private
JSONArray
worker
=
new
JSONArray
()
;
@ApiModelProperty
(
value
=
"
变电站级别
"
)
private
String
[]
substationLevel
;
@ApiModelProperty
(
value
=
"
工业商用天然气
"
)
private
JSONArray
naturalGas
=
new
JSONArray
()
;
@ApiModelProperty
(
value
=
"工业用水单价(元/吨)"
)
@JsonSerialize
(
using
=
String2String
.
class
)
private
String
industrialWaterPrice
;
@ApiModelProperty
(
value
=
"污水处理类别"
)
private
String
sewageWaterType
;
@ApiModelProperty
(
value
=
"污水处理价格(元/吨)"
)
@JsonSerialize
(
using
=
BigDecimal2String
.
class
)
private
BigDecimal
sewageWaterPrice
;
@ApiModelProperty
(
value
=
"供暖单价(元/m³)"
)
@JsonSerialize
(
using
=
String2String
.
class
)
private
String
heatingPrice
;
@ApiModelProperty
(
value
=
"蒸汽价格(元/m³)"
)
@JsonSerialize
(
using
=
String2String
.
class
)
private
String
steamPrice
;
@ApiModelProperty
(
value
=
"天然气单价(元/m³)"
)
@JsonSerialize
(
using
=
String2String
.
class
)
private
String
naturalGasPrice
;
private
String
sewageWaterPrice
;
}
src/main/java/com/postcard/service/moudle/park/controller/ParkInfoController.java
View file @
536fe16b
...
...
@@ -46,8 +46,8 @@ public class ParkInfoController {
@GetMapping
(
"/industryList"
)
@ApiOperation
(
value
=
"主导产业查询条件"
)
public
List
<
ParkIndustryVo
>
industryList
(){
return
null
;
public
List
<
String
>
industryList
(){
return
parkInfoService
.
getIndustryList
()
;
}
@GetMapping
(
"/detail/{id}"
)
...
...
src/main/java/com/postcard/service/moudle/park/dto/ParkPageDto.java
View file @
536fe16b
...
...
@@ -46,4 +46,7 @@ public class ParkPageDto {
@ApiModelProperty
(
hidden
=
true
)
private
Integer
developmentId
;
@ApiModelProperty
(
hidden
=
true
)
private
List
<
String
>
primaryIndustryList
;
}
src/main/java/com/postcard/service/moudle/park/enums/PrimaryIndustryEnum.java
0 → 100644
View file @
536fe16b
package
com
.
postcard
.
service
.
moudle
.
park
.
enums
;
public
enum
PrimaryIndustryEnum
{
EQUIPMENT
(
"装备制造业"
,
"机械加工、新能源汽车零部件、高端装备制造、新能源汽车、汽车配件,钢结构、智能制造、汽车零部件、自动化设备、机械制造、机器人、仪器仪表、新能源、装备制造、时尚轻纺、儿童用品、工艺品、新型建材、整车拆解,再生利用,电池PACK,软连接,钣金件,线束,钢壳,盖帽,纸箱,电镀、包装、高端制造、轻工轻纺、汽车,机电一体化,新型材料、表面处理、机械加工、五金建材"
),
ELECTRONIC
(
"电子信息产业"
,
"电子信息、锂电池、集成电路、新型显示、智能终端、光电显示、动力电池制造(回收、综合利用)、大数据服务、激光显示、新能源、家电与电子、电子零部件制造"
),
FOOD
(
"农副食品加工产业"
,
"羽毛加工、食品加工、食品、轻工业"
);
private
String
code
;
private
String
name
;
PrimaryIndustryEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
static
String
getName
(
String
code
){
for
(
PrimaryIndustryEnum
bt:
values
()){
if
(
bt
.
code
.
equals
(
code
)){
return
bt
.
name
;
}
}
return
null
;
}
public
static
String
getCode
(
String
name
){
for
(
PrimaryIndustryEnum
bt:
values
()){
if
(
bt
.
name
.
equals
(
name
)){
return
bt
.
code
;
}
}
return
null
;
}
}
src/main/java/com/postcard/service/moudle/park/service/ParkInfoService.java
View file @
536fe16b
...
...
@@ -9,6 +9,7 @@ import com.postcard.service.moudle.development.vo.DevelopmentDetailVo;
import
com.postcard.service.moudle.park.dto.ParkPageDto
;
import
com.postcard.service.moudle.park.entity.ParkInfo
;
import
com.postcard.service.moudle.park.vo.ParkDetailVo
;
import
com.postcard.service.moudle.park.vo.ParkIndustryVo
;
import
com.postcard.service.moudle.park.vo.ParkPageVo
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -37,6 +38,13 @@ public interface ParkInfoService extends IService<ParkInfo> {
**/
ParkDetailVo
detail
(
Integer
id
);
/**
* @description: 主导产业查询条件
* @date: 2023/11/21 17:40
* @param: [id]
* @return: com.lyy.admin.moudle.park.vo.ParkInfoAllVO
**/
List
<
String
>
getIndustryList
();
/**
* @description: 查询园区的一级招商方向
...
...
src/main/java/com/postcard/service/moudle/park/service/impl/ParkInfoServiceImpl.java
View file @
536fe16b
...
...
@@ -15,15 +15,19 @@ import com.postcard.service.enums.ParkStatusEnum;
import
com.postcard.service.moudle.carrier.entity.CarrierInfo
;
import
com.postcard.service.moudle.carrier.service.CarrierInfoService
;
import
com.postcard.service.moudle.carrier.vo.CarrierInvestmentVo
;
import
com.postcard.service.moudle.development.entity.DevelopmentInfo
;
import
com.postcard.service.moudle.development.service.DevelopmentInfoService
;
import
com.postcard.service.moudle.development.vo.DevelopmentDetailVo
;
import
com.postcard.service.moudle.park.dto.ParkPageDto
;
import
com.postcard.service.moudle.park.entity.ParkInfo
;
import
com.postcard.service.moudle.park.entity.ParkInvestmentDirectionInfo
;
import
com.postcard.service.moudle.park.enums.PrimaryIndustryEnum
;
import
com.postcard.service.moudle.park.mapper.ParkInfoMapper
;
import
com.postcard.service.moudle.park.service.ParkInfoService
;
import
com.postcard.service.moudle.park.service.ParkInvestmentDirectionInfoService
;
import
com.postcard.service.moudle.park.vo.ParkCarrierVo
;
import
com.postcard.service.moudle.park.vo.ParkDetailVo
;
import
com.postcard.service.moudle.park.vo.ParkIndustryVo
;
import
com.postcard.service.moudle.park.vo.ParkPageVo
;
import
com.postcard.service.moudle.system.service.SysCarouselInfoService
;
import
com.postcard.service.util.CommonUtil
;
...
...
@@ -60,6 +64,9 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo>
private
SysCarouselInfoService
sysCarouselInfoService
;
@Autowired
private
CarrierInfoService
carrierInfoService
;
@Autowired
private
DevelopmentInfoService
developmentInfoService
;
@Value
(
"${development.id}"
)
private
Integer
developmentId
;
...
...
@@ -82,6 +89,11 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo>
parkInfoParam
.
setCoverAreaUnder
(
Double
.
valueOf
(
split
[
1
]));
}
}
if
(
StringUtils
.
isNotBlank
(
parkInfoParam
.
getPrimaryIndustry
())){
String
name
=
PrimaryIndustryEnum
.
getName
(
parkInfoParam
.
getPrimaryIndustry
());
String
[]
split
=
name
.
split
(
"、"
);
parkInfoParam
.
setPrimaryIndustryList
(
Arrays
.
asList
(
split
));
}
Page
page
=
CommonUtil
.
getPageFromEntity
(
param
);
Page
<
ParkPageVo
>
pageInfo
=
this
.
baseMapper
.
pageList
(
page
,
parkInfoParam
);
log
.
info
(
"park时间消耗:{}"
,
timer
.
intervalRestart
());
...
...
@@ -144,6 +156,16 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo>
}
@Override
// public List<ParkIndustryVo> getIndustryList(){
public
List
<
String
>
getIndustryList
(){
DevelopmentInfo
developmentInfo
=
developmentInfoService
.
getById
(
developmentId
);
String
primaryIndustry
=
developmentInfo
.
getPrimaryIndustry
();
String
[]
split
=
primaryIndustry
.
split
(
"、"
);
return
Arrays
.
asList
(
split
);
}
/**
* @description: 获取配套设施
* @date: 2023/11/22 10:33
...
...
src/main/resources/mapper/park/ParkInfoMapper.xml
View file @
536fe16b
...
...
@@ -115,6 +115,11 @@
#{status}
</foreach>
</if>
<if
test=
"param.primaryIndustryList != null and param.primaryIndustryList.size() > 0 "
>
<foreach
item=
"primaryIndustry"
collection=
"param.primaryIndustryList"
open=
" and ( "
separator=
"or"
close=
")"
>
primary_industry like concat('%', #{primaryIndustry}, '%')
</foreach>
</if>
<!-- <if test="param.provinceName != null and param.provinceName != ''">-->
<!-- AND province_name=#{param.provinceName}-->
<!-- </if>-->
...
...
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