Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agent-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
agent-platform
Commits
33c3a503
Commit
33c3a503
authored
Apr 28, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加申报相关信息
parent
8f8a512d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
agent-manager/src/main/java/com/mortals/xhx/module/declare/service/impl/DeclareServiceImpl.java
...s/xhx/module/declare/service/impl/DeclareServiceImpl.java
+32
-0
No files found.
agent-manager/src/main/java/com/mortals/xhx/module/declare/service/impl/DeclareServiceImpl.java
View file @
33c3a503
...
...
@@ -5,8 +5,14 @@ import cn.hutool.core.date.DateUtil;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.common.code.DeclareStatusEnum
;
import
com.mortals.xhx.module.category.model.CategoryEntity
;
import
com.mortals.xhx.module.category.service.CategoryService
;
import
com.mortals.xhx.module.company.model.CompanyEntity
;
import
com.mortals.xhx.module.company.service.CompanyService
;
import
com.mortals.xhx.module.declare.model.*
;
import
com.mortals.xhx.module.declare.service.DeclareFinImagesService
;
import
com.mortals.xhx.module.park.model.ParkEntity
;
import
com.mortals.xhx.module.park.service.ParkService
;
import
org.springframework.beans.BeanUtils
;
import
java.util.Map
;
...
...
@@ -44,6 +50,12 @@ public class DeclareServiceImpl extends AbstractCRUDServiceImpl<DeclareDao, Decl
@Autowired
private
DeclareFinImagesService
declareFinImagesService
;
@Autowired
private
CategoryService
categoryService
;
@Autowired
private
ParkService
parkService
;
@Autowired
private
CompanyService
companyService
;
@Override
...
...
@@ -74,6 +86,26 @@ public class DeclareServiceImpl extends AbstractCRUDServiceImpl<DeclareDao, Decl
}
@Override
protected
void
saveBefore
(
DeclareEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCategoryId
())){
CategoryEntity
categoryEntity
=
categoryService
.
get
(
entity
.
getCategoryId
());
entity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getCategoryName
());
entity
.
setCategoryCode
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getCategoryCode
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getParkId
())){
ParkEntity
parkEntity
=
parkService
.
get
(
entity
.
getParkId
());
entity
.
setParkName
(
parkEntity
==
null
?
""
:
parkEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyId
())){
CompanyEntity
companyEntity
=
companyService
.
get
(
entity
.
getCompanyId
());
entity
.
setCompanyName
(
companyEntity
==
null
?
""
:
companyEntity
.
getName
());
}
super
.
saveBefore
(
entity
,
context
);
}
@Override
protected
void
saveAfter
(
DeclareEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getDeclareImagesList
()))
{
...
...
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