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
c071f6bc
Commit
c071f6bc
authored
Feb 17, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料数量统计
parent
ea9c380d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
sample-form-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
+10
-2
sample-form-manager/src/main/java/com/mortals/xhx/module/sheet/service/SheetMatterService.java
.../mortals/xhx/module/sheet/service/SheetMatterService.java
+3
-0
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
View file @
c071f6bc
package
com.mortals.xhx.daemon.task
;
package
com.mortals.xhx.daemon.task
;
import
cn.hutool.core.collection.ListUtil
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.service.ITask
;
import
com.mortals.framework.service.ITask
;
...
@@ -17,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -17,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -44,7 +46,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
...
@@ -44,7 +46,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
siteRest
.
getData
().
forEach
(
site
->
{
siteRest
.
getData
().
forEach
(
site
->
{
SiteMatterPdu
siteMatterPdu
=
new
SiteMatterPdu
();
SiteMatterPdu
siteMatterPdu
=
new
SiteMatterPdu
();
siteMatterPdu
.
setPage
(
1
);
siteMatterPdu
.
setPage
(
1
);
siteMatterPdu
.
setSize
(-
1
);
//
siteMatterPdu.setSize(-1);
Rest
<
RespData
<
List
<
SiteMatterPdu
>>>
siteMatterRest
=
siteMatterFeign
.
list
(
siteMatterPdu
);
Rest
<
RespData
<
List
<
SiteMatterPdu
>>>
siteMatterRest
=
siteMatterFeign
.
list
(
siteMatterPdu
);
if
(
siteMatterRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
if
(
siteMatterRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//删除后新增
//删除后新增
...
@@ -61,7 +63,13 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
...
@@ -61,7 +63,13 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
sheetMatterEntities
))
{
if
(!
ObjectUtils
.
isEmpty
(
sheetMatterEntities
))
{
sheetMatterService
.
save
(
sheetMatterEntities
);
sheetMatterService
.
getDao
().
delete
(
new
HashMap
());
List
<
List
<
SheetMatterEntity
>>
partition
=
ListUtil
.
partition
(
sheetMatterEntities
,
500
);
for
(
List
<
SheetMatterEntity
>
matterEntities
:
partition
)
{
sheetMatterService
.
save
(
matterEntities
);
}
}
}
}
}
});
});
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/sheet/service/SheetMatterService.java
View file @
c071f6bc
...
@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context;
...
@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.sheet.dao.SheetMatterDao
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
import
com.mortals.xhx.module.sheet.model.SheetMatterEntity
;
/**
/**
...
@@ -16,5 +17,7 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
...
@@ -16,5 +17,7 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
*/
*/
public
interface
SheetMatterService
extends
ICRUDService
<
SheetMatterEntity
,
Long
>
{
public
interface
SheetMatterService
extends
ICRUDService
<
SheetMatterEntity
,
Long
>
{
SheetMatterDao
getDao
();
Result
<
SheetMatterEntity
>
findSubList
(
SheetMatterEntity
matterQuery
,
PageInfo
pageInfo
,
Context
context
);
Result
<
SheetMatterEntity
>
findSubList
(
SheetMatterEntity
matterQuery
,
PageInfo
pageInfo
,
Context
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