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
4a15ec8b
Commit
4a15ec8b
authored
Aug 27, 2021
by
李腾威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 辅屏查询接口和导出接口
parent
03b272f6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
59 deletions
+158
-59
AlertCalledMapper.java
...in/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
+18
-3
IAlertCalledService.java
...amos/boot/module/tzs/api/service/IAlertCalledService.java
+18
-4
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+29
-32
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+62
-17
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+31
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
View file @
4a15ec8b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -43,8 +45,21 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
...
@@ -43,8 +45,21 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
/**
/**
* 根据查询条件返回警情记录
* 根据查询条件返回警情记录
* @param
alertCalledQueryDto
* @param
workOrderNumber
* @return
* @return
*/
*/
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
@Param
(
"alertCalledQueryDto"
)
AlertCalledQueryDto
alertCalledQueryDto
);
Page
<
List
<
AlertCalledQueryDto
>>
queryAlertListByQueryDto
(
IPage
<
AlertCalledQueryDto
>
page
,
String
workOrderNumber
,
String
creator
,
String
emergency
,
String
emergencyTimeStart
,
String
emergencyTimeEnd
,
String
emergencyCall
,
String
deviceId
,
String
elevatorAddress
,
String
alertType
,
String
alertSource
,
String
alertStage
,
String
alertStatus
,
String
address
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IAlertCalledService.java
View file @
4a15ec8b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
java.util.List
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
/**
/**
* 警情接警填报记录接口类
* 警情接警填报记录接口类
...
@@ -32,10 +34,22 @@ public interface IAlertCalledService {
...
@@ -32,10 +34,22 @@ public interface IAlertCalledService {
/**
/**
* 根据查询条件返回警情记录
* 根据查询条件返回警情记录
* @param
alertCalledQueryDto
* @param
workOrderNumber
* @return
* @return
*/
*/
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
);
Page
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
IPage
<
AlertCalledQueryDto
>
page
,
@Condition
(
Operator
.
like
)
String
workOrderNumber
,
@Condition
(
Operator
.
like
)
String
creator
,
@Condition
(
Operator
.
like
)
String
emergency
,
@Condition
(
Operator
.
lt
)
String
emergencyTimeStart
,
@Condition
(
Operator
.
gt
)
String
emergencyTimeEnd
,
@Condition
(
Operator
.
like
)
String
emergencyCall
,
@Condition
(
Operator
.
like
)
String
deviceId
,
@Condition
(
Operator
.
like
)
String
elevatorAddress
,
@Condition
(
Operator
.
eq
)
String
alertType
,
@Condition
(
Operator
.
eq
)
String
alertSource
,
@Condition
(
Operator
.
eq
)
String
alertStage
,
@Condition
(
Operator
.
eq
)
String
alertStatus
);
/**
/**
* 更新警情阶段信息
* 更新警情阶段信息
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
4a15ec8b
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
</if>
</if>
</select>
</select>
<select
id=
"queryAlertListByQueryDto"
resultType=
"
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
"
>
<select
id=
"queryAlertListByQueryDto"
resultType=
"
java.util.Map
"
>
SELECT
SELECT
a.work_order_number AS workOrderNumber,
a.work_order_number AS workOrderNumber,
a.rec_user_name AS creator,
a.rec_user_name AS creator,
...
@@ -170,52 +170,49 @@
...
@@ -170,52 +170,49 @@
tz_alert_called a
tz_alert_called a
LEFT JOIN tcb_elevator e ON e.rescue_code = a.device_id
LEFT JOIN tcb_elevator e ON e.rescue_code = a.device_id
WHERE 1=1
WHERE 1=1
<if
test=
"
alertCalledQueryDto.workOrderNumber != null and alertCalledQueryDto.
workOrderNumber != ''"
>
<if
test=
"
workOrderNumber != null and
workOrderNumber != ''"
>
AND a.work_order_number like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
workOrderNumber}),'%')
AND a.work_order_number like CONCAT(CONCAT('%',#{workOrderNumber}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.creator != null and alertCalledQueryDto.
creator != ''"
>
<if
test=
"
creator != null and
creator != ''"
>
AND a.rec_user_name like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
creator}),'%')
AND a.rec_user_name like CONCAT(CONCAT('%',#{creator}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.emergency != null and alertCalledQueryDto.
emergency != ''"
>
<if
test=
"
emergency != null and
emergency != ''"
>
AND a.emergency_person like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
emergency}),'%')
AND a.emergency_person like CONCAT(CONCAT('%',#{emergency}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.
emergencyTimeStart != null "
>
<if
test=
"emergencyTimeStart != null "
>
and #{
alertCalledQueryDto.
emergencyTimeStart}
<![CDATA[ <= ]]>
a.call_time
and #{emergencyTimeStart}
<![CDATA[ <= ]]>
a.call_time
</if>
</if>
<if
test=
"
alertCalledQueryDto.
emergencyTimeEnd != null "
>
<if
test=
"emergencyTimeEnd != null "
>
and a.call_time
<![CDATA[ <= ]]>
#{
alertCalledQueryDto.
emergencyTimeEnd}
and a.call_time
<![CDATA[ <= ]]>
#{emergencyTimeEnd}
</if>
</if>
<if
test=
"
alertCalledQueryDto.workOrderNumber != null and alertCalledQueryDto.
workOrderNumber != ''"
>
<if
test=
"
workOrderNumber != null and
workOrderNumber != ''"
>
and call_time
<![CDATA[ <= ]]>
#{endDate}
and call_time
<![CDATA[ <= ]]>
#{endDate}
</if>
</if>
<if
test=
"
alertCalledQueryDto.emergencyCall != null and alertCalledQueryDto.
emergencyCall != ''"
>
<if
test=
"
emergencyCall != null and
emergencyCall != ''"
>
AND a.emergency_call like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
emergencyCall}),'%')
AND a.emergency_call like CONCAT(CONCAT('%',#{emergencyCall}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.deviceId != null and alertCalledQueryDto.
deviceId != ''"
>
<if
test=
"
deviceId != null and
deviceId != ''"
>
AND a.device_id like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
deviceId}),'%')
AND a.device_id like CONCAT(CONCAT('%',#{deviceId}),'%')
</if>
</if>
<if
test=
"
alertCalledQueryDto.elevatorAddress != null and alertCalledQueryDto.
elevatorAddress != ''"
>
<if
test=
"
elevatorAddress != null and
elevatorAddress != ''"
>
AND e.address like CONCAT(CONCAT('%',#{
alertCalledQueryDto.
elevatorAddress}),'%')
AND e.address like CONCAT(CONCAT('%',#{elevatorAddress}),'%')
</if>
</if>
<if
test=
"a
lertCalledQueryDto.address != null and alertCalledQueryDto.
address != ''"
>
<if
test=
"a
ddress != null and
address != ''"
>
AND a.region_code like CONCAT(CONCAT('%',#{a
lertCalledQueryDto.a
ddress}),'%')
AND a.region_code like CONCAT(CONCAT('%',#{address}),'%')
</if>
</if>
<if
test=
"alert
CalledQueryDto.alertType != null and alertCalledQueryDto.
alertType != ''"
>
<if
test=
"alert
Type != null and
alertType != ''"
>
AND a.alarm_type_code = #{alert
CalledQueryDto.alert
Type}
AND a.alarm_type_code = #{alertType}
</if>
</if>
<if
test=
"alert
CalledQueryDto.alertSource != null and alertCalledQueryDto.
alertSource != ''"
>
<if
test=
"alert
Source != null and
alertSource != ''"
>
AND a.alert_source_code = #{alert
CalledQueryDto.alert
Source}
AND a.alert_source_code = #{alertSource}
</if>
</if>
<if
test=
"alert
CalledQueryDto.alertStage != null and alertCalledQueryDto.
alertStage != ''"
>
<if
test=
"alert
Stage != null and
alertStage != ''"
>
AND a.alert_stage_code = #{alert
CalledQueryDto.alert
Stage}
AND a.alert_stage_code = #{alertStage}
</if>
</if>
<if
test=
"alertCalledQueryDto.alertStatus != null and alertCalledQueryDto.alertStatus != ''"
>
<if
test=
"alertStatus != null and alertStatus != ''"
>
AND a.alert_status = #{alertCalledQueryDto.alertStatus}
AND a.alert_status = #{alertStatus}
</if>
ORDER BY a.rec_date
<if
test=
"alertCalledQueryDto.pageNum != null and alertCalledQueryDto.pageSize != ''"
>
limit #{alertCalledQueryDto.pageNum},#{alertCalledQueryDto.pageSize}
</if>
</if>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/AlertCalledController.java
View file @
4a15ec8b
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.BeanUtils
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
@@ -17,13 +16,9 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto;
...
@@ -17,13 +16,9 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCallInfoDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl
;
...
@@ -41,7 +36,6 @@ import org.springframework.web.bind.annotation.PathVariable;
...
@@ -41,7 +36,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -53,7 +47,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -53,7 +47,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -277,33 +270,85 @@ public class AlertCalledController extends BaseController {
...
@@ -277,33 +270,85 @@ public class AlertCalledController extends BaseController {
queryWrapper
.
orderByDesc
(
"call_time"
);
queryWrapper
.
orderByDesc
(
"call_time"
);
queryWrapper
.
between
(
"call_time"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
),
if
(
null
!=
alertCalled
.
getCallTimeStart
()
&&
null
!=
alertCalled
.
getCallTimeEnd
())
{
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
queryWrapper
.
between
(
"call_time"
,
alertCalled
.
getCallTimeStart
(),
alertCalled
.
getCallTimeEnd
().
getTime
());
}
else
{
queryWrapper
.
between
(
"call_time"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
),
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
}
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
queryWrapper
.
isNull
(
"father_alert"
);
queryWrapper
.
isNull
(
"father_alert"
);
}
}
if
(
ValidationUtil
.
isEmpty
(
alertCalled
.
getType
()))
{
queryWrapper
.
eq
(
"type"
,
alertCalled
.
getType
());
}
if
(
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlarmType
()))
{
queryWrapper
.
eq
(
"alarm_type"
,
alertCalled
.
getAlarmType
());
}
if
(
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlertSource
()))
{
queryWrapper
.
eq
(
"alert_source"
,
alertCalled
.
getAlertSource
());
}
return
queryWrapper
;
return
queryWrapper
;
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询警情事件记录"
,
notes
=
"查询警情事件记录"
)
@ApiOperation
(
value
=
"查询警情事件记录"
,
notes
=
"查询警情事件记录"
)
@PostMapping
(
"/selectRecord"
)
@GetMapping
(
"/selectRecord"
)
public
ResponseModel
<
Page
<
AlertCalledQueryDto
>>
queryAlertCalledByPager
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
)
{
public
ResponseModel
<
Page
<
AlertCalledQueryDto
>>
queryAlertCalledByPager
(
AlertCalledQueryDto
alertCalledQueryDto
,
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
{
Page
<
AlertCalledQueryDto
>
page
=
new
Page
<
AlertCalledQueryDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
Page
<
AlertCalledQueryDto
>
pageBean
=
iAlertCalledService
.
queryAlertListByQueryDto
(
page
,
alertCalledQueryDto
.
getWorkOrderNumber
(),
alertCalledQueryDto
.
getCreator
(),
alertCalledQueryDto
.
getEmergency
(),
alertCalledQueryDto
.
getEmergencyTimeStart
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeStart
()),
alertCalledQueryDto
.
getEmergencyTimeEnd
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeEnd
()),
alertCalledQueryDto
.
getEmergencyCall
(),
alertCalledQueryDto
.
getDeviceId
(),
alertCalledQueryDto
.
getElevatorAddress
(),
alertCalledQueryDto
.
getAlertType
(),
alertCalledQueryDto
.
getAlertSource
(),
alertCalledQueryDto
.
getAlertStage
(),
alertCalledQueryDto
.
getAlertStatus
());
Page
<
AlertCalledQueryDto
>
result
=
new
Page
<
AlertCalledQueryDto
>(
alertCalledQueryDto
.
getPageNum
(),
alertCalledQueryDto
.
getPageSize
());
Page
<
AlertCalledQueryDto
>
result
=
new
Page
<
AlertCalledQueryDto
>(
alertCalledQueryDto
.
getPageNum
(),
alertCalledQueryDto
.
getPageSize
());
long
totle
=
list
.
size
();
long
totle
=
pageBean
.
getTotal
();
result
.
setRecords
(
list
);
result
.
setRecords
(
pageBean
.
getRecords
()
);
result
.
setTotal
(
totle
);
result
.
setTotal
(
totle
);
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出警情事件记录"
,
notes
=
"导出警情事件记录"
)
@ApiOperation
(
value
=
"导出警情事件记录"
,
notes
=
"导出警情事件记录"
)
@PostMapping
(
"/exportSelectRecord"
)
@GetMapping
(
"/exportSelectRecord"
)
public
void
exportAlertCalled
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
,
HttpServletResponse
response
)
{
public
void
exportAlertCalled
(
AlertCalledQueryDto
alertCalledQueryDto
,
HttpServletResponse
response
)
{
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
Page
<
AlertCalledQueryDto
>
page
=
new
Page
<
AlertCalledQueryDto
>();
Page
<
AlertCalledQueryDto
>
pageBean
=
iAlertCalledService
.
queryAlertListByQueryDto
(
page
,
alertCalledQueryDto
.
getWorkOrderNumber
(),
alertCalledQueryDto
.
getCreator
(),
alertCalledQueryDto
.
getEmergency
(),
alertCalledQueryDto
.
getEmergencyTimeStart
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeStart
()),
alertCalledQueryDto
.
getEmergencyTimeEnd
()
==
null
?
null
:
DateUtils
.
date2LongStr
(
alertCalledQueryDto
.
getEmergencyTimeEnd
()),
alertCalledQueryDto
.
getEmergencyCall
(),
alertCalledQueryDto
.
getDeviceId
(),
alertCalledQueryDto
.
getElevatorAddress
(),
alertCalledQueryDto
.
getAlertType
(),
alertCalledQueryDto
.
getAlertSource
(),
alertCalledQueryDto
.
getAlertStage
(),
alertCalledQueryDto
.
getAlertStatus
());
List
<
AlertCalledQueryDto
>
list
=
pageBean
.
getRecords
();
String
fileName
=
"警情事件记录"
+
System
.
currentTimeMillis
();
String
fileName
=
"警情事件记录"
+
System
.
currentTimeMillis
();
ExcelUtil
.
createTemplate
(
response
,
fileName
,
"警情事件记录"
,
list
,
ExcelUtil
.
createTemplate
(
response
,
fileName
,
"警情事件记录"
,
list
,
AlertCalledQueryDto
.
class
,
null
,
false
);
AlertCalledQueryDto
.
class
,
null
,
false
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
View file @
4a15ec8b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
@@ -27,6 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -27,6 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -148,9 +153,32 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -148,9 +153,32 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
}
@Override
@Override
public
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
)
{
public
Page
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
IPage
<
AlertCalledQueryDto
>
page
,
List
<
AlertCalledQueryDto
>
list
=
alertCalledMapper
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
@Condition
(
Operator
.
like
)
String
workOrderNumber
,
return
list
;
@Condition
(
Operator
.
like
)
String
creator
,
@Condition
(
Operator
.
like
)
String
emergency
,
@Condition
(
Operator
.
gt
)
String
emergencyTimeStart
,
@Condition
(
Operator
.
lt
)
String
emergencyTimeEnd
,
@Condition
(
Operator
.
like
)
String
emergencyCall
,
@Condition
(
Operator
.
like
)
String
deviceId
,
@Condition
(
Operator
.
like
)
String
elevatorAddress
,
@Condition
(
Operator
.
eq
)
String
alertType
,
@Condition
(
Operator
.
eq
)
String
alertSource
,
@Condition
(
Operator
.
eq
)
String
alertStage
,
@Condition
(
Operator
.
eq
)
String
alertStatus
)
{
Page
<
List
<
AlertCalledQueryDto
>>
list
=
alertCalledMapper
.
queryAlertListByQueryDto
(
page
,
workOrderNumber
,
creator
,
emergency
,
emergencyTimeStart
,
emergencyTimeEnd
,
emergencyCall
,
deviceId
,
elevatorAddress
,
alertType
,
alertSource
,
alertStage
,
alertStatus
,
null
);
Page
<
AlertCalledQueryDto
>
page1
=
new
Page
<>();
List
<
AlertCalledQueryDto
>
resultDtoList
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
list
.
getRecords
()),
AlertCalledQueryDto
.
class
);
page1
.
setCurrent
(
page
.
getCurrent
());
page1
.
setSize
(
page
.
getSize
());
page1
.
setTotal
(
list
.
getTotal
());
page1
.
setRecords
(
resultDtoList
);
return
page1
;
}
}
@Override
@Override
...
...
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