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
31dc9766
Commit
31dc9766
authored
Aug 12, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口测试修正
parent
425ac9ff
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
293 additions
and
16 deletions
+293
-16
AlertCalledQueryDto.java
...oin/amos/boot/module/tzs/api/dto/AlertCalledQueryDto.java
+87
-0
AlertCalledMapper.java
...in/amos/boot/module/tzs/api/mapper/AlertCalledMapper.java
+9
-0
IAlertCalledService.java
...amos/boot/module/tzs/api/service/IAlertCalledService.java
+18
-0
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+79
-0
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+34
-0
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+31
-3
DispatchPaperServiceImpl.java
...module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
+14
-1
DispatchTaskServiceImpl.java
.../module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
+11
-10
RepairConsultServiceImpl.java
...module/tzs/biz/service/impl/RepairConsultServiceImpl.java
+10
-2
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/dto/AlertCalledQueryDto.java
0 → 100644
View file @
31dc9766
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 警情查询DTO
*/
@Data
@ApiModel
(
value
=
"AlertCalledDto"
,
description
=
"警情接警填报记录"
)
public
class
AlertCalledQueryDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"工单编号"
,
index
=
0
)
@ApiModelProperty
(
value
=
"工单编号"
)
private
String
workOrderNumber
;
@ExcelProperty
(
value
=
"接警人"
,
index
=
1
)
@ApiModelProperty
(
value
=
"接警人"
)
private
String
creator
;
@ExcelProperty
(
value
=
"求援人"
,
index
=
2
)
@ApiModelProperty
(
value
=
"求援人"
)
private
String
emergency
;
@ExcelProperty
(
value
=
"求援时间"
,
index
=
3
)
@ApiModelProperty
(
value
=
"求援时间"
)
private
Date
emergencyTime
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"求援时间开始"
)
private
Date
emergencyTimeStart
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"求援时间结束"
)
private
Date
emergencyTimeEnd
;
@ExcelProperty
(
value
=
"求援电话"
,
index
=
4
)
@ApiModelProperty
(
value
=
"求援电话"
)
private
String
emergencyCall
;
@ExcelProperty
(
value
=
"电梯识别码"
,
index
=
5
)
@ApiModelProperty
(
value
=
"电梯识别码"
)
private
String
deviceId
;
@ExcelProperty
(
value
=
"电梯地址"
,
index
=
6
)
@ApiModelProperty
(
value
=
"电梯地址"
)
private
String
elevatorAddress
;
@ExcelProperty
(
value
=
"所属区域"
,
index
=
7
)
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
address
;
@ExcelProperty
(
value
=
"警情类型"
,
index
=
8
)
@ApiModelProperty
(
value
=
"警情类型"
)
private
String
alertType
;
@ExcelProperty
(
value
=
"警情来源"
,
index
=
9
)
@ApiModelProperty
(
value
=
"警情来源"
)
private
String
alertSource
;
@ExcelProperty
(
value
=
"处置环节"
,
index
=
10
)
@ApiModelProperty
(
value
=
"处置环节"
)
private
String
alertStage
;
@ExcelProperty
(
value
=
"完成状态"
,
index
=
11
)
@ApiModelProperty
(
value
=
"完成状态"
)
private
String
alertStatus
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"页码"
)
private
Integer
pageNum
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"条数"
)
private
Integer
pageSize
;
}
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 @
31dc9766
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -26,4 +28,11 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"recUserId"
)
String
recUserId
);
/**
* 根据查询条件返回警情记录
* @param alertCalledQueryDto
* @return
*/
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
@Param
(
"alertCalledQueryDto"
)
AlertCalledQueryDto
alertCalledQueryDto
);
}
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 @
31dc9766
...
...
@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.tzs.api.service;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
java.util.List
;
/**
* 警情接警填报记录接口类
...
...
@@ -24,4 +27,19 @@ public interface IAlertCalledService {
*
* **/
AlertCalledFormDto
selectAlertCalledByIdNoCache
(
Long
id
);
/**
* 根据查询条件返回警情记录
* @param alertCalledQueryDto
* @return
*/
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
);
/**
* 根据警情id 更新警情状态
* @param alertId
* @param alertStage
* @return
*/
Boolean
updateAlertStageByAlertId
(
Long
alertId
,
String
alertStage
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
31dc9766
...
...
@@ -23,4 +23,83 @@
or rec_user_id = #{recUserId}
</if>
</select>
<select
id=
"queryAlertListByQueryDto"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto"
>
SELECT
a.work_order_number AS workOrderNumber,
a.rec_user_name AS creator,
a.emergency_person AS emergency,
a.call_time AS emergencyTime,
a.emergency_call AS emergencyCall,
a.device_id AS deviceId,
e.address AS elevatorAddress,
a.region_code AS address,
a.alarm_type AS alertType,
a.alert_source AS alertSource,
a.alert_stage AS alertStage,
CASE a.alert_status
WHEN 0 THEN
'未完成'
WHEN 1 THEN
'完成'
ELSE
''
END AS alertStatus
FROM
tz_alert_called a
LEFT JOIN tcb_elevator e ON e.rescue_code = a.device_id
WHERE 1=1
<if
test=
"alertCalledQueryDto.workOrderNumber != null and alertCalledQueryDto.workOrderNumber != ''"
>
AND a.work_order_number like CONCAT(CONCAT('%',#{alertCalledQueryDto.workOrderNumber}),'%')
</if>
<if
test=
"alertCalledQueryDto.creator != null and alertCalledQueryDto.creator != ''"
>
AND a.rec_user_name like CONCAT(CONCAT('%',#{alertCalledQueryDto.creator}),'%')
</if>
<if
test=
"alertCalledQueryDto.emergency != null and alertCalledQueryDto.emergency != ''"
>
AND a.emergency_person like CONCAT(CONCAT('%',#{alertCalledQueryDto.emergency}),'%')
</if>
<if
test=
"alertCalledQueryDto.emergencyTimeStart != null "
>
and #{alertCalledQueryDto.emergencyTimeStart}
<![CDATA[ <= ]]>
a.call_time
</if>
<if
test=
"alertCalledQueryDto.emergencyTimeEnd != null "
>
and a.call_time
<![CDATA[ <= ]]>
#{alertCalledQueryDto.emergencyTimeEnd}
</if>
<if
test=
"alertCalledQueryDto.workOrderNumber != null and alertCalledQueryDto.workOrderNumber != ''"
>
and call_time
<![CDATA[ <= ]]>
#{endDate}
</if>
<if
test=
"alertCalledQueryDto.emergencyCall != null and alertCalledQueryDto.emergencyCall != ''"
>
AND a.emergency_call like CONCAT(CONCAT('%',#{alertCalledQueryDto.emergencyCall}),'%')
</if>
<if
test=
"alertCalledQueryDto.deviceId != null and alertCalledQueryDto.deviceId != ''"
>
AND a.device_id like CONCAT(CONCAT('%',#{alertCalledQueryDto.deviceId}),'%')
</if>
<if
test=
"alertCalledQueryDto.elevatorAddress != null and alertCalledQueryDto.elevatorAddress != ''"
>
AND e.address like CONCAT(CONCAT('%',#{alertCalledQueryDto.elevatorAddress}),'%')
</if>
<if
test=
"alertCalledQueryDto.address != null and alertCalledQueryDto.address != ''"
>
AND a.region_code like CONCAT(CONCAT('%',#{alertCalledQueryDto.address}),'%')
</if>
<if
test=
"alertCalledQueryDto.alertType != null and alertCalledQueryDto.alertType != ''"
>
AND a.alarm_type_code = #{alertCalledQueryDto.alertType}
</if>
<if
test=
"alertCalledQueryDto.alertSource != null and alertCalledQueryDto.alertSource != ''"
>
AND a.alert_source_code = #{alertCalledQueryDto.alertSource}
</if>
<if
test=
"alertCalledQueryDto.alertStage != null and alertCalledQueryDto.alertStage != ''"
>
AND a.alert_stage_code = #{alertCalledQueryDto.alertStage}
</if>
<if
test=
"alertCalledQueryDto.alertStatus != null and alertCalledQueryDto.alertStatus != ''"
>
AND a.alert_status = #{alertCalledQueryDto.alertStatus}
</if>
ORDER BY a.rec_date
<if
test=
"alertCalledQueryDto.pageNum != null and alertCalledQueryDto.pageSize != ''"
>
limit #{alertCalledQueryDto.pageNum},#{alertCalledQueryDto.pageSize}
</if>
</select>
</mapper>
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 @
31dc9766
...
...
@@ -9,11 +9,15 @@ import com.google.common.collect.Maps;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgPersonExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
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.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
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.entity.AlertCalled
;
...
...
@@ -28,13 +32,16 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.openxml4j.opc.internal.FileHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
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.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -44,6 +51,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.lang.reflect.Field
;
import
java.text.ParseException
;
import
java.util.Arrays
;
...
...
@@ -341,4 +349,30 @@ public class AlertCalledController extends BaseController {
}
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询警情事件记录"
,
notes
=
"查询警情事件记录"
)
@PostMapping
(
"/selectRecord"
)
public
ResponseModel
<
Page
<
AlertCalledQueryDto
>>
queryAlertCalledByPager
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
)
{
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
Page
<
AlertCalledQueryDto
>
result
=
new
Page
<
AlertCalledQueryDto
>(
alertCalledQueryDto
.
getPageNum
(),
alertCalledQueryDto
.
getPageSize
());
long
totle
=
list
.
size
();
result
.
setRecords
(
list
);
result
.
setTotal
(
totle
);
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出警情事件记录"
,
notes
=
"导出警情事件记录"
)
@PostMapping
(
"/exportSelectRecord"
)
public
void
exportAlertCalled
(
@RequestBody
AlertCalledQueryDto
alertCalledQueryDto
,
HttpServletResponse
response
)
{
List
<
AlertCalledQueryDto
>
list
=
iAlertCalledService
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
String
fileName
=
"警情事件记录"
+
new
Date
().
getTime
();
ExcelUtil
.
createTemplate
(
response
,
fileName
,
"警情事件记录"
,
list
,
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 @
31dc9766
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -9,13 +12,17 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
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.AlertCalledObjsDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.ESAlertCalled
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RepairConsult
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStatusEnum
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils
;
...
...
@@ -23,14 +30,22 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.elasticsearch.core.SearchHit
;
import
org.springframework.data.elasticsearch.core.SearchHits
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -62,9 +77,6 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
private
ElevatorServiceImpl
iElevatorService
;
@Autowired
private
RepairConsultServiceImpl
repairConsultService
;
@Autowired
AlertCalledMapper
alertCalledMapper
;
@Autowired
...
...
@@ -151,6 +163,22 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
return
alertCalledFormVo
;
}
@Override
public
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
)
{
List
<
AlertCalledQueryDto
>
list
=
alertCalledMapper
.
queryAlertListByQueryDto
(
alertCalledQueryDto
);
return
list
;
}
@Override
public
Boolean
updateAlertStageByAlertId
(
Long
alertId
,
String
alertStage
)
{
UpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
eq
(
"sequence_nbr"
,
alertId
);
AlertStageEnums
stage
=
AlertStageEnums
.
getEnumByCode
(
alertStage
);
updateWrapper
.
set
(
"alert_stage_code"
,
stage
.
getId
());
updateWrapper
.
set
(
"alert_stage"
,
stage
.
getValue
());
return
this
.
update
(
updateWrapper
);
}
/**
*
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
View file @
31dc9766
...
...
@@ -198,7 +198,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
rescueProcessDto
.
setDispatchTime
(
dispatchPaper
.
getDispatchTime
());
rescueProcessServiceImpl
.
updateByAlertId
(
rescueProcessDto
,
null
);
}
// 修改警情到派遣阶段
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
alertId
,
"PQ"
);
return
dispatchPaperFormDto
;
}
...
...
@@ -317,6 +318,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
alertFormValue
.
getFieldValue
()
==
null
)
{
// 坐席回访
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchSaveFeedbackDto
.
getAlertId
(),
"JYHF"
,
null
,
user
);
// 修改警情到救援反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchSaveFeedbackDto
.
getAlertId
(),
"JYHF"
);
}
alertFormValue
.
setFieldValue
(
sdf
.
format
(
dispatchSaveFeedbackDto
.
getSaveFeedbackTime
()));
}
...
...
@@ -366,6 +369,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchSaveFeedbackDto
.
getAlertId
(),
"WXFK"
,
taskId
,
user
);
// 修改警情到维修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchSaveFeedbackDto
.
getAlertId
(),
"WXFK"
);
}
dispatchPaper
.
setFeedbackTime
(
dispatchSaveFeedbackDto
.
getFeedbackTime
());
// 保存动态表单数据
...
...
@@ -505,6 +510,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
taskId
==
null
)
{
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
// 修改警情到报修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchRepairFeedbackDto
.
getAlertId
(),
"BXFK"
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchRepairFeedbackDto
.
getAlertId
(),
"BXFK"
,
taskId
,
user
);
}
alertFormValue
.
setFieldValue
(
sdf
.
format
(
dispatchRepairFeedbackDto
.
getFixFeedbackTime
()));
...
...
@@ -572,6 +579,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
taskId
==
null
)
{
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
// 修改警情到维修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchRepairFeedbackDto
.
getAlertId
(),
"WXFK"
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchRepairFeedbackDto
.
getAlertId
(),
"WXFK"
,
taskId
,
user
);
}
dispatchPaper
.
setFeedbackTime
(
dispatchRepairFeedbackDto
.
getFeedbackTime
());
...
...
@@ -708,6 +717,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
taskId
==
null
)
{
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
// 修改警情到投诉人反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchConsultFeedbackDto
.
getAlertId
(),
"TSRFK"
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchConsultFeedbackDto
.
getAlertId
(),
"TSRFK"
,
taskId
,
user
);
}
alertFormValue
.
setFieldValue
(
sdf
.
format
(
dispatchConsultFeedbackDto
.
getConsultFeedbackTime
()));
...
...
@@ -762,6 +773,8 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
taskId
==
null
)
{
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
// 修改警情到维修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchConsultFeedbackDto
.
getAlertId
(),
"WXFK"
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchConsultFeedbackDto
.
getAlertId
(),
"WXFK-TS"
,
taskId
,
user
);
}
dispatchPaper
.
setFeedbackTime
(
dispatchConsultFeedbackDto
.
getFeedbackTime
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
View file @
31dc9766
...
...
@@ -200,12 +200,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
String
createTime
=
sdf
.
format
(
alertCalledDto
.
getCallTime
());
String
rescueCode
=
alertCalledDto
.
getDeviceId
();
String
emergencyCall
=
alertCalledDto
.
getEmergencyCall
();
String
contactPhone
=
alertCalledDto
.
getContactPhone
();
String
emergencyCall
=
alertCalledDto
.
getEmergencyCall
()
==
null
?
""
:
alertCalledDto
.
getEmergencyCall
();
String
contactPhone
=
alertCalledDto
.
getContactPhone
()
==
null
?
""
:
alertCalledDto
.
getContactPhone
();
// 电梯数据
Elevator
elevator
=
elevatorServiceImpl
.
selectByAlertId
(
alertId
);
String
address
=
elevator
.
getAddress
();
String
useSiteCategory
=
elevator
.
getUseSiteCategory
();
String
address
=
elevator
.
getAddress
()
==
null
?
""
:
elevator
.
getAddress
()
;
String
useSiteCategory
=
elevator
.
getUseSiteCategory
()
==
null
?
""
:
elevator
.
getUseSiteCategory
()
;
String
useUnit
=
elevator
.
getUseUnit
();
content
=
content
.
replace
(
"$call_time"
,
createTime
).
replace
(
"$address"
,
address
).
replace
(
"$rescue_code"
,
rescueCode
).
replace
(
"$use_site_category"
,
useSiteCategory
);
String
typeCode
=
""
;
...
...
@@ -230,22 +231,22 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
switch
(
alertTypeCode
)
{
case
"KRJY"
:
// 困人救援
dispatchTaskDto
.
setIsSaveTask
(
true
);
String
trappedNum
=
dynamicParms
.
get
(
"trapped_num"
);
String
trappedFloorNum
=
dynamicParms
.
get
(
"trapped_floor_num"
);
String
isLight
=
dynamicParms
.
get
(
"is_light"
);
String
trappedTime
=
dynamicParms
.
get
(
"trapped_time"
);
String
trappedNum
=
dynamicParms
.
get
(
"trapped_num"
)
==
null
?
""
:
dynamicParms
.
get
(
"trapped_num"
)
;
String
trappedFloorNum
=
dynamicParms
.
get
(
"trapped_floor_num"
)
==
null
?
""
:
dynamicParms
.
get
(
"trapped_floor_num"
)
;
String
isLight
=
dynamicParms
.
get
(
"is_light"
)
==
null
?
""
:
dynamicParms
.
get
(
"is_light"
)
;
String
trappedTime
=
dynamicParms
.
get
(
"trapped_time"
)
==
null
?
""
:
dynamicParms
.
get
(
"trapped_time"
)
;
content
=
content
.
replace
(
"$trapped_num"
,
trappedNum
).
replace
(
"$trapped_floor_num"
,
trappedFloorNum
);
content
=
content
.
replace
(
"$emergency_call"
,
emergencyCall
).
replace
(
"$contact_phone"
,
contactPhone
);
content
=
content
.
replace
(
"$is_light"
,
isLight
).
replace
(
"$trapped_time"
,
trappedTime
);
break
;
case
"GZWX"
:
// 故障维修
dispatchTaskDto
.
setIsSaveTask
(
false
);
desc
=
dynamicParms
.
get
(
"desc"
);
desc
=
dynamicParms
.
get
(
"desc"
)
==
null
?
""
:
dynamicParms
.
get
(
"desc"
)
;
content
=
content
.
replace
(
"$use_unit"
,
useUnit
).
replace
(
"$desc"
,
desc
);
break
;
case
"TSZX"
:
// 投诉咨询
dispatchTaskDto
.
setIsSaveTask
(
false
);
desc
=
dynamicParms
.
get
(
"desc"
);
desc
=
dynamicParms
.
get
(
"desc"
)
==
null
?
""
:
dynamicParms
.
get
(
"desc"
)
;
content
=
content
.
replace
(
"$emergency_call"
,
emergencyCall
).
replace
(
"$contact_phone"
,
contactPhone
);
content
=
content
.
replace
(
"$use_unit"
,
useUnit
).
replace
(
"$desc"
,
desc
);
break
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RepairConsultServiceImpl.java
View file @
31dc9766
...
...
@@ -93,11 +93,18 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
String
emergency_call
=
alertCalledVo
.
getEmergencyCall
();
String
area
=
alertCalledVo
.
getAddress
();
String
alertType
=
alertCalledVo
.
getAlarmType
();
if
(
createUser
==
null
)
throw
new
BadRequest
(
"坐席人缺失"
);
if
(
emergency_call
==
null
)
throw
new
BadRequest
(
"求援人缺失"
);
if
(
area
==
null
)
throw
new
BadRequest
(
"区域缺失"
);
if
(
alertType
==
null
)
throw
new
BadRequest
(
"警情类型缺失"
);
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$call"
,
emergency_call
);
content
=
content
.
replace
(
"$area"
,
area
).
replace
(
"$alertType"
,
alertType
);
}
else
if
(
"PQ"
.
equals
(
type
))
{
String
createUser
=
user
.
getUserName
();
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
unit
=
dispatchTask
.
getResponseOrgName
();
String
person
=
dispatchTask
.
getResponseUserName
();
...
...
@@ -161,6 +168,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaper
.
getFeedbackType
()).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
type
=
"WXFK"
;
}
else
if
(
"BXFK"
.
equals
(
type
))
{
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
...
...
@@ -192,7 +200,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
"FKFS"
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"action_result"
));
}
repairConsult
.
setType
(
type
);
repairConsult
.
setType
(
AlertStageEnums
.
getEnumByCode
(
type
).
getId
()
);
repairConsult
.
setAlertStageCode
(
AlertStageEnums
.
getEnumByCode
(
type
).
getId
());
repairConsult
.
setAlertStatus
(
AlertStageEnums
.
getEnumByCode
(
type
).
getValue
());
repairConsult
.
setDescription
(
content
);
...
...
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