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
ee4aeda8
Commit
ee4aeda8
authored
Dec 09, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料数量统计
parent
2e334160
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
10 deletions
+37
-10
sample-form-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
...er/src/main/java/com/mortals/xhx/common/key/Constant.java
+2
-0
sample-form-manager/src/main/java/com/mortals/xhx/module/home/web/HomeController.java
.../java/com/mortals/xhx/module/home/web/HomeController.java
+35
-10
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/common/key/Constant.java
View file @
ee4aeda8
...
@@ -30,4 +30,6 @@ public final class Constant {
...
@@ -30,4 +30,6 @@ public final class Constant {
public
final
static
String
PARAMS_BLANK_COUNT
=
"blank_count"
;
public
final
static
String
PARAMS_BLANK_COUNT
=
"blank_count"
;
public
final
static
String
PARAMS_HOTWORDS_DEFAULT_NUM
=
"hotwords_default_num"
;
}
}
sample-form-manager/src/main/java/com/mortals/xhx/module/home/web/HomeController.java
View file @
ee4aeda8
...
@@ -7,6 +7,8 @@ import com.mortals.framework.annotation.UnAuth;
...
@@ -7,6 +7,8 @@ import com.mortals.framework.annotation.UnAuth;
import
com.mortals.framework.ap.GlobalSysInfo
;
import
com.mortals.framework.ap.GlobalSysInfo
;
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.model.OrderCol
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
...
@@ -19,6 +21,9 @@ import com.mortals.xhx.feign.base.pdu.DeptPdu;
...
@@ -19,6 +21,9 @@ import com.mortals.xhx.feign.base.pdu.DeptPdu;
import
com.mortals.xhx.feign.base.pdu.SitePdu
;
import
com.mortals.xhx.feign.base.pdu.SitePdu
;
import
com.mortals.xhx.feign.rsp.ApiResp
;
import
com.mortals.xhx.feign.rsp.ApiResp
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.feign.site.ISiteFeign
;
import
com.mortals.xhx.module.baseset.model.BasesetEntity
;
import
com.mortals.xhx.module.baseset.model.BasesetQuery
;
import
com.mortals.xhx.module.baseset.service.BasesetService
;
import
com.mortals.xhx.module.home.pdu.HomeQueryPdu
;
import
com.mortals.xhx.module.home.pdu.HomeQueryPdu
;
import
com.mortals.xhx.module.hotword.model.HotwordEntity
;
import
com.mortals.xhx.module.hotword.model.HotwordEntity
;
import
com.mortals.xhx.module.hotword.model.HotwordQuery
;
import
com.mortals.xhx.module.hotword.model.HotwordQuery
;
...
@@ -54,6 +59,8 @@ public class HomeController extends BaseJsonBodyController {
...
@@ -54,6 +59,8 @@ public class HomeController extends BaseJsonBodyController {
private
ParamService
paramService
;
private
ParamService
paramService
;
@Autowired
@Autowired
private
ISiteFeign
siteFeign
;
private
ISiteFeign
siteFeign
;
@Autowired
private
BasesetService
basesetService
;
@PostMapping
({
"site/list"
})
@PostMapping
({
"site/list"
})
public
Rest
<
Object
>
list
()
{
public
Rest
<
Object
>
list
()
{
...
@@ -148,21 +155,34 @@ public class HomeController extends BaseJsonBodyController {
...
@@ -148,21 +155,34 @@ public class HomeController extends BaseJsonBodyController {
}
}
@PostMapping
({
"info"
})
@PostMapping
({
"info"
})
@UnAuth
@UnAuth
public
Rest
<
Object
>
homePageInfo
(
@RequestBody
HomeQueryPdu
homeQueryPdu
)
{
public
Rest
<
Object
>
homePageInfo
(
@RequestBody
HomeQueryPdu
homeQueryPdu
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"获取首页数据"
;
String
busiDesc
=
"获取首页数据"
;
int
code
=
VALUE_RESULT_SUCCESS
;
int
code
=
VALUE_RESULT_SUCCESS
;
try
{
try
{
List
<
String
>
hotwordEntities
=
hotwordService
.
find
(
new
HotwordQuery
().
siteId
(
homeQueryPdu
.
getSiteId
())).
stream
()
HotwordQuery
hotwordQuery
=
new
HotwordQuery
();
hotwordQuery
.
siteId
(
homeQueryPdu
.
getSiteId
());
List
<
OrderCol
>
orderColList
=
new
ArrayList
<>();
orderColList
.
add
(
new
OrderCol
(
"searchCount"
,
OrderCol
.
DESCENDING
));
orderColList
.
add
(
new
OrderCol
(
"wordsSource"
,
OrderCol
.
ASCENDING
));
hotwordQuery
.
setOrderColList
(
orderColList
);
PageInfo
pageInfo
=
new
PageInfo
();
int
nums
=
GlobalSysInfo
.
getParamIntValue
(
Constant
.
PARAMS_HOTWORDS_DEFAULT_NUM
,
10
);
pageInfo
.
setPrePageResult
(
nums
);
List
<
HotwordEntity
>
hotwordEntities
=
hotwordService
.
find
(
hotwordQuery
,
pageInfo
,
null
).
getList
();
/* List<String> hotwordEntities = hotwordService.find(hotwordQuery, new PageInfo(), null).getList().stream()
.map(HotwordEntity::getHotwords)
.map(HotwordEntity::getHotwords)
.
flatMap
(
item
->
StrUtil
.
split
(
item
,
","
.
charAt
(
0
)).
stream
())
.flatMap(item
-> StrUtil.split(item,
",".charAt(0)).stream())
.
collect
(
Collectors
.
toList
());
.collect(Collectors.toList());
*/
model
.
put
(
"hotWords"
,
hotwordEntities
);
model
.
put
(
"hotWords"
,
hotwordEntities
);
MatterQuery
matterQuery
=
new
MatterQuery
();
MatterQuery
matterQuery
=
new
MatterQuery
();
matterQuery
.
setSiteId
(
homeQueryPdu
.
getSiteId
());
matterQuery
.
setSiteId
(
homeQueryPdu
.
getSiteId
());
int
matterCont
=
matterService
.
count
(
matterQuery
,
this
.
getContext
());
int
matterCont
=
matterService
.
count
(
matterQuery
,
this
.
getContext
());
...
@@ -179,15 +199,20 @@ public class HomeController extends BaseJsonBodyController {
...
@@ -179,15 +199,20 @@ public class HomeController extends BaseJsonBodyController {
model
.
put
(
"datumCont"
,
datumCont
);
//入驻表单数量
model
.
put
(
"datumCont"
,
datumCont
);
//入驻表单数量
model
.
put
(
"localPrint"
,
20
);
//本地打印数量
model
.
put
(
"localPrint"
,
20
);
//本地打印数量
model
.
put
(
"onlineSubmit"
,
2
0
);
//在线提交数量
model
.
put
(
"onlineSubmit"
,
0
);
//在线提交数量
model
.
put
(
"dayThrift"
,
66
);
//今日节约
model
.
put
(
"dayThrift"
,
66
);
//今日节约
model
.
put
(
"totalThrift"
,
996
);
//累计节约
model
.
put
(
"totalThrift"
,
996
);
//累计节约
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
Rest
<
com
.
mortals
.
xhx
.
common
.
pdu
.
site
.
SitePdu
>
info
=
siteFeign
.
info
(
homeQueryPdu
.
getSiteId
());
Rest
<
com
.
mortals
.
xhx
.
common
.
pdu
.
site
.
SitePdu
>
info
=
siteFeign
.
info
(
homeQueryPdu
.
getSiteId
());
model
.
put
(
"title"
,
info
==
null
?
""
:
info
.
getData
().
getSiteName
());
//标题
model
.
put
(
"title"
,
info
==
null
?
""
:
info
.
getData
().
getSiteName
());
//标题
HotwordEntity
hotwordEntity
=
hotwordService
.
selectOne
(
new
HotwordQuery
().
siteId
(
homeQueryPdu
.
getSiteId
()));
model
.
put
(
"blankCount"
,
hotwordEntity
==
null
?
20
:
hotwordEntity
.
getPrintDisplay
());
//空白样表数量
//HotwordEntity hotwordEntity = hotwordService.selectOne(hotwordQuery.siteId(homeQueryPdu.getSiteId()));
BasesetEntity
basesetEntity
=
basesetService
.
selectOne
(
new
BasesetQuery
().
siteId
(
homeQueryPdu
.
getSiteId
()));
model
.
put
(
"blankCount"
,
basesetEntity
==
null
?
20
:
basesetEntity
.
getPrintDisplay
());
//空白样表数量
model
.
put
(
"newsSource"
,
basesetEntity
==
null
?
1
:
basesetEntity
.
getNewsSource
());
//新闻来源
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
// this.addDict(model, "newsSource", NewsSourceEnum.getEnumMap());
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
}
catch
(
Exception
var9
)
{
code
=
VALUE_RESULT_FAILURE
;
code
=
VALUE_RESULT_FAILURE
;
...
...
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