Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-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
赵啸非
sample-form-platform
Commits
3e39bf39
Commit
3e39bf39
authored
Apr 17, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料分类字段
parent
6ae3e085
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
7 deletions
+35
-7
sample-form-manager/src/main/java/com/mortals/xhx/module/datum/service/impl/DatumCategoryServiceImpl.java
...x/module/datum/service/impl/DatumCategoryServiceImpl.java
+35
-7
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/module/datum/service/impl/DatumCategoryServiceImpl.java
View file @
3e39bf39
package
com.mortals.xhx.module.datum.service.impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.mortals.xhx.module.matter.model.MatterCategoryEntity
;
import
com.mortals.xhx.module.matter.service.MatterCategoryService
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -7,15 +14,36 @@ import com.mortals.xhx.module.datum.dao.DatumCategoryDao;
import
com.mortals.xhx.module.datum.model.DatumCategoryEntity
;
import
com.mortals.xhx.module.datum.service.DatumCategoryService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.ObjectUtils
;
/**
* DatumCategoryService
* 材料分类 service实现
*
* @author zxfei
* @date 2023-06-21
*/
* DatumCategoryService
* 材料分类 service实现
*
* @author zxfei
* @date 2023-06-21
*/
@Service
(
"datumCategoryService"
)
@Slf4j
public
class
DatumCategoryServiceImpl
extends
AbstractCRUDServiceImpl
<
DatumCategoryDao
,
DatumCategoryEntity
,
Long
>
implements
DatumCategoryService
{
@Autowired
private
MatterCategoryService
matterCategoryService
;
@Override
protected
void
validData
(
DatumCategoryEntity
entity
,
Context
context
)
throws
AppException
{
updateCategoryName
(
entity
);
log
.
info
(
"validData:{}"
,
JSONObject
.
toJSONString
(
entity
));
}
private
void
updateCategoryName
(
DatumCategoryEntity
entity
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCategoryId
()))
{
MatterCategoryEntity
matterCategoryEntity
=
matterCategoryService
.
get
(
entity
.
getCategoryId
());
if
(!
ObjectUtils
.
isEmpty
(
matterCategoryEntity
))
{
entity
.
setCategoryName
(
matterCategoryEntity
.
getCategoryName
());
}
}
}
}
\ No newline at end of file
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