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
8a4adc9a
Commit
8a4adc9a
authored
Apr 29, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加更新默认用户角色
parent
da5af0eb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
12 deletions
+36
-12
agent-manager/src/main/java/com/mortals/xhx/module/declare/service/impl/DeclareServiceImpl.java
...s/xhx/module/declare/service/impl/DeclareServiceImpl.java
+24
-11
agent-manager/src/main/java/com/mortals/xhx/module/declare/web/DeclareController.java
...com/mortals/xhx/module/declare/web/DeclareController.java
+12
-1
No files found.
agent-manager/src/main/java/com/mortals/xhx/module/declare/service/impl/DeclareServiceImpl.java
View file @
8a4adc9a
...
...
@@ -11,6 +11,9 @@ 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.evaluation.model.EvaluationInfoEntity
;
import
com.mortals.xhx.module.evaluation.model.EvaluationInfoQuery
;
import
com.mortals.xhx.module.evaluation.service.EvaluationInfoService
;
import
com.mortals.xhx.module.park.model.ParkEntity
;
import
com.mortals.xhx.module.park.service.ParkService
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -47,9 +50,11 @@ import lombok.extern.slf4j.Slf4j;
public
class
DeclareServiceImpl
extends
AbstractCRUDServiceImpl
<
DeclareDao
,
DeclareEntity
,
Long
>
implements
DeclareService
{
@Autowired
private
DeclareImagesService
declareImagesService
;
@Autowired
private
DeclareFinImagesService
declareFinImagesService
;
@Autowired
private
EvaluationInfoService
evaluationInfoService
;
@Autowired
private
CategoryService
categoryService
;
@Autowired
...
...
@@ -83,23 +88,30 @@ public class DeclareServiceImpl extends AbstractCRUDServiceImpl<DeclareDao, Decl
.
find
(
new
DeclareFinImagesQuery
().
declareIdList
(
idList
)).
parallelStream
()
.
collect
(
Collectors
.
groupingBy
(
DeclareFinImagesEntity:
:
getDeclareId
));
list
.
forEach
(
item
->
item
.
setDeclareFinImagesList
(
declareFinImagesListMap
.
get
(
item
.
getId
())));
Map
<
Long
,
List
<
EvaluationInfoEntity
>>
evaluationListMap
=
evaluationInfoService
.
find
(
new
EvaluationInfoQuery
().
declareIdList
(
idList
)).
parallelStream
()
.
collect
(
Collectors
.
groupingBy
(
EvaluationInfoEntity:
:
getDeclareId
));
list
.
forEach
(
item
->
item
.
setEvaluationInfoList
(
evaluationListMap
.
get
(
item
.
getId
())));
}
@Override
protected
void
saveBefore
(
DeclareEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCategoryId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCategoryId
()))
{
CategoryEntity
categoryEntity
=
categoryService
.
get
(
entity
.
getCategoryId
());
entity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getCategoryName
());
entity
.
setCategoryCode
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getCategoryCode
());
entity
.
setCategoryName
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getCategoryName
());
entity
.
setCategoryCode
(
categoryEntity
==
null
?
""
:
categoryEntity
.
getCategoryCode
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getParkId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getParkId
()))
{
ParkEntity
parkEntity
=
parkService
.
get
(
entity
.
getParkId
());
entity
.
setParkName
(
parkEntity
==
null
?
""
:
parkEntity
.
getName
());
entity
.
setParkName
(
parkEntity
==
null
?
""
:
parkEntity
.
getName
());
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCompanyId
()))
{
CompanyEntity
companyEntity
=
companyService
.
get
(
entity
.
getCompanyId
());
entity
.
setCompanyName
(
companyEntity
==
null
?
""
:
companyEntity
.
getName
());
entity
.
setCompanyName
(
companyEntity
==
null
?
""
:
companyEntity
.
getName
());
}
...
...
@@ -172,10 +184,11 @@ public class DeclareServiceImpl extends AbstractCRUDServiceImpl<DeclareDao, Decl
public
Rest
<
String
>
declareCancel
(
DeclareQuery
query
,
Context
context
)
{
//校验取消申报时间
DeclareEntity
declareEntity
=
this
.
get
(
query
.
getId
(),
context
);
if
(
ObjectUtils
.
isEmpty
(
declareEntity
))
throw
new
AppException
(
"申报信息不存在!id:"
+
query
.
getId
());
if
(
ObjectUtils
.
isEmpty
(
declareEntity
))
throw
new
AppException
(
"申报信息不存在!id:"
+
query
.
getId
());
long
between
=
DateUtil
.
between
(
declareEntity
.
getCreateTime
(),
new
Date
(),
DateUnit
.
MINUTE
);
if
(
between
>
30
)
throw
new
AppException
(
"超过30分钟无法取消申报!"
);
if
(
declareEntity
.
getDeclareStatus
()
!=
DeclareStatusEnum
.
草稿
.
getValue
())
throw
new
AppException
(
"当前申报不是草稿状态,不能撤销!"
);
if
(
between
>
30
)
throw
new
AppException
(
"超过30分钟无法取消申报!"
);
if
(
declareEntity
.
getDeclareStatus
()
!=
DeclareStatusEnum
.
草稿
.
getValue
())
throw
new
AppException
(
"当前申报不是草稿状态,不能撤销!"
);
declareEntity
.
setDeclareStatus
(
DeclareStatusEnum
.
撤销
.
getValue
());
declareEntity
.
setUpdateTime
(
new
Date
());
...
...
agent-manager/src/main/java/com/mortals/xhx/module/declare/web/DeclareController.java
View file @
8a4adc9a
...
...
@@ -12,6 +12,9 @@ import com.mortals.xhx.module.declare.model.*;
import
com.mortals.xhx.module.declare.service.DeclareFinImagesService
;
import
com.mortals.xhx.module.declare.service.DeclareImagesService
;
import
com.mortals.xhx.module.declare.service.DeclareService
;
import
com.mortals.xhx.module.evaluation.model.EvaluationInfoEntity
;
import
com.mortals.xhx.module.evaluation.model.EvaluationInfoQuery
;
import
com.mortals.xhx.module.evaluation.service.EvaluationInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -37,6 +40,9 @@ public class DeclareController extends BaseCRUDJsonBodyMappingController<Declare
@Autowired
private
DeclareFinImagesService
declareFinImagesService
;
@Autowired
private
EvaluationInfoService
evaluationInfoService
;
public
DeclareController
()
{
super
.
setModuleDesc
(
"企业代办申报"
);
}
...
...
@@ -54,6 +60,11 @@ public class DeclareController extends BaseCRUDJsonBodyMappingController<Declare
entity
.
setDeclareImagesList
(
declareImagesEntities
);
List
<
DeclareFinImagesEntity
>
declareFinImagesEntities
=
declareFinImagesService
.
find
(
new
DeclareFinImagesQuery
().
declareId
(
id
));
entity
.
setDeclareFinImagesList
(
declareFinImagesEntities
);
List
<
EvaluationInfoEntity
>
evaluationInfoEntities
=
evaluationInfoService
.
find
(
new
EvaluationInfoQuery
().
declareId
(
id
));
entity
.
setEvaluationInfoList
(
evaluationInfoEntities
);
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
}
...
...
@@ -68,7 +79,7 @@ public class DeclareController extends BaseCRUDJsonBodyMappingController<Declare
String
busiDesc
=
"申报撤销"
+
this
.
getModuleDesc
();
try
{
Rest
<
String
>
rest
=
this
.
service
.
declareCancel
(
query
,
getContext
());
if
(
YesNoEnum
.
NO
.
getValue
()==
rest
.
getCode
())
{
if
(
YesNoEnum
.
NO
.
getValue
()
==
rest
.
getCode
())
{
throw
new
AppException
(
rest
.
getMsg
());
}
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
...
...
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