Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
41c0df1b
Commit
41c0df1b
authored
Dec 24, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报警时一般火灾失火时间赋值修正
parent
83421d42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
AlertFormController.java
...s/boot/module/jcs/biz/controller/AlertFormController.java
+17
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertFormController.java
View file @
41c0df1b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
com.alibaba.fastjson.JSONArray
;
import
org.apache.commons.lang3.StringUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -109,7 +113,7 @@ public class AlertFormController extends BaseController {
/**
* 根据表态类型code查询表单数据项
* @param
id
* @param
* @return
*/
...
...
@@ -120,7 +124,18 @@ public class AlertFormController extends BaseController {
List
<
AlertFormInitDto
>
list
=
new
ArrayList
<
AlertFormInitDto
>();
if
(
redisUtils
.
hasKey
(
RedisKey
.
FORM_CODE
+
code
)){
Object
obj
=
redisUtils
.
get
(
RedisKey
.
FORM_CODE
+
code
);
return
ResponseHelper
.
buildResponse
(
obj
);
JSONArray
arr
=
(
JSONArray
)
obj
;
List
<
AlertFormInitDto
>
list1
=
arr
.
toJavaList
(
AlertFormInitDto
.
class
);
for
(
AlertFormInitDto
alertFormInitDto:
list1
)
{
if
(
alertFormInitDto
.
getKey
().
equals
(
"fireTime"
))
{
Date
date
=
new
Date
();
alertFormInitDto
.
setDefaultValue
(
date
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
dateString
=
formatter
.
format
(
date
);
alertFormInitDto
.
getFormItemDescr
().
setFieldValue
(
dateString
);
}
}
return
ResponseHelper
.
buildResponse
(
JSON
.
toJSON
(
list1
));
}
else
{
list
=
iAlertFormService
.
getFormlist
(
code
);
redisUtils
.
set
(
RedisKey
.
FORM_CODE
+
code
,
JSON
.
toJSON
(
list
),
time
);
...
...
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