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
aaa926fe
Commit
aaa926fe
authored
Jun 21, 2021
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)增加boolean类型
parent
204cd27f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+14
-8
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/AlertCalledController.java
View file @
aaa926fe
...
...
@@ -19,12 +19,15 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -123,9 +126,9 @@ public class AlertCalledController extends BaseController {
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
FormValue
>
formValue
=
new
ArrayList
();
for
(
AlertFormValue
alertFormValue:
list
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
"text"
,
alertFormValue
.
getFieldValue
());
List
<
FormValue
>
formValue
=
new
ArrayList
();
for
(
AlertFormValue
alertFormValue
:
list
)
{
FormValue
value
=
new
FormValue
(
alertFormValue
.
getFieldCode
(),
alertFormValue
.
getFieldName
(),
"text"
,
alertFormValue
.
getFieldValue
());
formValue
.
add
(
value
);
}
AlertCalledFormVo
alertCalledFormVo
=
new
AlertCalledFormVo
(
alertCalled
,
formValue
);
...
...
@@ -150,11 +153,9 @@ public class AlertCalledController extends BaseController {
if
(
alertCalled
.
getCallTimeStart
()
!=
null
&&
alertCalled
.
getCallTimeEnd
()
!=
null
)
{
alertCalledQueryWrapper
.
between
(
"call_time"
,
alertCalled
.
getCallTimeStart
(),
alertCalled
.
getCallTimeEnd
());
}
if
(
alertCalled
.
getIsFatherAlert
(
))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getIsFatherAlert
()
))
{
alertCalledQueryWrapper
.
isNull
(
"father_alert"
);
}
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
...
...
@@ -168,6 +169,9 @@ public class AlertCalledController extends BaseController {
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertCalled
);
alertCalledQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Boolean
.
class
))
{
Boolean
fileValue
=
(
Boolean
)
field
.
get
(
alertCalled
);
alertCalledQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
...
...
@@ -201,8 +205,7 @@ public class AlertCalledController extends BaseController {
if
(
alertCalled
.
getCallTimeStart
()
!=
null
&&
alertCalled
.
getCallTimeEnd
()
!=
null
)
{
alertCalledQueryWrapper
.
between
(
"call_time"
,
alertCalled
.
getCallTimeStart
(),
alertCalled
.
getCallTimeEnd
());
}
if
(
alertCalled
.
getIsFatherAlert
())
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getIsFatherAlert
()))
{
alertCalledQueryWrapper
.
isNull
(
"father_alert"
);
}
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
...
...
@@ -218,6 +221,9 @@ public class AlertCalledController extends BaseController {
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertCalled
);
alertCalledQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Boolean
.
class
))
{
Boolean
fileValue
=
(
Boolean
)
field
.
get
(
alertCalled
);
alertCalledQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
...
...
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