Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
cfld-region-outline
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-region-outline
Commits
b2c3262d
Commit
b2c3262d
authored
Nov 10, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
园区字典开发区新增保存、提交
parent
f5219337
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
546 additions
and
127 deletions
+546
-127
DevelopmentInfoAllSaveVO.java
src/main/java/com/lyy/admin/VO/DevelopmentInfoAllSaveVO.java
+41
-0
DevelopmentInfoSaveVO.java
src/main/java/com/lyy/admin/VO/DevelopmentInfoSaveVO.java
+142
-0
ParkInfoAllSaveVO.java
src/main/java/com/lyy/admin/VO/ParkInfoAllSaveVO.java
+3
-0
SysCarouselInfoVO.java
src/main/java/com/lyy/admin/VO/SysCarouselInfoVO.java
+0
-59
ResourceConfig.java
...main/java/com/lyy/admin/common/config/ResourceConfig.java
+1
-1
APIExceptionEnum.java
...java/com/lyy/admin/common/exception/APIExceptionEnum.java
+6
-1
DevelopmentInfoController.java
...controller/developmentinfo/DevelopmentInfoController.java
+21
-0
ParkInfoController.java
...com/lyy/admin/controller/parkinfo/ParkInfoController.java
+1
-1
DevelopmentInfo.java
...com/lyy/admin/domain/developmentinfo/DevelopmentInfo.java
+16
-0
DevelopmentPrimaryEnterpriseInfo.java
...ain/developmentinfo/DevelopmentPrimaryEnterpriseInfo.java
+1
-1
SysCarouselInfo.java
...ain/java/com/lyy/admin/domain/system/SysCarouselInfo.java
+11
-0
DevelopmentStatusEnum.java
...n/java/com/lyy/admin/enumerate/DevelopmentStatusEnum.java
+12
-2
ParkInfoEnum.java
src/main/java/com/lyy/admin/enumerate/ParkInfoEnum.java
+31
-0
SubmitExamineEnum.java
src/main/java/com/lyy/admin/enumerate/SubmitExamineEnum.java
+29
-0
SysCarouselTypeEnum.java
...ain/java/com/lyy/admin/enumerate/SysCarouselTypeEnum.java
+23
-0
DevelopmentInfoService.java
...admin/service/developmentinfo/DevelopmentInfoService.java
+5
-0
DevelopmentInfoServiceImpl.java
...vice/developmentinfo/impl/DevelopmentInfoServiceImpl.java
+94
-8
FileSourceServiceImpl.java
...ava/com/lyy/admin/service/impl/FileSourceServiceImpl.java
+3
-0
ParkInfoServiceImpl.java
.../lyy/admin/service/parkinfo/impl/ParkInfoServiceImpl.java
+77
-54
SysCarouselInfoService.java
.../com/lyy/admin/service/system/SysCarouselInfoService.java
+5
-0
SysCarouselInfoServiceImpl.java
...admin/service/system/impl/SysCarouselInfoServiceImpl.java
+24
-0
No files found.
src/main/java/com/lyy/admin/VO/DevelopmentInfoAllSaveVO.java
0 → 100644
View file @
b2c3262d
package
com
.
lyy
.
admin
.
VO
;
import
com.lyy.admin.domain.developmentinfo.*
;
import
com.lyy.admin.domain.system.SysCarouselInfo
;
import
com.lyy.admin.domain.system.SysFileInfo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"开发区保存信息"
,
description
=
""
)
public
class
DevelopmentInfoAllSaveVO
{
@ApiModelProperty
(
value
=
"开发区基本信息"
)
private
DevelopmentInfoSaveVO
developmentInfo
=
new
DevelopmentInfoSaveVO
();
@ApiModelProperty
(
value
=
"招商方向"
)
private
List
<
DevelopmentInvestmentDirectionInfo
>
investmentDirectionInfos
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"重点企业"
)
private
List
<
DevelopmentPrimaryEnterpriseInfo
>
primaryEnterpriseInfos
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"产业政策"
)
private
List
<
DevelopmentIndustryPolicyInfo
>
industryPolicyInfos
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"产业基金"
)
private
List
<
DevelopmentIndustryFundInfo
>
industryFundInfos
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"土地信息"
)
private
List
<
DevelopmentIndustrialLandInfo
>
industryLandInfos
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"开发区图片上传"
)
private
List
<
String
>
carouselUrls
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"政策文件上传"
)
private
List
<
String
>
policyUrls
=
new
ArrayList
<>();
}
src/main/java/com/lyy/admin/VO/DevelopmentInfoSaveVO.java
0 → 100644
View file @
b2c3262d
package
com
.
lyy
.
admin
.
VO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@ApiModel
(
value
=
"都市圈基本信息"
,
description
=
"都市圈基本信息"
)
public
class
DevelopmentInfoSaveVO
implements
Serializable
{
@ApiModelProperty
(
value
=
"开发区id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"开发区名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"开发区级别"
)
private
String
levelName
;
@ApiModelProperty
(
value
=
"开发区类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"开发区简介"
)
private
String
description
;
@ApiModelProperty
(
value
=
"省"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"市"
)
private
String
cityName
;
@ApiModelProperty
(
value
=
"区/县"
)
private
String
regionName
;
@ApiModelProperty
(
value
=
"详细地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"规划面积(平方公里)"
)
private
BigDecimal
planArea
;
@ApiModelProperty
(
value
=
"招商对接人"
)
private
String
contactPerson
;
@ApiModelProperty
(
value
=
"联系方式"
)
private
String
contactPhone
;
@ApiModelProperty
(
value
=
"主导产业"
)
private
String
primaryIndustry
;
@ApiModelProperty
(
value
=
"总投资额(亿元)"
)
private
BigDecimal
investmentAmountTotal
;
@ApiModelProperty
(
value
=
"亩均投资强度(单位:万/亩)"
)
private
String
investmentStrength
;
@ApiModelProperty
(
value
=
"亩均税收(单位:万/亩)"
)
private
String
taxationStrength
;
@ApiModelProperty
(
value
=
"亩均年产值(单位:万/亩)"
)
private
String
averageOutputValue
;
@ApiModelProperty
(
value
=
"投资周期(月)"
)
private
Integer
buildingPeriod
;
@ApiModelProperty
(
value
=
"环评要求"
)
private
String
environmentalEquirements
;
@ApiModelProperty
(
value
=
"能评要求(单位:tce/万元)"
)
private
String
valueAddedEnergy
;
@ApiModelProperty
(
value
=
"禁限目录"
)
private
String
prohibitedDirectory
;
@ApiModelProperty
(
value
=
"禁限目录文件URL"
)
private
String
prohibitedUrl
;
@ApiModelProperty
(
value
=
"是否有其他要求(0-无;1-有)"
)
private
Integer
isOtherRequirements
;
@ApiModelProperty
(
value
=
"其他"
)
private
String
accessOther
;
@ApiModelProperty
(
value
=
"人力成本(元/月)"
)
private
BigDecimal
laborCost
;
@ApiModelProperty
(
value
=
"土地成本(万元/亩)"
)
private
BigDecimal
landCost
;
@ApiModelProperty
(
value
=
"工业用电(元/㎡/天)"
)
private
String
industrialElectricity
;
@ApiModelProperty
(
value
=
"供电类型"
)
private
String
powerSupplyType
;
@ApiModelProperty
(
value
=
"变电站级别"
)
private
String
substationLevel
;
@ApiModelProperty
(
value
=
"工业用水单价(元/吨)"
)
private
String
industrialWaterPrice
;
@ApiModelProperty
(
value
=
"污水处理类别"
)
private
String
sewageWaterType
;
@ApiModelProperty
(
value
=
"污水处理价格(元/吨)"
)
private
String
sewageWaterPrice
;
@ApiModelProperty
(
value
=
"是否有供暖(0-无;1-有)"
)
private
Integer
isHeating
;
@ApiModelProperty
(
value
=
"供暖单价(元/m³)"
)
private
String
heatingPrice
;
@ApiModelProperty
(
value
=
"是否有蒸汽(0-无;1-有)"
)
private
Integer
isSteam
;
@ApiModelProperty
(
value
=
"蒸汽价格(元/m³)"
)
private
String
steamPrice
;
@ApiModelProperty
(
value
=
"是否有天然气(0-无;1-有)"
)
private
Integer
isNaturalGas
;
@ApiModelProperty
(
value
=
"天然气单价(元/m³)"
)
private
String
naturalGasPrice
;
@ApiModelProperty
(
value
=
"是否有产业基金(0-无;1-有)"
)
private
Integer
isIndustryFund
;
@ApiModelProperty
(
value
=
"认证状态(1-未认证;2-认证中;3-已认证;4-已拒绝;9-作废)"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"是否为系统提前预录入(0-否;1-是)"
)
private
Integer
isSystem
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
src/main/java/com/lyy/admin/VO/ParkInfoAllSaveVO.java
View file @
b2c3262d
package
com
.
lyy
.
admin
.
VO
;
import
com.lyy.admin.domain.parkinfo.*
;
import
com.lyy.admin.domain.system.SysCarouselInfo
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
@@ -13,6 +14,8 @@ public class ParkInfoAllSaveVO implements Serializable {
private
List
<
ParkTrafficInfo
>
parkTrafficInfos
;
private
List
<
SysCarouselInfoVO
>
sysCarouselInfos
;
private
List
<
ParkCarrierInfo
>
parkCarrierInfos
;
private
List
<
ParkResourcesInfo
>
parkResourcesInfos
;
...
...
src/main/java/com/lyy/admin/VO/SysCarouselInfoVO.java
View file @
b2c3262d
...
...
@@ -19,24 +19,6 @@ import java.util.Date;
@Data
@ApiModel
(
value
=
"轮播图信息"
)
public
class
SysCarouselInfoVO
implements
Serializable
{
/**
* 主键id
*/
@TableId
@ApiModelProperty
(
value
=
"填写主键id为更新,不填写为新增"
)
private
Integer
id
;
/**
*
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
*
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
/**
* 图片地址链接
...
...
@@ -44,47 +26,6 @@ public class SysCarouselInfoVO implements Serializable {
@ApiModelProperty
(
value
=
"图片地址链接"
)
private
String
imgUrl
;
/**
* 图片描述
*/
@ApiModelProperty
(
value
=
"图片描述"
)
private
String
description
;
/**
* 图片状态(0-禁用;1-可用)
*/
@ApiModelProperty
(
value
=
"图片状态(0-禁用;1-可用),不传的话默认为1"
)
private
Integer
status
;
/**
* 类型(0 -都市圈、1-开发区、2-园区、3-首页)
*/
@ApiModelProperty
(
value
=
"类型(0 -都市圈、1-开发区、2-园区、3-首页)"
)
private
Integer
type
;
/**
* 排序
*/
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
orderNumber
;
/**
* 关联id
*/
@ApiModelProperty
(
value
=
"关联id"
)
private
Integer
associationId
;
/**
* 关联名称
*/
@ApiModelProperty
(
value
=
"关联名称"
)
private
String
associationName
;
/**
* 跳转链接
*/
@ApiModelProperty
(
value
=
"跳转链接"
)
private
String
linkUrl
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
...
...
src/main/java/com/lyy/admin/common/config/ResourceConfig.java
View file @
b2c3262d
...
...
@@ -55,7 +55,7 @@ public class ResourceConfig implements WebMvcConfigurer {
String
[]
excludeUrl
=
new
String
[]{
"/demo/login"
,
"/login/login"
,
"/weixin/login"
,
"/parkInfo/list"
,
"/developmentInfo/list"
,
"/megalopolisInfo/list"
,
"/treeInfo/**"
,
"/homePage/**"
};
"/treeInfo/**"
,
"/homePage/**"
,
"/sysFile/**"
};
String
[]
excludePatterns
=
(
String
[])
ArrayUtils
.
addAll
(
excludeSwagger
,
excludeUrl
);
System
.
out
.
println
(
"自定义拦截器#############################################"
);
...
...
src/main/java/com/lyy/admin/common/exception/APIExceptionEnum.java
View file @
b2c3262d
...
...
@@ -19,7 +19,12 @@ public enum APIExceptionEnum {
NOTEXISTS_EXCEPTION
(
4500
,
"数据不存在,请确认!"
),
//
WX_GETPHONENUMBER_ERROR
(
40029
,
"微信获取手机号code码无效,或着微信异常,请重试!"
);
WX_GETPHONENUMBER_ERROR
(
40029
,
"微信获取手机号code码无效,或着微信异常,请重试!"
),
//园区开发区认证
ALREADY_AUTH
(
4200
,
"当前数据已经认证成功,请勿重复认证"
);
private
int
code
;
private
String
message
;
...
...
src/main/java/com/lyy/admin/controller/developmentinfo/DevelopmentInfoController.java
View file @
b2c3262d
package
com
.
lyy
.
admin
.
controller
.
developmentinfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.lyy.admin.VO.DevelopmentInfoAllSaveVO
;
import
com.lyy.admin.VO.ParkInfoAllSaveVO
;
import
com.lyy.admin.common.anno.Cache
;
import
com.lyy.admin.common.exception.APIException
;
import
com.lyy.admin.common.page.TableDataInfo
;
...
...
@@ -21,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -67,5 +71,22 @@ public class DevelopmentInfoController extends BaseController {
public
DevelopmentInfoAllVO
get
(
@PathVariable
Integer
id
)
{
return
developmentInfoSerivce
.
getDevelopmentInfo
(
id
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getIsMembership
());
}
@PostMapping
(
"/saveOrUpdateDevelopmentInfo"
)
@ResponseBody
@ApiOperation
(
value
=
"保存或者更新开发区信息"
,
notes
=
"点击新增时, 保存status=1,isSystem=0;提交status=2,isSystem=0;"
+
"点击认证时,保存status=1,isSystem=1;提交status=2,isSystem=1;"
)
public
Boolean
saveOrUpdateParkInfo
(
@Valid
@RequestBody
DevelopmentInfoAllSaveVO
developmentInfoSaveVO
)
{
return
developmentInfoSerivce
.
saveOrUpdateDevelopmentInfo
(
developmentInfoSaveVO
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getUserName
());
}
@PostMapping
(
"/isAlreadyAuthentication"
)
@ResponseBody
@ApiOperation
(
value
=
"草稿箱点击编辑时判断是否已认证"
,
notes
=
"true-已认证;false-未认证"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"开发区id"
,
type
=
"Integer"
)
public
boolean
isAlreadyAuthentication
(
Integer
id
){
return
developmentInfoSerivce
.
isAlreadyAuthentication
(
id
);
}
}
src/main/java/com/lyy/admin/controller/parkinfo/ParkInfoController.java
View file @
b2c3262d
...
...
@@ -87,7 +87,7 @@ public class ParkInfoController extends BaseController {
@PostMapping
(
"/saveOrUpdateParkInfo"
)
@ResponseBody
@ApiOperation
(
value
=
"保存或者更新
信息
园区信息"
,
notes
=
""
)
@ApiOperation
(
value
=
"保存或者更新园区信息"
,
notes
=
""
)
@ApiOperationSupport
(
ignoreParameters
=
{
"parkTrafficInfo"
,
"carrierInfoVO"
,
"id"
})
public
ParkInfoAllSaveVO
saveOrUpdateParkInfo
(
@Valid
@RequestBody
ParkInfoAllSaveVO
parkInfoAllVO
)
{
return
parkInfoService
.
saveOrUpdateParkInfo
(
parkInfoAllVO
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getUserName
());
...
...
src/main/java/com/lyy/admin/domain/developmentinfo/DevelopmentInfo.java
View file @
b2c3262d
...
...
@@ -453,6 +453,21 @@ public class DevelopmentInfo implements Serializable {
//天然气单价(元/m³)
private
String
naturalGasPrice
;
//是否有产业基金(0-无;1-有)
private
Integer
isIndustryFund
;
//用户id
private
Integer
userId
;
//用户名称
private
String
userName
;
//是否为系统提前预录入(0-否;1-是)
private
Integer
isSystem
;
//系统预录入数据id
private
Integer
mirrorId
;
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
src/main/java/com/lyy/admin/domain/developmentinfo/DevelopmentPrimaryEnterpriseInfo.java
View file @
b2c3262d
...
...
@@ -16,7 +16,7 @@ import lombok.Data;
*/
@TableName
(
value
=
"development_primary_enterprise_info"
)
@Data
@ApiModel
(
value
=
"
开发区片区龙头/链主企业代表信息"
,
description
=
"片区龙头/链主企业代表
"
)
@ApiModel
(
value
=
"
企业代表信息"
,
description
=
"企业代表信息
"
)
public
class
DevelopmentPrimaryEnterpriseInfo
implements
Serializable
{
/**
* 主键id
...
...
src/main/java/com/lyy/admin/domain/system/SysCarouselInfo.java
View file @
b2c3262d
...
...
@@ -21,58 +21,69 @@ public class SysCarouselInfo implements Serializable {
* 主键id
*/
@TableId
@ApiModelProperty
(
hidden
=
true
)
private
Integer
id
;
/**
*
*/
@ApiModelProperty
(
hidden
=
true
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/**
*
*/
@ApiModelProperty
(
hidden
=
true
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
/**
* 图片地址链接
*/
@ApiModelProperty
(
value
=
"图片地址链接"
)
private
String
imgUrl
;
/**
* 图片描述
*/
@ApiModelProperty
(
hidden
=
true
)
private
String
description
;
/**
* 图片状态(0-禁用;1-可用)
*/
@ApiModelProperty
(
hidden
=
true
)
private
Integer
status
;
/**
* 类型(0 -都市圈、1-开发区、2-园区、3-首页)
*/
@ApiModelProperty
(
hidden
=
true
)
private
Integer
type
;
/**
* 排序
*/
@ApiModelProperty
(
hidden
=
true
)
private
Integer
orderNumber
;
/**
* 关联id
*/
@ApiModelProperty
(
hidden
=
true
)
private
Integer
associationId
;
/**
* 关联名称
*/
@ApiModelProperty
(
hidden
=
true
)
private
String
associationName
;
/**
* 跳转链接
*/
@ApiModelProperty
(
hidden
=
true
)
private
String
linkUrl
;
@TableField
(
exist
=
false
)
...
...
src/main/java/com/lyy/admin/enumerate/DevelopmentStatusEnum.java
View file @
b2c3262d
package
com
.
lyy
.
admin
.
enumerate
;
public
enum
DevelopmentStatusEnum
{
NOAUTHENTICATION
(
0
,
"未认知"
),
AUTHENTICATION
(
1
,
"认证"
);
STATUS_WRZ
(
1
,
"未认证"
),
STATUS_RZZ
(
2
,
"认证中"
),
STATUS_YRZ
(
3
,
"已认证"
),
STATUS_YJJ
(
4
,
"已拒绝"
),
STATUS_ZF
(
9
,
"作废"
),
IS_SYSTEM_0
(
0
,
"不是系统提前预录入"
),
IS_SYSTEM_1
(
1
,
"是系统提前预录入"
),
IS_COLLECTION_0
(
0
,
"未收藏"
),
IS_COLLECTION_1
(
1
,
"收藏"
);
private
Integer
code
;
private
String
name
;
...
...
src/main/java/com/lyy/admin/enumerate/ParkInfoEnum.java
0 → 100644
View file @
b2c3262d
package
com
.
lyy
.
admin
.
enumerate
;
public
enum
ParkInfoEnum
{
STATUS_WRZ
(
1
,
"未认证"
),
STATUS_RZZ
(
2
,
"认证中"
),
STATUS_YRZ
(
3
,
"已认证"
),
STATUS_YJJ
(
4
,
"已拒绝"
),
STATUS_ZF
(
9
,
"作废"
),
IS_SYSTEM_0
(
0
,
"不是系统提前预录入"
),
IS_SYSTEM_1
(
1
,
"是系统提前预录入"
),
IS_COLLECTION_0
(
0
,
"未收藏"
),
IS_COLLECTION_1
(
1
,
"收藏"
),
HOT_PARK
(
1
,
"是热点园区"
)
;
private
Integer
code
;
private
String
name
;
ParkInfoEnum
(
Integer
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
Integer
getCode
(){
return
code
;
}
}
src/main/java/com/lyy/admin/enumerate/SubmitExamineEnum.java
0 → 100644
View file @
b2c3262d
package
com
.
lyy
.
admin
.
enumerate
;
public
enum
SubmitExamineEnum
{
TYPE_MEGALOPOLIS
(
0
,
"都市圈"
),
TYPE_DEVELOPMENT
(
1
,
"开发区"
),
TYPE_PARK
(
2
,
"园区"
),
TYPE_OTHER
(
3
,
"其他"
),
CHANNELSOURCE_WX
(
1
,
"微信小程序"
),
CHANNELSOURCE_LYY
(
2
,
"立业云"
),
INFO_SOURCE_RZ
(
1
,
"认证信息"
),
INF_SOURCE_LR
(
2
,
"新录入信息"
),
;
private
Integer
code
;
private
String
name
;
SubmitExamineEnum
(
Integer
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
Integer
getCode
(){
return
code
;
}
}
src/main/java/com/lyy/admin/enumerate/SysCarouselTypeEnum.java
0 → 100644
View file @
b2c3262d
package
com
.
lyy
.
admin
.
enumerate
;
public
enum
SysCarouselTypeEnum
{
MEGALOPOLIS
(
0
,
"都市圈"
),
DEVELOPMENT
(
1
,
"开发区"
),
PARK
(
2
,
"园区"
),
HOMEPAGE
(
3
,
"首页"
);
SysCarouselTypeEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
private
Integer
code
;
private
String
name
;
public
Integer
getCode
()
{
return
code
;
}
}
src/main/java/com/lyy/admin/service/developmentinfo/DevelopmentInfoService.java
View file @
b2c3262d
package
com
.
lyy
.
admin
.
service
.
developmentinfo
;
import
com.lyy.admin.VO.DevelopmentInfoAllSaveVO
;
import
com.lyy.admin.common.page.TableDataInfo
;
import
com.lyy.admin.domain.developmentinfo.DevelopmentInfo
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -23,5 +24,9 @@ public interface DevelopmentInfoService extends IService<DevelopmentInfo> {
public
List
<
DevelopmentInfoListVO
>
selectDevelopmentInfoCollectionList
(
DevelopmentInfoCollectionParam
developmentInfoParam
);
public
Boolean
saveOrUpdateDevelopmentInfo
(
DevelopmentInfoAllSaveVO
developmentInfoSaveVO
,
Integer
userId
,
String
userName
);
public
boolean
isExistInfo
(
Integer
userId
,
Integer
collectionId
);
public
boolean
isAlreadyAuthentication
(
Integer
id
);
}
src/main/java/com/lyy/admin/service/developmentinfo/impl/DevelopmentInfoServiceImpl.java
View file @
b2c3262d
...
...
@@ -5,31 +5,30 @@ import cn.hutool.json.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.lyy.admin.VO.DevelopmentInfoAllVO
;
import
com.lyy.admin.VO.DevelopmentInfoListVO
;
import
com.lyy.admin.VO.DevelopmentInfoVO
;
import
com.lyy.admin.enumerate.CarouselTypeEnum
;
import
com.lyy.admin.enumerate.StatusEnum
;
import
com.lyy.admin.VO.*
;
import
com.lyy.admin.enumerate.*
;
import
com.lyy.admin.common.exception.APIException
;
import
com.lyy.admin.common.exception.APIExceptionEnum
;
import
com.lyy.admin.domain.SysCollection
;
import
com.lyy.admin.domain.developmentinfo.*
;
import
com.lyy.admin.VO.ParkInfoListVO
;
import
com.lyy.admin.domain.parkinfo.ParkInfo
;
import
com.lyy.admin.domain.parkinfo.ParkInfoParam
;
import
com.lyy.admin.domain.system.SysCarouselInfo
;
import
com.lyy.admin.mapper.SysCollectionMapper
;
import
com.lyy.admin.mapper.system.SysCarouselInfoMapper
;
import
com.lyy.admin.mapper.system.SysMembershipInfoMapper
;
import
com.lyy.admin.service.FileSourceService
;
import
com.lyy.admin.service.developmentinfo.*
;
import
com.lyy.admin.mapper.developmentinfo.DevelopmentInfoMapper
;
import
com.lyy.admin.service.parkinfo.ParkInfoService
;
import
com.lyy.admin.service.system.SysCarouselInfoService
;
import
com.lyy.admin.service.system.SysMembershipInfoService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -76,8 +75,13 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
@Autowired
SysCollectionMapper
sysCollectionMapper
;
@Autowired
SysCarouselInfoService
sysCarouselInfoService
;
@Autowired
SysCarouselInfoMapper
sysCarouselInfoMapper
;
FileSourceService
fileSourceService
;
@Override
public
List
<
DevelopmentInfo
>
selectDevelopmentInfoVOList
(
DevelopmentInfoParam
developmentInfoParam
)
{
String
planArea
=
developmentInfoParam
.
getPlanArea
();
...
...
@@ -279,7 +283,7 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
Integer
yuanquId
=
CarouselTypeEnum
.
KAIFAQU
.
getType
();
LambdaQueryWrapper
<
SysCarouselInfo
>
tWrapper
=
new
LambdaQueryWrapper
<>();
tWrapper
.
eq
(
SysCarouselInfo:
:
getType
,
yuanquId
).
eq
(
SysCarouselInfo:
:
getAssociationId
,
id
).
eq
(
SysCarouselInfo:
:
getStatus
,
StatusEnum
.
ENABLE
.
getCode
());
List
<
SysCarouselInfo
>
sysCarouselInfos
=
sysCarouselInfo
Mapper
.
selectL
ist
(
tWrapper
);
List
<
SysCarouselInfo
>
sysCarouselInfos
=
sysCarouselInfo
Service
.
l
ist
(
tWrapper
);
developmentInfoAllVO
.
setSysCarouselInfos
(
sysCarouselInfos
);
return
developmentInfoAllVO
;
...
...
@@ -290,6 +294,61 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
return
developmentInfoMapper
.
selectDevelopmentInfoCollectionList
(
developmentInfoParam
);
}
@Override
@Transactional
public
Boolean
saveOrUpdateDevelopmentInfo
(
DevelopmentInfoAllSaveVO
developmentInfoSaveVO
,
Integer
userId
,
String
userName
)
{
DevelopmentInfo
developmentInfo
=
new
DevelopmentInfo
();
BeanUtils
.
copyProperties
(
developmentInfoSaveVO
.
getDevelopmentInfo
(),
developmentInfo
);
//系统预录入
if
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getIsSystem
()
==
DevelopmentStatusEnum
.
IS_SYSTEM_1
.
getCode
()){
developmentInfo
.
setUserId
(
userId
);
developmentInfo
.
setUserName
(
userName
);
developmentInfo
.
setIsSystem
(
0
);
developmentInfo
.
setId
(
null
);
developmentInfo
.
setMirrorId
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getId
());
}
//新增
if
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getIsSystem
()
==
DevelopmentStatusEnum
.
IS_SYSTEM_0
.
getCode
()){
developmentInfo
.
setUserId
(
userId
);
developmentInfo
.
setUserName
(
userName
);
developmentInfo
.
setIsSystem
(
0
);
if
(
ObjectUtils
.
isNotEmpty
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getId
())){
DevelopmentInfo
developmentInfoSource
=
developmentInfoMapper
.
selectById
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getId
());
developmentInfo
.
setMirrorId
(
developmentInfoSource
.
getMirrorId
());
}
}
//校验是否已认证
isAlreadyAuthentication
(
developmentInfo
);
this
.
saveOrUpdate
(
developmentInfo
);
Integer
id
=
developmentInfo
.
getId
();
// String name = developmentInfo.getName();
//招商方向
developmentInfoSaveVO
.
getInvestmentDirectionInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentInvestmentDirectionInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getInvestmentDirectionInfos
());
//重点企业
developmentInfoSaveVO
.
getPrimaryEnterpriseInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentPrimaryEnterpriseInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getPrimaryEnterpriseInfos
());
//产业基金
developmentInfoSaveVO
.
getIndustryFundInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentIndustryFundInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getIndustryFundInfos
());
//产业政策
developmentInfoSaveVO
.
getIndustryPolicyInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentIndustryPolicyInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getIndustryPolicyInfos
());
//土地详情
developmentInfoSaveVO
.
getIndustryLandInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentIndustrialLandInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getIndustryLandInfos
());
//开发区图片
sysCarouselInfoService
.
saveCarouselInfo
(
id
,
developmentInfoSaveVO
.
getCarouselUrls
(),
SysCarouselTypeEnum
.
DEVELOPMENT
);
//政策文件上传
fileSourceService
.
saveFileSource
(
id
,
developmentInfoSaveVO
.
getPolicyUrls
(),
FileSourceObjectTypeEnum
.
DEVELOPMENT
);
return
true
;
}
@Override
public
boolean
isExistInfo
(
Integer
userId
,
Integer
collectionId
)
{
//是否收藏
...
...
@@ -299,6 +358,33 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
PIQueryWrapper
.
eq
(
"user_id"
,
userId
);
return
sysCollectionMapper
.
exists
(
PIQueryWrapper
);
}
@Override
public
boolean
isAlreadyAuthentication
(
Integer
id
){
DevelopmentInfo
developmentInfo
=
developmentInfoMapper
.
selectById
(
id
);
return
isAlreadyAuthentication
(
developmentInfo
);
}
/**
* 保存提交、编辑之前的校验逻辑
*
* 对于系统提前预录入去认证的数据:
* 若其中某一条数据已经认证(status=3),认证中的数据全部置为作废(status=9);
* 保存草稿未提交的数据进行判断,若原始数据已经作废,则这条数据也不允许再次编辑或者提交。
* @param developmentInfo
*/
public
boolean
isAlreadyAuthentication
(
DevelopmentInfo
developmentInfo
){
boolean
flag
=
false
;
if
(
ObjectUtils
.
isNotEmpty
(
developmentInfo
.
getMirrorId
())){
DevelopmentInfo
developmentInfoSource
=
developmentInfoMapper
.
selectById
(
developmentInfo
.
getMirrorId
());
if
(
developmentInfoSource
.
getStatus
()
==
DevelopmentStatusEnum
.
STATUS_ZF
.
getCode
()){
// throw new APIException(APIExceptionEnum.ALREADY_AUTH);
flag
=
true
;
}
}
return
flag
;
}
}
...
...
src/main/java/com/lyy/admin/service/impl/FileSourceServiceImpl.java
View file @
b2c3262d
...
...
@@ -27,6 +27,9 @@ public class FileSourceServiceImpl extends ServiceImpl<FileSourceMapper, FileSou
@Transactional
@Override
public
void
saveFileSource
(
Integer
objectId
,
List
<
String
>
urls
,
FileSourceObjectTypeEnum
fileSourceObjectTypeEnum
)
{
if
(
urls
==
null
){
return
;
}
for
(
String
url
:
urls
)
{
FileSource
fileSource
=
new
FileSource
();
...
...
src/main/java/com/lyy/admin/service/parkinfo/impl/ParkInfoServiceImpl.java
View file @
b2c3262d
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.lyy.admin.VO.*
;
import
com.lyy.admin.common.anno.Cache
;
import
com.lyy.admin.enumerate.CarouselTypeEnum
;
import
com.lyy.admin.enumerate.ParkInfoEnum
;
import
com.lyy.admin.enumerate.StatusEnum
;
import
com.lyy.admin.common.exception.APIException
;
import
com.lyy.admin.common.exception.APIExceptionEnum
;
...
...
@@ -17,6 +18,7 @@ import com.lyy.admin.domain.SysCollection;
import
com.lyy.admin.domain.carrierinfo.*
;
import
com.lyy.admin.domain.parkinfo.*
;
import
com.lyy.admin.domain.system.SysCarouselInfo
;
import
com.lyy.admin.enumerate.SubmitExamineEnum
;
import
com.lyy.admin.mapper.SysCollectionMapper
;
import
com.lyy.admin.mapper.carrierinfo.CarrierInfoMapper
;
import
com.lyy.admin.mapper.parkinfo.*
;
...
...
@@ -28,6 +30,7 @@ import com.lyy.admin.service.carrierinfo.CarrierFloorInfoService;
import
com.lyy.admin.service.carrierinfo.CarrierInfoService
;
import
com.lyy.admin.service.carrierinfo.CarrierOperateInfoService
;
import
com.lyy.admin.service.parkinfo.*
;
import
com.lyy.admin.service.system.SysCarouselInfoService
;
import
com.lyy.admin.service.system.SysMembershipInfoService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -104,8 +107,11 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
@Autowired
SubmitExamineLogService
submitExamineLogService
;
// @Autowired
// SysCarouselInfoMapper sysCarouselInfoMapper;
@Autowired
SysCarouselInfo
Mapper
sysCarouselInfoMapper
;
SysCarouselInfo
Service
sysCarouselInfoService
;
// @Cache(cacheByUser = false)
public
List
<
ParkInfo
>
selectParkInfoListVO
(
ParkInfoParam
parkInfoParam
)
{
...
...
@@ -184,7 +190,7 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
public
List
<
ParkInfo
>
selectHotParkInfoListVO
()
{
QueryWrapper
<
ParkInfo
>
ParkInfoQW
=
new
QueryWrapper
<>();
ParkInfoQW
.
ge
(
"is_hot_park"
,
1
);
ParkInfoQW
.
ge
(
"is_hot_park"
,
ParkInfoEnum
.
HOT_PARK
.
getCode
()
);
ParkInfoQW
.
orderByAsc
(
"is_hot_park"
);
List
<
ParkInfo
>
parkInfos
=
parkInfoMapper
.
selectList
(
ParkInfoQW
);
return
parkInfos
;
...
...
@@ -278,22 +284,17 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
}
if
(
ObjectUtils
.
isNotEmpty
(
userId
))
{
//是否收藏
QueryWrapper
<
SysCollection
>
PIQueryWrapper
=
new
QueryWrapper
<>();
PIQueryWrapper
.
eq
(
"type"
,
2
);
PIQueryWrapper
.
eq
(
"collect_id"
,
parkInfoAllVO
.
getParkInfoVO
().
getId
());
PIQueryWrapper
.
eq
(
"user_id"
,
userId
);
boolean
isSysCollection
=
sysCollectionMapper
.
exists
(
PIQueryWrapper
);
if
(
isSysCollection
)
{
parkInfoAllVO
.
getParkInfoVO
().
setIsCollection
(
1
);
if
(
isExistInfo
(
userId
,
parkInfoAllVO
.
getParkInfoVO
().
getId
()))
{
parkInfoAllVO
.
getParkInfoVO
().
setIsCollection
(
ParkInfoEnum
.
IS_COLLECTION_1
.
getCode
());
}
else
{
parkInfoAllVO
.
getParkInfoVO
().
setIsCollection
(
0
);
parkInfoAllVO
.
getParkInfoVO
().
setIsCollection
(
ParkInfoEnum
.
IS_COLLECTION_0
.
getCode
()
);
}
}
Integer
yuanquId
=
CarouselTypeEnum
.
YUANQU
.
getType
();
LambdaQueryWrapper
<
SysCarouselInfo
>
tWrapper
=
new
LambdaQueryWrapper
<>();
tWrapper
.
eq
(
SysCarouselInfo:
:
getType
,
yuanquId
).
eq
(
SysCarouselInfo:
:
getAssociationId
,
id
).
eq
(
SysCarouselInfo:
:
getStatus
,
StatusEnum
.
ENABLE
.
getCode
());
List
<
SysCarouselInfo
>
sysCarouselInfos
=
sysCarouselInfo
Mapper
.
selectL
ist
(
tWrapper
);
List
<
SysCarouselInfo
>
sysCarouselInfos
=
sysCarouselInfo
Service
.
l
ist
(
tWrapper
);
parkInfoAllVO
.
setSysCarouselInfos
(
sysCarouselInfos
);
return
parkInfoAllVO
;
}
...
...
@@ -313,11 +314,11 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
public
ParkInfoAllSaveVO
saveOrUpdateParkInfo
(
ParkInfoAllSaveVO
parkInfoAllVO
,
Integer
userId
,
String
userName
)
{
//针对于待认证的要完善的数据。
if
(
parkInfoAllVO
.
getParkInfoVO
().
getIsSystem
()
==
1
)
{
if
(
parkInfoAllVO
.
getParkInfoVO
().
getIsSystem
()
==
ParkInfoEnum
.
IS_SYSTEM_1
.
getCode
()
)
{
parkInfoAllVO
.
getParkInfoVO
().
setMirrorId
(
parkInfoAllVO
.
getParkInfoVO
().
getId
());
parkInfoAllVO
.
getParkInfoVO
().
setId
(
null
);
}
if
(
parkInfoAllVO
!=
null
&&
Integer
.
valueOf
(
parkInfoAllVO
.
getParkInfoVO
().
getStatus
())
==
2
)
{
if
(
parkInfoAllVO
!=
null
&&
Integer
.
valueOf
(
parkInfoAllVO
.
getParkInfoVO
().
getStatus
())
==
ParkInfoEnum
.
STATUS_RZZ
.
getCode
()
)
{
parkInfoAllVO
.
getParkInfoVO
().
setSubmitTime
(
DateUtil
.
date
());
}
parkInfoAllVO
.
getParkInfoVO
().
setUserId
(
userId
);
...
...
@@ -325,7 +326,29 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
ParkInfo
parkInfo
=
new
ParkInfo
();
BeanUtils
.
copyProperties
(
parkInfoAllVO
.
getParkInfoVO
(),
parkInfo
);
this
.
saveOrUpdate
(
parkInfo
);
parkInfoAllVO
.
getParkInfoVO
().
setId
(
parkInfo
.
getId
());
Integer
id
=
parkInfo
.
getId
();
parkInfoAllVO
.
getParkInfoVO
().
setId
(
id
);
//删除逻辑
//轮播图
List
<
SysCarouselInfoVO
>
sysCarouselInfoVOs
=
parkInfoAllVO
.
getSysCarouselInfos
();
List
<
SysCarouselInfo
>
sysCarouselInfos
=
new
ArrayList
<>();
if
(
sysCarouselInfoVOs
!=
null
){
for
(
int
i
=
0
;
i
<
sysCarouselInfoVOs
.
size
();
i
++)
{
SysCarouselInfo
sysCarouselInfo
=
new
SysCarouselInfo
();
BeanUtils
.
copyProperties
(
sysCarouselInfoVOs
.
get
(
i
),
sysCarouselInfo
);
sysCarouselInfo
.
setStatus
(
StatusEnum
.
ENABLE
.
getCode
());
sysCarouselInfo
.
setType
(
CarouselTypeEnum
.
YUANQU
.
getType
());
sysCarouselInfo
.
setAssociationName
(
parkInfoAllVO
.
getParkInfoVO
().
getName
());
sysCarouselInfo
.
setAssociationId
(
id
);
sysCarouselInfo
.
setImgUrl
(
sysCarouselInfoVOs
.
get
(
i
).
getImgUrl
());
sysCarouselInfo
.
setOrderNumber
(
i
);
sysCarouselInfos
.
add
(
sysCarouselInfo
);
}
sysCarouselInfoService
.
saveOrUpdateBatch
(
sysCarouselInfos
);
}
List
<
ParkTrafficInfo
>
parkTrafficInfo
=
parkInfoAllVO
.
getParkTrafficInfos
();
if
(
parkTrafficInfo
!=
null
)
{
...
...
@@ -358,54 +381,54 @@ public class ParkInfoServiceImpl extends ServiceImpl<ParkInfoMapper, ParkInfo> i
}
//保存载体
List
<
CarrierInfoAllVO
>
carrierInfoAllVOs
=
parkInfoAllVO
.
getCarrierInfoAllVOs
();
for
(
CarrierInfoAllVO
carrierInfoAllVO
:
carrierInfoAllVOs
)
{
if
(
ObjectUtils
.
isNotEmpty
(
carrierInfoAllVO
.
getCarrierInfoVO
().
getId
()))
{
carrierInfoAllVO
.
getCarrierInfoVO
().
setCreateTime
(
DateUtil
.
date
());
}
else
{
carrierInfoAllVO
.
getCarrierInfoVO
().
setUpdateTime
(
DateUtil
.
date
());
}
carrierInfoAllVO
.
getCarrierInfoVO
().
setParkId
(
parkInfo
.
getId
());
CarrierInfo
carrierInfo
=
new
CarrierInfo
();
BeanUtils
.
copyProperties
(
carrierInfoAllVO
.
getCarrierInfoVO
(),
carrierInfo
);
carrierInfoService
.
saveOrUpdate
(
carrierInfo
);
List
<
CarrierElevatorInfo
>
carrierElevatorInfo
=
carrierInfoAllVO
.
getCarrierElevatorInfo
();
if
(
carrierElevatorInfo
!=
null
)
{
carrierElevatorInfo
.
stream
().
forEach
(
e
->
e
.
setCarrierId
(
carrierInfo
.
getId
()));
carrierElevatorInfoService
.
saveOrUpdateBatch
(
carrierElevatorInfo
);
}
List
<
CarrierFloorInfo
>
carrierFloorInfo
=
carrierInfoAllVO
.
getCarrierFloorInfo
();
if
(
carrierFloorInfo
!=
null
)
{
carrierFloorInfo
.
stream
().
forEach
(
e
->
e
.
setCarrierId
(
carrierInfo
.
getId
()));
carrierFloorInfoService
.
saveOrUpdateBatch
(
carrierFloorInfo
);
}
List
<
CarrierOperateInfo
>
carrierOperateInfo
=
carrierInfoAllVO
.
getCarrierOperateInfo
();
if
(
carrierOperateInfo
!=
null
)
{
carrierOperateInfo
.
stream
().
forEach
(
e
->
e
.
setCarrierId
(
carrierInfo
.
getId
()));
carrierOperateInfoService
.
saveOrUpdateBatch
(
carrierOperateInfo
);
}
}
if
(
parkInfoAllVO
!=
null
&&
parkInfoAllVO
.
getParkInfoVO
().
getStatus
()
==
2
)
{
//
List<CarrierInfoAllVO> carrierInfoAllVOs = parkInfoAllVO.getCarrierInfoAllVOs();
//
for (CarrierInfoAllVO carrierInfoAllVO : carrierInfoAllVOs) {
//
//
if (ObjectUtils.isNotEmpty(carrierInfoAllVO.getCarrierInfoVO().getId())) {
//
carrierInfoAllVO.getCarrierInfoVO().setCreateTime(DateUtil.date());
//
} else {
//
carrierInfoAllVO.getCarrierInfoVO().setUpdateTime(DateUtil.date());
//
}
//
//
carrierInfoAllVO.getCarrierInfoVO().setParkId(parkInfo.getId());
//
CarrierInfo carrierInfo = new CarrierInfo();
//
BeanUtils.copyProperties(carrierInfoAllVO.getCarrierInfoVO(), carrierInfo);
//
carrierInfoService.saveOrUpdate(carrierInfo);
//
//
List<CarrierElevatorInfo> carrierElevatorInfo = carrierInfoAllVO.getCarrierElevatorInfo();
//
if (carrierElevatorInfo != null) {
//
carrierElevatorInfo.stream().forEach(e -> e.setCarrierId(carrierInfo.getId()));
//
carrierElevatorInfoService.saveOrUpdateBatch(carrierElevatorInfo);
//
}
//
//
List<CarrierFloorInfo> carrierFloorInfo = carrierInfoAllVO.getCarrierFloorInfo();
//
if (carrierFloorInfo != null) {
//
carrierFloorInfo.stream().forEach(e -> e.setCarrierId(carrierInfo.getId()));
//
carrierFloorInfoService.saveOrUpdateBatch(carrierFloorInfo);
//
}
//
//
List<CarrierOperateInfo> carrierOperateInfo = carrierInfoAllVO.getCarrierOperateInfo();
//
if (carrierOperateInfo != null) {
//
carrierOperateInfo.stream().forEach(e -> e.setCarrierId(carrierInfo.getId()));
//
carrierOperateInfoService.saveOrUpdateBatch(carrierOperateInfo);
//
}
//
}
if
(
parkInfoAllVO
!=
null
&&
parkInfoAllVO
.
getParkInfoVO
().
getStatus
()
==
ParkInfoEnum
.
STATUS_RZZ
.
getCode
()
)
{
SubmitExamineLog
submitExamineLog
=
new
SubmitExamineLog
();
submitExamineLog
.
setAssociationId
(
parkInfoAllVO
.
getParkInfoVO
().
getId
());
submitExamineLog
.
setAssociationName
(
parkInfoAllVO
.
getParkInfoVO
().
getName
());
submitExamineLog
.
setType
(
2
);
submitExamineLog
.
setChannelSource
(
1
);
//1-微信小程序;2-立业云
if
(
parkInfoAllVO
.
getParkInfoVO
().
getIsSystem
()
==
1
)
{
submitExamineLog
.
setInfoSource
(
1
);
submitExamineLog
.
setType
(
SubmitExamineEnum
.
TYPE_PARK
.
getCode
()
);
submitExamineLog
.
setChannelSource
(
SubmitExamineEnum
.
CHANNELSOURCE_WX
.
getCode
()
);
//1-微信小程序;2-立业云
if
(
parkInfoAllVO
.
getParkInfoVO
().
getIsSystem
()
==
ParkInfoEnum
.
IS_SYSTEM_1
.
getCode
()
)
{
submitExamineLog
.
setInfoSource
(
SubmitExamineEnum
.
INFO_SOURCE_RZ
.
getCode
()
);
}
if
(
parkInfoAllVO
.
getParkInfoVO
().
getIsSystem
()
==
0
)
{
submitExamineLog
.
setInfoSource
(
2
);
if
(
parkInfoAllVO
.
getParkInfoVO
().
getIsSystem
()
==
ParkInfoEnum
.
IS_SYSTEM_0
.
getCode
()
)
{
submitExamineLog
.
setInfoSource
(
SubmitExamineEnum
.
INF_SOURCE_LR
.
getCode
()
);
}
submitExamineLog
.
setSubmitId
(
userId
);
submitExamineLog
.
setSubmitName
(
userName
);
submitExamineLog
.
setSubmitTime
(
DateUtil
.
date
());
submitExamineLog
.
setStatus
(
2
);
submitExamineLog
.
setStatus
(
ParkInfoEnum
.
STATUS_RZZ
.
getCode
()
);
submitExamineLogService
.
save
(
submitExamineLog
);
}
return
parkInfoAllVO
;
...
...
src/main/java/com/lyy/admin/service/system/SysCarouselInfoService.java
View file @
b2c3262d
...
...
@@ -2,6 +2,9 @@ package com.lyy.admin.service.system;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.lyy.admin.domain.system.SysCarouselInfo
;
import
com.lyy.admin.enumerate.SysCarouselTypeEnum
;
import
java.util.List
;
/**
* @author 26996
...
...
@@ -10,4 +13,6 @@ import com.lyy.admin.domain.system.SysCarouselInfo;
*/
public
interface
SysCarouselInfoService
extends
IService
<
SysCarouselInfo
>
{
public
void
saveCarouselInfo
(
Integer
id
,
List
<
String
>
imgUrls
,
SysCarouselTypeEnum
sysCarouselTypeEnum
);
}
src/main/java/com/lyy/admin/service/system/impl/SysCarouselInfoServiceImpl.java
View file @
b2c3262d
...
...
@@ -2,9 +2,15 @@ package com.lyy.admin.service.system.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.lyy.admin.domain.system.SysCarouselInfo
;
import
com.lyy.admin.enumerate.StatusEnum
;
import
com.lyy.admin.enumerate.SysCarouselTypeEnum
;
import
com.lyy.admin.mapper.system.SysCarouselInfoMapper
;
import
com.lyy.admin.service.system.SysCarouselInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
...
...
@@ -16,6 +22,24 @@ import org.springframework.stereotype.Service;
public
class
SysCarouselInfoServiceImpl
extends
ServiceImpl
<
SysCarouselInfoMapper
,
SysCarouselInfo
>
implements
SysCarouselInfoService
{
@Autowired
private
SysCarouselInfoMapper
sysCarouselInfoMapper
;
@Override
@Transactional
public
void
saveCarouselInfo
(
Integer
id
,
List
<
String
>
imgUrls
,
SysCarouselTypeEnum
sysCarouselTypeEnum
)
{
if
(
imgUrls
==
null
){
return
;
}
for
(
String
url
:
imgUrls
)
{
SysCarouselInfo
sysCarouselInfo
=
new
SysCarouselInfo
();
sysCarouselInfo
.
setAssociationId
(
id
);
sysCarouselInfo
.
setStatus
(
StatusEnum
.
ENABLE
.
getCode
());
sysCarouselInfo
.
setType
(
sysCarouselTypeEnum
.
getCode
());
sysCarouselInfo
.
setImgUrl
(
url
);
sysCarouselInfoMapper
.
insert
(
sysCarouselInfo
);
}
}
}
...
...
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