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
987b299f
Commit
987b299f
authored
Nov 10, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
园区字典开发区新增保存、提交
parent
b2c3262d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
14 deletions
+52
-14
DevelopmentInfoController.java
...controller/developmentinfo/DevelopmentInfoController.java
+1
-2
DevelopmentInfo.java
...com/lyy/admin/domain/developmentinfo/DevelopmentInfo.java
+5
-0
DevelopmentInfoServiceImpl.java
...vice/developmentinfo/impl/DevelopmentInfoServiceImpl.java
+46
-12
No files found.
src/main/java/com/lyy/admin/controller/developmentinfo/DevelopmentInfoController.java
View file @
987b299f
...
@@ -75,8 +75,7 @@ public class DevelopmentInfoController extends BaseController {
...
@@ -75,8 +75,7 @@ public class DevelopmentInfoController extends BaseController {
@PostMapping
(
"/saveOrUpdateDevelopmentInfo"
)
@PostMapping
(
"/saveOrUpdateDevelopmentInfo"
)
@ResponseBody
@ResponseBody
@ApiOperation
(
value
=
"保存或者更新开发区信息"
,
notes
=
"点击新增时, 保存status=1,isSystem=0;提交status=2,isSystem=0;"
+
@ApiOperation
(
value
=
"保存或者更新开发区信息"
,
notes
=
"保存时status=1;提交时status=2;认证isSystem=1"
)
"点击认证时,保存status=1,isSystem=1;提交status=2,isSystem=1;"
)
public
Boolean
saveOrUpdateParkInfo
(
@Valid
@RequestBody
DevelopmentInfoAllSaveVO
developmentInfoSaveVO
)
{
public
Boolean
saveOrUpdateParkInfo
(
@Valid
@RequestBody
DevelopmentInfoAllSaveVO
developmentInfoSaveVO
)
{
return
developmentInfoSerivce
.
saveOrUpdateDevelopmentInfo
(
developmentInfoSaveVO
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getUserName
());
return
developmentInfoSerivce
.
saveOrUpdateDevelopmentInfo
(
developmentInfoSaveVO
,
getUserInfo
().
getUserId
(),
getUserInfo
().
getUserName
());
}
}
...
...
src/main/java/com/lyy/admin/domain/developmentinfo/DevelopmentInfo.java
View file @
987b299f
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -468,6 +469,9 @@ public class DevelopmentInfo implements Serializable {
...
@@ -468,6 +469,9 @@ public class DevelopmentInfo implements Serializable {
//系统预录入数据id
//系统预录入数据id
private
Integer
mirrorId
;
private
Integer
mirrorId
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
submitTime
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
}
}
\ No newline at end of file
src/main/java/com/lyy/admin/service/developmentinfo/impl/DevelopmentInfoServiceImpl.java
View file @
987b299f
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.lyy.admin.VO.*
;
import
com.lyy.admin.VO.*
;
import
com.lyy.admin.domain.FileSource
;
import
com.lyy.admin.enumerate.*
;
import
com.lyy.admin.enumerate.*
;
import
com.lyy.admin.common.exception.APIException
;
import
com.lyy.admin.common.exception.APIException
;
import
com.lyy.admin.common.exception.APIExceptionEnum
;
import
com.lyy.admin.common.exception.APIExceptionEnum
;
...
@@ -300,24 +301,24 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
...
@@ -300,24 +301,24 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
DevelopmentInfo
developmentInfo
=
new
DevelopmentInfo
();
DevelopmentInfo
developmentInfo
=
new
DevelopmentInfo
();
BeanUtils
.
copyProperties
(
developmentInfoSaveVO
.
getDevelopmentInfo
(),
developmentInfo
);
BeanUtils
.
copyProperties
(
developmentInfoSaveVO
.
getDevelopmentInfo
(),
developmentInfo
);
developmentInfo
.
setUserId
(
userId
);
developmentInfo
.
setUserName
(
userName
);
developmentInfo
.
setIsSystem
(
DevelopmentStatusEnum
.
IS_SYSTEM_0
.
getCode
());
//系统预录入
//系统预录入
if
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getIsSystem
()
==
DevelopmentStatusEnum
.
IS_SYSTEM_1
.
getCode
()){
if
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getIsSystem
()
==
DevelopmentStatusEnum
.
IS_SYSTEM_1
.
getCode
()){
developmentInfo
.
setUserId
(
userId
);
developmentInfo
.
setUserName
(
userName
);
developmentInfo
.
setIsSystem
(
0
);
developmentInfo
.
setId
(
null
);
developmentInfo
.
setId
(
null
);
developmentInfo
.
setMirrorId
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getId
());
developmentInfo
.
setMirrorId
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getId
());
}
}
//新增
if
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getStatus
()
==
DevelopmentStatusEnum
.
STATUS_RZZ
.
getCode
()){
if
(
developmentInfoSaveVO
.
getDevelopmentInfo
().
getIsSystem
()
==
DevelopmentStatusEnum
.
IS_SYSTEM_0
.
getCode
()){
developmentInfo
.
setSubmitTime
(
new
Date
());
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
());
}
}
}
//新增
// if(developmentInfoSaveVO.getDevelopmentInfo().getIsSystem() == DevelopmentStatusEnum.IS_SYSTEM_0.getCode()){
// if(ObjectUtils.isNotEmpty(developmentInfoSaveVO.getDevelopmentInfo().getId())){
// DevelopmentInfo developmentInfoSource = developmentInfoMapper.selectById(developmentInfoSaveVO.getDevelopmentInfo().getId());
// developmentInfo.setMirrorId( developmentInfoSource.getMirrorId());
// }
// }
//校验是否已认证
//校验是否已认证
isAlreadyAuthentication
(
developmentInfo
);
isAlreadyAuthentication
(
developmentInfo
);
...
@@ -325,6 +326,39 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
...
@@ -325,6 +326,39 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
Integer
id
=
developmentInfo
.
getId
();
Integer
id
=
developmentInfo
.
getId
();
// String name = developmentInfo.getName();
// String name = developmentInfo.getName();
//招商方向
QueryWrapper
<
DevelopmentInvestmentDirectionInfo
>
didiQW
=
new
QueryWrapper
<>();
didiQW
.
eq
(
"development_id"
,
id
);
developmentInvestmentDirectionInfoService
.
remove
(
didiQW
);
//重点企业
QueryWrapper
<
DevelopmentPrimaryEnterpriseInfo
>
dpeiQW
=
new
QueryWrapper
<>();
dpeiQW
.
eq
(
"development_id"
,
id
);
developmentPrimaryEnterpriseInfoService
.
remove
(
dpeiQW
);
//产业基金
QueryWrapper
<
DevelopmentIndustryFundInfo
>
difiQW
=
new
QueryWrapper
<>();
difiQW
.
eq
(
"development_id"
,
id
);
developmentIndustryFundInfoService
.
remove
(
difiQW
);
//产业政策
QueryWrapper
<
DevelopmentIndustryPolicyInfo
>
dipiQW
=
new
QueryWrapper
<>();
dipiQW
.
eq
(
"development_id"
,
id
);
developmentIndustryPolicyInfoService
.
remove
(
dipiQW
);
//土地详情
QueryWrapper
<
DevelopmentIndustrialLandInfo
>
diliQW
=
new
QueryWrapper
<>();
diliQW
.
eq
(
"development_id"
,
id
);
developmentIndustrialLandInfoService
.
remove
(
diliQW
);
//开发区图片
QueryWrapper
<
SysCarouselInfo
>
sciQW
=
new
QueryWrapper
<>();
sciQW
.
eq
(
"association_id"
,
id
);
sciQW
.
eq
(
"type"
,
CarouselTypeEnum
.
KAIFAQU
.
getType
());
sysCarouselInfoService
.
remove
(
sciQW
);
//政策文件上传
QueryWrapper
<
FileSource
>
fsQW
=
new
QueryWrapper
<>();
fsQW
.
eq
(
"object_id"
,
id
);
fsQW
.
eq
(
"object_type"
,
FileSourceObjectTypeEnum
.
DEVELOPMENT
.
getCode
());
fileSourceService
.
remove
(
fsQW
);
//招商方向
//招商方向
developmentInfoSaveVO
.
getInvestmentDirectionInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentInfoSaveVO
.
getInvestmentDirectionInfos
().
stream
().
forEach
(
e
->
e
.
setDevelopmentId
(
id
));
developmentInvestmentDirectionInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getInvestmentDirectionInfos
());
developmentInvestmentDirectionInfoService
.
saveBatch
(
developmentInfoSaveVO
.
getInvestmentDirectionInfos
());
...
...
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