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
f495d72e
Commit
f495d72e
authored
Apr 18, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加远程调试
parent
8e15b420
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/model/vo/MatterDatumVo.java
...com/mortals/xhx/module/matter/model/vo/MatterDatumVo.java
+3
-0
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterDatumController.java
.../mortals/xhx/module/matter/web/MatterDatumController.java
+21
-3
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/model/vo/MatterDatumVo.java
View file @
f495d72e
...
...
@@ -37,5 +37,8 @@ public class MatterDatumVo extends BaseEntityLong {
*/
private
String
categoryName
;
/** 主键,自增长列表 */
private
List
<
Long
>
idList
;
}
\ No newline at end of file
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterDatumController.java
View file @
f495d72e
...
...
@@ -3,14 +3,19 @@ package com.mortals.xhx.module.matter.web;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.module.datum.model.DatumCategoryEntity
;
import
com.mortals.xhx.module.datum.service.DatumCategoryService
;
import
com.mortals.xhx.module.datum.web.DatumCategoryController
;
import
com.mortals.xhx.module.matter.model.MatterEntity
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.sample.model.SampleBillEntity
;
import
com.mortals.xhx.module.sample.service.SampleBillService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -51,6 +56,10 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
private
SampleBillService
sampleBillService
;
@Autowired
private
MatterService
matterService
;
@Autowired
private
DatumCategoryController
datumCategoryController
;
@Autowired
private
DatumCategoryService
datumCategoryService
;
public
MatterDatumController
()
{
super
.
setModuleDesc
(
"事项申请材料"
);
...
...
@@ -65,6 +74,16 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
@Override
protected
void
doListBefore
(
MatterDatumEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
query
.
getCategoryId
()))
{
//调用 查询
DatumCategoryEntity
datumCategory
=
new
DatumCategoryEntity
();
datumCategory
.
setCategoryId
(
query
.
getCategoryId
());
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
List
<
Long
>
materialIdList
=
datumCategoryService
.
find
(
datumCategory
,
pageInfo
,
context
).
getList
().
stream
().
map
(
i
->
i
.
getMaterialId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
materialIdList
))
{
query
.
setIdList
(
materialIdList
);
}
}
List
<
OrderCol
>
orderColList
=
new
ArrayList
<>();
orderColList
.
add
(
new
OrderCol
(
"isRecommend"
,
OrderCol
.
DESCENDING
));
orderColList
.
add
(
new
OrderCol
(
"sort"
,
OrderCol
.
DESCENDING
));
...
...
@@ -102,7 +121,6 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
}
@RequestMapping
(
value
=
{
"recommend"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
String
recommend
(
Long
id
,
Long
siteId
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
...
...
@@ -132,7 +150,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
sampleBillEntity
.
setSiteId
(
entity
.
getSiteId
());
sampleBillEntity
.
setMaterialName
(
entity
.
getMaterialName
());
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getMatterId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getMatterId
()))
{
MatterEntity
matterEntity
=
matterService
.
get
(
entity
.
getMatterId
());
sampleBillEntity
.
setMatterName
(
matterEntity
.
getMatterName
());
sampleBillEntity
.
setMatterFullName
(
matterEntity
.
getMatterFullName
());
...
...
@@ -140,7 +158,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
sampleBillEntity
.
setMatterFullName
(
entity
.
getMatterName
());
sampleBillEntity
.
setOperTime
(
new
Date
());
sampleBillService
.
save
(
sampleBillEntity
,
context
);
sampleBillService
.
save
(
sampleBillEntity
,
context
);
return
super
.
infoAfter
(
id
,
model
,
entity
,
context
);
}
}
\ 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