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
26cbc8e9
Commit
26cbc8e9
authored
Jun 14, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料排序
parent
c068b232
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
sample-form-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+9
-0
sample-form-manager/src/main/java/com/mortals/xhx/module/home/web/HomeController.java
.../java/com/mortals/xhx/module/home/web/HomeController.java
+9
-3
sample-form-manager/src/main/java/com/mortals/xhx/module/sample/web/SampleBillController.java
...m/mortals/xhx/module/sample/web/SampleBillController.java
+8
-2
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
26cbc8e9
...
...
@@ -10,4 +10,13 @@ public class RedisKey {
*/
public
static
final
String
KEY_MENU_CACHE
=
"iot:base:MenuCacheKey:"
;
public
static
final
String
KEY_DAY_VIEW
=
"dayView:"
;
public
static
final
String
KEY_DAY_VIEW_TOTAL
=
"dayViewTotal:"
;
}
sample-form-manager/src/main/java/com/mortals/xhx/module/home/web/HomeController.java
View file @
26cbc8e9
...
...
@@ -8,6 +8,7 @@ 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.service.ICacheService
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.StringUtils
;
...
...
@@ -15,6 +16,7 @@ import com.mortals.framework.web.BaseJsonBodyController;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.key.Constant
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.pdu.RespData
;
import
com.mortals.xhx.common.pdu.dept.DeptPdu
;
import
com.mortals.xhx.feign.base.IApiBaseManagerFeign
;
...
...
@@ -69,6 +71,8 @@ public class HomeController extends BaseJsonBodyController {
private
BasesetService
basesetService
;
@Autowired
private
IDeptFeign
deptFeign
;
@Autowired
private
ICacheService
cacheService
;
@PostMapping
({
"site/list"
})
public
Rest
<
Object
>
list
()
{
...
...
@@ -243,10 +247,12 @@ public class HomeController extends BaseJsonBodyController {
model
.
put
(
"datumList"
,
datumList
);
//热门表单
model
.
put
(
"datumCont"
,
datumCont
);
//入驻表单数量
model
.
put
(
"localPrint"
,
20
);
//本地打印数量
model
.
put
(
"localPrint"
,
cacheService
.
getLong
(
RedisKey
.
KEY_DAY_VIEW
)==
null
?
0
:
cacheService
.
getLong
(
RedisKey
.
KEY_DAY_VIEW
)
);
//本地打印数量
model
.
put
(
"onlineSubmit"
,
0
);
//在线提交数量
model
.
put
(
"dayThrift"
,
66
);
//今日节约
model
.
put
(
"totalThrift"
,
996
);
//累计节约
//Long todayThrift = cacheService.incrForToday(RedisKey.KEY_DAYTHRIFT);
model
.
put
(
"dayThrift"
,
cacheService
.
getLong
(
RedisKey
.
KEY_DAY_VIEW
)==
null
?
0
:
cacheService
.
getLong
(
RedisKey
.
KEY_DAY_VIEW
)*
2
);
//今日节约
model
.
put
(
"totalThrift"
,
cacheService
.
getLong
(
RedisKey
.
KEY_DAY_VIEW_TOTAL
)==
null
?
0
:
cacheService
.
getLong
(
RedisKey
.
KEY_DAY_VIEW_TOTAL
)*
2
);
//累计节约
Rest
<
com
.
mortals
.
xhx
.
common
.
pdu
.
site
.
SitePdu
>
info
=
siteFeign
.
info
(
homeQueryPdu
.
getSiteId
());
model
.
put
(
"title"
,
info
==
null
?
""
:
info
.
getData
().
getSiteName
());
//标题
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/sample/web/SampleBillController.java
View file @
26cbc8e9
...
...
@@ -3,8 +3,10 @@ package com.mortals.xhx.module.sample.web;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.module.device.model.DeviceEntity
;
import
com.mortals.xhx.module.device.model.DeviceQuery
;
import
com.mortals.xhx.module.device.service.DeviceService
;
...
...
@@ -48,6 +50,8 @@ public class SampleBillController extends BaseCRUDJsonBodyMappingController<Samp
@Autowired
public
DeviceService
deviceService
;
@Autowired
private
ICacheService
cacheService
;
public
SampleBillController
()
{
super
.
setModuleDesc
(
"样报服务"
);
...
...
@@ -74,9 +78,11 @@ public class SampleBillController extends BaseCRUDJsonBodyMappingController<Samp
DeviceEntity
deviceEntity
=
deviceService
.
selectOne
(
new
DeviceQuery
().
deviceCode
(
entity
.
getDeviceCode
()));
entity
.
setDeviceName
(
deviceEntity
.
getDeviceName
());
}
entity
.
setMatterFullName
(
entity
.
getMatterName
());
entity
.
setMatterFullName
(
entity
.
getMaterialName
());
entity
.
setMaterialFullName
(
entity
.
getMaterialFullName
());
entity
.
setMaterialFullName
(
entity
.
getMaterialName
());
cacheService
.
incrForToday
(
RedisKey
.
KEY_DAY_VIEW
);
cacheService
.
incr
(
RedisKey
.
KEY_DAY_VIEW_TOTAL
);
return
super
.
save
(
entity
);
}
}
\ 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