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
b9103c7f
Commit
b9103c7f
authored
Aug 19, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
065ae80f
2c9744d7
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
279 additions
and
186 deletions
+279
-186
AmosFeignService.java
.../yeejoin/amos/boot/biz/common/feign/AmosFeignService.java
+20
-0
DispatchPaperEnums.java
...in/amos/boot/module/tzs/api/enums/DispatchPaperEnums.java
+2
-2
IAlertCalledService.java
...amos/boot/module/tzs/api/service/IAlertCalledService.java
+6
-4
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+2
-2
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+1
-1
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+3
-1
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+21
-21
PlanTaskDetailMapper.java
...maintenance/business/dao/mapper/PlanTaskDetailMapper.java
+2
-0
IPlanTaskDao.java
...mos/maintenance/business/dao/repository/IPlanTaskDao.java
+2
-0
IPlanTaskDetailDao.java
...intenance/business/dao/repository/IPlanTaskDetailDao.java
+28
-34
EquipFeignClient.java
...oin/amos/maintenance/business/feign/EquipFeignClient.java
+1
-1
FeignBasicAuthRequestInterceptor.java
...ance/business/feign/FeignBasicAuthRequestInterceptor.java
+5
-2
FeignConfiguration.java
...n/amos/maintenance/business/feign/FeignConfiguration.java
+14
-13
PointServiceImpl.java
...s/maintenance/business/service/impl/PointServiceImpl.java
+0
-3
RouteServiceImpl.java
...s/maintenance/business/service/impl/RouteServiceImpl.java
+35
-15
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+5
-51
MaintenanceUnitController.java
.../module/tzs/biz/controller/MaintenanceUnitController.java
+7
-3
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+27
-3
DispatchPaperServiceImpl.java
...module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
+1
-14
DispatchTaskServiceImpl.java
.../module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
+4
-1
ESAlertCalledService.java
...oot/module/tzs/biz/service/impl/ESAlertCalledService.java
+29
-0
RepairConsultServiceImpl.java
...module/tzs/biz/service/impl/RepairConsultServiceImpl.java
+41
-3
RescueProcessServiceImpl.java
...module/tzs/biz/service/impl/RescueProcessServiceImpl.java
+1
-4
application.properties
...boot-system-jcs/src/main/resources/application.properties
+5
-2
application.properties
...tem-maintenance/src/main/resources/application.properties
+1
-1
dbTemplate_plan_task.xml
...nce/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+2
-0
plan_task_detail.xml
...tenance/src/main/resources/db/mapper/plan_task_detail.xml
+7
-2
application.properties
...boot-system-tzs/src/main/resources/application.properties
+7
-3
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/feign/AmosFeignService.java
View file @
b9103c7f
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
feign
;
import
com.yeejoin.amos.boot.biz.common.dto.OptionDto
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.client.AgencyUserClient
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -76,4 +80,20 @@ public class AmosFeignService {
);
return
optionsMoList
;
}
/**
* 根据用户id查询指定平台用户信息.
*
* @param userId
* @return
*/
public
AgencyUserModel
queryAgencyUserByUserId
(
String
userId
)
{
AgencyUserModel
userModel
=
null
;
try
{
userModel
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
agencyUserClient
.
queryByUserId
(
userId
));
return
userModel
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"获取平台用户数据出错"
);
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/DispatchPaperEnums.java
View file @
b9103c7f
...
...
@@ -16,14 +16,14 @@ public enum DispatchPaperEnums {
receivedAlert
(
"860"
,
"receivedAlert"
,
"已接警"
),
dispatched
(
"861"
,
"dispatched"
,
"已派遣"
),
rescueArrived
(
"862"
,
"rescueArrived"
,
"
救援
已到达"
),
rescueArrived
(
"862"
,
"rescueArrived"
,
"已到达"
),
repaireArrived
(
"863"
,
"repaireArrived"
,
"维保已到达"
),
rescued
(
"864"
,
"rescued"
,
"救援完成"
),
rescueBack
(
"865"
,
"rescueBack"
,
"救援回访"
),
repaired
(
"866"
,
"repaired"
,
"维修完成"
),
reportorBack
(
"867"
,
"reportorBack"
,
"报修人已反馈"
),
disposed
(
"868"
,
"disposed"
,
"维保已处置"
),
complainantBack
(
"869"
,
"complainantBack"
,
"投诉人已
回访
"
),
complainantBack
(
"869"
,
"complainantBack"
,
"投诉人已
反馈
"
),
// 警情类型 JJLX
...
...
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 @
b9103c7f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
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.AlertCalledQueryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
import
java.util.List
;
...
...
@@ -36,10 +38,10 @@ public interface IAlertCalledService {
List
<
AlertCalledQueryDto
>
queryAlertListByQueryDto
(
AlertCalledQueryDto
alertCalledQueryDto
);
/**
*
根据警情id 更新警情状态
* @param alert
Id
* @param
alertS
tage
*
更新警情阶段信息
* @param alert
CalledVo
* @param
s
tage
* @return
*/
Boolean
updateAlertStage
ByAlertId
(
Long
alertId
,
String
alertS
tage
);
Boolean
updateAlertStage
(
AlertCalledDto
alertCalledVo
,
DispatchPaperEnums
s
tage
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
b9103c7f
...
...
@@ -513,13 +513,13 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Long
auditDepartmentId
=
failureRepairlog
.
getProcessDepartmentId
();
if
(
auditDepartmentId
.
intValue
()
==
seq
.
intValue
())
{
countNum
++;
continue
;
break
;
}
}
else
{
// 判断当前节点任务属于送达部门节点时需要判断当前登录人所在的部门id是否与表单发起时设置的送达部门一致
if
(
failureDetails
.
getFailureEquipmentId
().
intValue
()
==
seq
.
intValue
())
{
countNum
++;
continue
;
break
;
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureVerifyServiceImpl.java
View file @
b9103c7f
...
...
@@ -89,7 +89,7 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
this.createWithModel(model);
} else {*/
this
.
createWithModel
(
model
);
if
(!
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
get
ProcessId
(),
userInfo
,
condition
+
""
))
{
if
(!
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
get
SequenceNbr
(),
userInfo
,
condition
+
""
))
{
throw
new
Exception
(
"执行流程失败"
);
}
/* }*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
b9103c7f
...
...
@@ -135,7 +135,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
public
List
<
MenuFrom
>
getCompanyTeamTree
()
throws
Exception
{
MenuFrom
root
=
new
MenuFrom
(
"-1"
,
"消防队伍"
,
null
,
null
);
// 机场单位
List
<
OrgUsr
>
companyDeptList
=
orgUsrService
.
selectCompanyDepartmentMsg
();
//bug:2457需求要求不显示部门,因此更换方法 by 陈浩 2021-08-18
// List<OrgUsr> companyDeptList = orgUsrService.selectCompanyDepartmentMsg();
List
<
OrgUsr
>
companyDeptList
=
orgUsrService
.
selectCompanyList
();
List
<
MenuFrom
>
companyDeptMenuList
=
Lists
.
newArrayList
();
companyDeptList
.
forEach
(
o
->
{
if
(
ValidationUtil
.
isEmpty
(
o
.
getParentId
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanTaskController.java
View file @
b9103c7f
...
...
@@ -186,27 +186,6 @@ public class PlanTaskController extends AbstractBaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保设施分页列表-mobile"
,
notes
=
"维保设施分页列表-mobile"
)
@RequestMapping
(
value
=
"/point/{planTaskId}/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
@ApiParam
(
value
=
"巡检计划任务ID"
,
required
=
true
)
@PathVariable
Long
planTaskId
,
@ApiParam
(
value
=
"建筑id"
,
required
=
true
)
@RequestParam
(
value
=
"buildingId"
,
required
=
false
)
String
buildingId
,
@ApiParam
(
value
=
"维保状态"
,
required
=
true
)
@RequestParam
(
value
=
"isFinish"
,
required
=
false
)
String
isFinish
,
@ApiParam
(
value
=
"消防系统id"
,
required
=
true
)
@RequestParam
(
value
=
"systemId"
,
required
=
false
)
String
systemId
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
(
value
=
"pointName"
,
required
=
false
)
String
pointName
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"planTaskId"
,
planTaskId
);
param
.
put
(
"buildingId"
,
buildingId
);
param
.
put
(
"isFinish"
,
isFinish
);
param
.
put
(
"systemId"
,
systemId
);
param
.
put
(
"pointNo"
,
pointNo
);
param
.
put
(
"pointName"
,
pointName
);
return
CommonResponseUtil
.
success
(
planTaskService
.
getPlanTaskPoints
(
param
));
}
/**
* 查询任务列表
*
...
...
@@ -243,6 +222,27 @@ public class PlanTaskController extends AbstractBaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保设施分页列表-mobile"
,
notes
=
"维保设施分页列表-mobile"
)
@RequestMapping
(
value
=
"/point/{planTaskId}/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
@ApiParam
(
value
=
"巡检计划任务ID"
,
required
=
true
)
@PathVariable
Long
planTaskId
,
@ApiParam
(
value
=
"建筑id"
,
required
=
true
)
@RequestParam
(
value
=
"buildingId"
,
required
=
false
)
String
buildingId
,
@ApiParam
(
value
=
"维保状态"
,
required
=
true
)
@RequestParam
(
value
=
"isFinish"
,
required
=
false
)
String
isFinish
,
@ApiParam
(
value
=
"消防系统id"
,
required
=
true
)
@RequestParam
(
value
=
"systemId"
,
required
=
false
)
String
systemId
,
@ApiParam
(
value
=
"设备编号"
,
required
=
true
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"设备名称"
,
required
=
true
)
@RequestParam
(
value
=
"pointName"
,
required
=
false
)
String
pointName
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"planTaskId"
,
planTaskId
);
param
.
put
(
"buildingId"
,
buildingId
);
param
.
put
(
"isFinish"
,
isFinish
);
param
.
put
(
"systemId"
,
systemId
);
param
.
put
(
"pointNo"
,
pointNo
);
param
.
put
(
"pointName"
,
pointName
);
return
CommonResponseUtil
.
success
(
planTaskService
.
getPlanTaskPoints
(
param
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询维保设施,检查内容详情"
)
@GetMapping
(
value
=
"/task-point-detail"
)
public
CommonResponse
planTaskPointDetail
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/PlanTaskDetailMapper.java
View file @
b9103c7f
...
...
@@ -9,4 +9,6 @@ public interface PlanTaskDetailMapper extends BaseMapper {
,
@Param
(
value
=
"executorId"
)
String
executorId
);
Map
findPlanTaskByTaskIdAndPointId
(
@Param
(
value
=
"planTaskId"
)
long
planTaskId
,
@Param
(
value
=
"pointId"
)
long
pointId
);
void
deleteByPointIdAndRouteId
(
@Param
(
"pointId"
)
long
pointId
,
@Param
(
"routeId"
)
long
routeId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/IPlanTaskDao.java
View file @
b9103c7f
...
...
@@ -56,4 +56,6 @@ public interface IPlanTaskDao extends BaseDao<PlanTask, Long> {
List
<
PlanTask
>
findByPlanId
(
Long
planId
);
PlanTask
findByUserIdAndBeginTimeAndEndTimeAndPlanIdAndRouteId
(
String
userId
,
String
startTime
,
String
endTime
,
long
id
,
long
routeId
);
List
<
PlanTask
>
findByRouteId
(
long
pointId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/repository/IPlanTaskDetailDao.java
View file @
b9103c7f
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
dao
.
repository
;
import
java.util.List
;
import
com.yeejoin.amos.maintenance.dao.entity.PlanTaskDetail
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.yeejoin.amos.maintenance.dao.entity.PlanTaskDetail
;
import
java.util.List
;
@Repository
(
"planTaskDetail"
)
public
interface
IPlanTaskDetailDao
extends
BaseDao
<
PlanTaskDetail
,
Long
>
{
@Modifying
@Transactional
@Query
(
value
=
"DELETE FROM p_plan_task_detail WHERE point_id IN (?1)"
,
nativeQuery
=
true
)
void
deletePlanTaskDetailByPointId
(
List
<
Long
>
pointIds
);
/**
* 根据任务id获取任务详情
* @param planTaskId
* @return
*/
public
List
<
PlanTaskDetail
>
findAllByTaskNo
(
Long
planTaskId
);
/**
* 根据任务id及状态获取计划详情
* @param planTaskId
* @return
*/
public
List
<
PlanTaskDetail
>
findAllByTaskNoAndStatus
(
Long
planTaskId
,
String
status
);
int
countByIsFinish
(
int
status
);
int
countByIsFinishAndTaskNo
(
int
status
,
Long
taskNo
);
@Modifying
@Transactional
@Query
(
value
=
"DELETE FROM p_plan_task_detail WHERE task_no IN (?1)"
,
nativeQuery
=
true
)
void
deletePlanTaskDetailByTaskNo
(
List
<
Long
>
planTaskNo
);
@Query
(
value
=
"select * FROM p_plan_task_detail WHERE point_id IN (?1)"
,
nativeQuery
=
true
)
@Modifying
@Transactional
@Query
(
value
=
"DELETE FROM p_plan_task_detail WHERE point_id IN (?1)"
,
nativeQuery
=
true
)
void
deletePlanTaskDetailByPointId
(
List
<
Long
>
pointIds
);
/**
* 根据任务id及状态获取计划详情
*
* @param planTaskId
* @return
*/
List
<
PlanTaskDetail
>
findAllByTaskNoAndStatus
(
Long
planTaskId
,
String
status
);
int
countByIsFinishAndTaskNo
(
int
status
,
Long
taskNo
);
@Modifying
@Transactional
@Query
(
value
=
"DELETE FROM p_plan_task_detail WHERE task_no IN (?1)"
,
nativeQuery
=
true
)
void
deletePlanTaskDetailByTaskNo
(
List
<
Long
>
planTaskNo
);
@Query
(
value
=
"select * FROM p_plan_task_detail WHERE point_id IN (?1)"
,
nativeQuery
=
true
)
List
<
PlanTaskDetail
>
findALLByPointId
(
Long
pointId
);
}
List
<
PlanTaskDetail
>
findByPointId
(
long
pointId
);
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/feign/EquipFeignClient.java
View file @
b9103c7f
...
...
@@ -12,7 +12,7 @@ import java.util.Map;
/**
* @author DELL
*/
//装备
@FeignClient
(
name
=
"${equip.feign.name}"
)
@FeignClient
(
name
=
"${equip.feign.name}"
,
configuration
=
FeignConfiguration
.
class
)
public
interface
EquipFeignClient
{
String
PREFIX
=
"${equip.feign.prefix}"
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/feign/FeignBasicAuthRequestInterceptor.java
View file @
b9103c7f
...
...
@@ -21,9 +21,12 @@ public class FeignBasicAuthRequestInterceptor implements RequestInterceptor {
}
ServletRequestAttributes
attributes
=
(
ServletRequestAttributes
)
requestAttributes
;
HttpServletRequest
request
=
attributes
.
getRequest
();
//设置header
String
token
=
request
.
getHeader
(
"X-Access-Token"
);
String
token
=
request
.
getHeader
(
"token"
);
if
(
token
==
null
)
{
token
=
request
.
getHeader
(
"X-Access-Token"
);
}
String
product
=
request
.
getHeader
(
"product"
);
String
appKey
=
request
.
getHeader
(
"appKey"
);
template
.
header
(
"token"
,
token
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/feign/FeignConfiguration.java
View file @
b9103c7f
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
feign
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
public
class
FeignConfiguration
{
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
@Bean
public
FeignBasicAuthRequestInterceptor
basicAuthRequestInterceptor
()
{
return
new
FeignBasicAuthRequestInterceptor
();
}
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
@Bean
public
FeignBasicAuthRequestInterceptor
basicAuthRequestInterceptor
()
{
return
new
FeignBasicAuthRequestInterceptor
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/PointServiceImpl.java
View file @
b9103c7f
...
...
@@ -64,9 +64,6 @@ public class PointServiceImpl implements IPointService {
private
IPointInputItemDao
iPointInputItemDao
;
@Autowired
private
IPointPhotoDao
iPointPhotoDao
;
@Autowired
private
IRoutePointDao
iRoutePointDao
;
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/RouteServiceImpl.java
View file @
b9103c7f
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.param.RoutePageParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanService
;
...
...
@@ -18,7 +16,6 @@ import com.yeejoin.amos.maintenance.core.common.response.RoutePointRespone;
import
com.yeejoin.amos.maintenance.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.maintenance.dao.entity.*
;
import
com.yeejoin.amos.maintenance.exception.YeeException
;
import
com.yeejoin.amos.maintenance.feign.RemoteSecurityService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
...
...
@@ -29,6 +26,8 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
@Service
(
"routeService"
)
public
class
RouteServiceImpl
implements
IRouteService
{
...
...
@@ -53,15 +52,6 @@ public class RouteServiceImpl implements IRouteService {
@Resource
private
RouteMapper
routeMapper
;
@Resource
private
PointMapper
pointMapper
;
@Resource
private
InputItemMapper
inputItemMapper
;
@Resource
private
RoutePointItemMapper
routePointItemMapper
;
@Autowired
private
IPointInputItemDao
iPointInputItemDao
;
...
...
@@ -72,9 +62,17 @@ public class RouteServiceImpl implements IRouteService {
private
IPlanTaskService
planTaskService
;
@Autowired
PlanTaskDetailMapper
planTaskDetailMapper
;
@Autowired
private
IRoutePointItemDao
iRoutePointItemDao
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
IPlanTaskDetailDao
iPlanTaskDetailDao
;
@Autowired
IPlanTaskDao
planTaskDao
;
@Override
@Transactional
...
...
@@ -119,6 +117,7 @@ public class RouteServiceImpl implements IRouteService {
Long
routeId
=
route
.
getId
();
String
orgCode
=
route
.
getOrgCode
();
String
creatorId
=
route
.
getCreatorId
();
Route
finalRoute
=
route
;
routePoints
.
forEach
(
rp
->
{
rp
.
setOrgCode
(
orgCode
);
rp
.
setRouteId
(
routeId
);
...
...
@@ -126,6 +125,8 @@ public class RouteServiceImpl implements IRouteService {
if
(
rp
.
getIsDelete
())
{
iRoutePointItemDao
.
delRoutePointItem
(
rp
.
getId
());
iRoutePointDao
.
deleteById
(
rp
.
getId
());
//删除p_plan_task_detail 对应点、更新p_plan_task点数量、完成数量
this
.
updatePlanTask
(
rp
.
getPointId
(),
finalRoute
.
getId
());
}
else
{
List
<
RoutePointItem
>
routePointItems
=
rp
.
getRoutePointItem
();
iRoutePointDao
.
saveAndFlush
(
rp
);
...
...
@@ -151,7 +152,26 @@ public class RouteServiceImpl implements IRouteService {
}
}
});
return
iRouteDao
.
save
(
route
);
return
route
;
}
private
void
updatePlanTask
(
long
pointId
,
long
routeId
)
{
List
<
PlanTask
>
planTaskList
=
planTaskDao
.
findByRouteId
(
routeId
);
List
<
PlanTaskDetail
>
planTaskDetailList
=
iPlanTaskDetailDao
.
findByPointId
(
pointId
);
Map
<
Long
,
PlanTask
>
planTaskMap
=
planTaskList
.
stream
().
collect
(
Collectors
.
toMap
(
BasicEntity:
:
getId
,
Function
.
identity
()));
for
(
PlanTaskDetail
planTaskDetail
:
planTaskDetailList
)
{
PlanTask
planTask
=
planTaskMap
.
get
(
planTaskDetail
.
getTaskNo
());
if
(
1
==
planTaskDetail
.
getIsFinish
())
{
planTask
.
setFinishNum
(
planTask
.
getFinishNum
()
-
1
);
planTask
.
setPointNum
(
planTask
.
getPointNum
()
-
1
);
}
else
{
planTask
.
setPointNum
(
planTask
.
getPointNum
()
-
1
);
}
}
//更新主表完成数量,点数量
planTaskDao
.
saveAll
(
planTaskList
);
//删除路线下的维保点
planTaskDetailMapper
.
deleteByPointIdAndRouteId
(
pointId
,
routeId
);
}
...
...
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 @
b9103c7f
...
...
@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlarmStatisticsDto
;
...
...
@@ -45,14 +44,11 @@ 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
;
import
java.util.Date
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Stream
;
/**
* 警情接警填报记录
...
...
@@ -257,64 +253,22 @@ public class AlertCalledController extends BaseController {
}
page
=
iAlertCalledService
.
page
(
pageBean
,
alertCalledQueryWrapper
);
IPage
<
AlertCalledDto
>
calledVoIPage
=
AlertBeanDtoVoUtils
.
alertCalledIPageDto
(
page
);
calledVoIPage
.
getRecords
().
stream
().
forEach
(
e
->{
//e.setAlertAddress(e.getAddress());
});
return
ResponseHelper
.
buildResponse
(
calledVoIPage
);
}
private
QueryWrapper
<
AlertCalled
>
setQueryWrapper
(
QueryWrapper
<
AlertCalled
>
queryWrapper
,
AlertCalled
alertCalled
,
String
sort
){
Class
<?
extends
AlertCalled
>
aClass
=
alertCalled
.
getClass
();
queryWrapper
.
eq
(
"is_delete"
,
0
);
if
(
sort
!=
null
)
{
// String[] date= sort.split(",");
// if(date[1].equals("ascend")) {
// queryWrapper.orderByAsc(RedisKey.humpToLine(date[0]));
// }else {
// queryWrapper.orderByDesc(RedisKey.humpToLine(date[0]));
// }
}
else
{
queryWrapper
.
orderByDesc
(
"call_time"
);
}
queryWrapper
.
orderByDesc
(
"call_time"
);
if
(
alertCalled
.
getCallTimeStart
()
!=
null
&&
alertCalled
.
getCallTimeEnd
()
!=
null
)
{
queryWrapper
.
between
(
"call_time"
,
alertCalled
.
getCallTimeStart
(),
alertCalled
.
getCallTimeEnd
());
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:处警
queryWrapper
.
isNull
(
"father_alert"
);
}
Stream
<
Field
>
fieldStream
=
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
filter
(
field
->
{
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
return
!(
"IS_FATHER_ALERT"
.
equals
(
name
));
});
fieldStream
.
forEach
(
field
->
{
try
{
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
alertCalled
);
if
(
o
!=
null
&&
!
"serialVersionUID"
.
equals
(
field
.
getName
()))
{
Class
<?>
type
=
field
.
getType
();
String
name
=
NameUtils
.
camel2Underline
(
field
.
getName
());
if
(
type
.
equals
(
Integer
.
class
))
{
Integer
fileValue
=
(
Integer
)
field
.
get
(
alertCalled
);
queryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertCalled
);
queryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Boolean
.
class
))
{
Boolean
fileValue
=
(
Boolean
)
field
.
get
(
alertCalled
);
queryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
)
||
"long"
.
equals
(
type
.
toString
()))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertCalled
);
queryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常"
);
}
});
return
queryWrapper
;
}
...
...
@@ -358,7 +312,7 @@ public class AlertCalledController extends BaseController {
}
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
AlertCalled:
:
getForzenResult
,
alertCalledDto
.
getForzenResult
());
updateWrapper
.
set
(
AlertCalled:
:
getAlertSta
ge
,
1
);
updateWrapper
.
set
(
AlertCalled:
:
getAlertSta
tus
,
true
);
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertCalledDto
.
getSequenceNbr
());
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
update
(
updateWrapper
));
}
...
...
@@ -377,7 +331,7 @@ public class AlertCalledController extends BaseController {
}
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
AlertCalled:
:
getFinalReason
,
alertCalledDto
.
getFinalReason
());
updateWrapper
.
set
(
AlertCalled:
:
getAlertSta
ge
,
1
);
updateWrapper
.
set
(
AlertCalled:
:
getAlertSta
tus
,
true
);
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertCalledDto
.
getSequenceNbr
());
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
update
(
updateWrapper
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/MaintenanceUnitController.java
View file @
b9103c7f
...
...
@@ -5,12 +5,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitNameDto
;
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.api.service.IMaintenanceUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitNameDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -19,7 +19,11 @@ import org.apache.commons.lang3.StringUtils;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
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.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
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 @
b9103c7f
...
...
@@ -16,6 +16,7 @@ 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.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums
;
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.BeanDtoVoUtils
;
...
...
@@ -153,12 +154,35 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
@Override
public
Boolean
updateAlertStage
ByAlertId
(
Long
alertId
,
String
alertS
tage
)
{
public
Boolean
updateAlertStage
(
AlertCalledDto
alertCalledVo
,
DispatchPaperEnums
s
tage
)
{
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertId
);
AlertStageEnums
stage
=
AlertStageEnums
.
getEnumByCode
(
alertStage
);
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertCalledVo
.
getSequenceNbr
());
updateWrapper
.
set
(
AlertCalled:
:
getAlertStageCode
,
stage
.
getId
());
alertCalledVo
.
setAlertStage
(
stage
.
getValue
());
alertCalledVo
.
setAlertStageCode
(
stage
.
getId
());
updateWrapper
.
set
(
AlertCalled:
:
getAlertStage
,
stage
.
getValue
());
if
(
stage
==
DispatchPaperEnums
.
reportorBack
||
stage
==
DispatchPaperEnums
.
complainantBack
)
{
updateWrapper
.
set
(
AlertCalled:
:
getAlertStatus
,
true
);
alertCalledVo
.
setAlertStatus
(
true
);
}
else
if
(
stage
==
DispatchPaperEnums
.
repaired
&&
alertCalledVo
.
getAlarmTypeCode
().
equals
(
AlertStageEnums
.
KRJY
.
getId
()))
{
updateWrapper
.
set
(
AlertCalled:
:
getAlertStatus
,
true
);
alertCalledVo
.
setAlertStatus
(
true
);
}
Boolean
flag
=
this
.
update
(
updateWrapper
);
if
(
flag
)
{
//更新redis 和 es 信息
try
{
redisUtils
.
del
(
RedisKey
.
TZS_ALERTCALLED_ID
+
alertCalledVo
.
getSequenceNbr
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"删除redis失败:"
+
e
.
getMessage
());
}
try
{
eSAlertCalledService
.
updateEsAlertCalled
(
alertCalledVo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"更新es失败:"
+
e
.
getMessage
());
}
}
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 @
b9103c7f
...
...
@@ -201,9 +201,6 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
rescueProcessDto
.
setDispatchTime
(
dispatchPaper
.
getDispatchTime
());
rescueProcessServiceImpl
.
updateByAlertId
(
rescueProcessDto
,
null
);
}
// 修改警情到派遣阶段
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
alertId
,
TzsCommonParam
.
PQ
);
return
dispatchPaperFormDto
;
}
...
...
@@ -323,8 +320,6 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
alertFormValue
.
getFieldValue
()
==
null
)
{
// 坐席回访
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchSaveFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
JYHF
,
null
,
user
);
// 修改警情到救援反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchSaveFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
JYHF
);
}
alertFormValue
.
setFieldValue
(
DateUtils
.
date2LongStr
(
dispatchSaveFeedbackDto
.
getSaveFeedbackTime
()));
}
...
...
@@ -379,9 +374,7 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchSaveFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
WXFK
,
taskId
,
user
);
// 修改警情到维修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchSaveFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
WXFK
);
dispatchPaper
.
setFeedbackTime
(
dispatchSaveFeedbackDto
.
getFeedbackFinishTime
());
// 没有回访时间只有维修完成时间
dispatchPaper
.
setFeedbackTime
(
dispatchSaveFeedbackDto
.
getFeedbackFinishTime
());
// 没有回访时间只有维修完成时间 2021.8.18 演示沟通 维修完成时间即为 反馈时间
}
// 保存动态表单数据
iAlertFormValueService
.
updateBatchById
(
dynamicFormAlert
);
...
...
@@ -592,8 +585,6 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
if
(
taskId
==
null
)
{
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
// 修改警情到维修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchRepairFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
WXFK
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchRepairFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
WXFK
,
taskId
,
user
);
}
if
(
tempMap
.
get
(
"BXFK"
)
!=
null
)
{
...
...
@@ -603,8 +594,6 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchRepairFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
BXFK
,
taskId
,
user
);
// 修改警情到报修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchRepairFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
BXFK
);
}
return
flag
;
}
...
...
@@ -799,7 +788,6 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
// 修改警情到维修反馈
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchConsultFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
WXFK
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchConsultFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
WXFK_TS
,
taskId
,
user
);
}
if
(
tempMap
.
get
(
"TSRFK"
)
!=
null
)
{
...
...
@@ -810,7 +798,6 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
throw
new
BadRequest
(
"未找到反馈任务单"
);
}
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchConsultFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
TSRFK
,
taskId
,
user
);
alertCalledServiceImpl
.
updateAlertStageByAlertId
(
dispatchConsultFeedbackDto
.
getAlertId
(),
TzsCommonParam
.
TSRFK
);
}
return
flag
;
}
...
...
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 @
b9103c7f
...
...
@@ -185,6 +185,9 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
// 创建派遣单
dispatchTaskDto
.
setDispatchTime
(
new
Date
());
DispatchTask
dispatchTask
=
BeanDtoVoUtils
.
convert
(
dispatchTaskDto
,
DispatchTask
.
class
);
if
(
AlertStageEnums
.
KRJY
.
getId
().
equals
(
dispatchTaskDto
.
getAlertCode
()))
{
dispatchTask
.
setIsSaveTask
(
true
);
}
dispatchTask
.
setPaperId
(
dispatchPaperDto
.
getDispatchPaper
().
getSequenceNbr
());
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
(
dispatchTask
.
getOrgTypeCode
().
equals
(
DispatchPaperEnums
.
levelOneUnit
.
getCode
())
||
dispatchTask
.
getOrgTypeCode
().
equals
(
DispatchPaperEnums
.
levelTwoUnit
.
getCode
())))
{
throw
new
BadRequest
(
"已经派遣过其他力量调派"
);
...
...
@@ -275,7 +278,7 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
if
(
rescueProcessDto
.
getDispatchStatus
()
==
null
&&
rescueProcessDto
.
getDispatchTime
()
==
null
)
{
rescueProcessDto
.
setDispatchStatus
(
true
);
rescueProcessDto
.
setDispatchTime
(
dispatchTask
.
getDispatchTime
());
rescueProcessDto
.
setDispatchUserName
(
dispatchTask
.
getRecUser
Name
());
rescueProcessDto
.
setDispatchUserName
(
sendUser
.
getReal
Name
());
rescueProcessDto
.
setDispatchUserId
(
dispatchTask
.
getRecUserId
());
rescueProcessServiceImpl
.
updateByAlertId
(
rescueProcessDto
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESAlertCalledService.java
View file @
b9103c7f
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled
;
...
...
@@ -243,4 +244,32 @@ public class ESAlertCalledService {
return
result
;
}
/**
* 更新索引
*/
public
ESAlertCalled
updateEsAlertCalled
(
AlertCalledDto
alertCalled
)
throws
Exception
{
esAlertCalledRepository
.
deleteById
(
alertCalled
.
getSequenceNbr
());
ESAlertCalled
esAlertCalled
=
new
ESAlertCalled
();
esAlertCalled
.
setSequenceNbr
(
alertCalled
.
getSequenceNbr
());
esAlertCalled
.
setAlarmType
(
alertCalled
.
getAlarmType
());
esAlertCalled
.
setAlarmTypeCode
(
alertCalled
.
getAlarmTypeCode
());
esAlertCalled
.
setCallTime
(
alertCalled
.
getCallTime
());
esAlertCalled
.
setCallTimeLong
(
alertCalled
.
getCallTime
()!=
null
?
alertCalled
.
getCallTime
().
getTime
():
null
);
esAlertCalled
.
setContactPhone
(
alertCalled
.
getContactPhone
());
esAlertCalled
.
setAddress
(
alertCalled
.
getAddress
());
esAlertCalled
.
setAlertStage
(
alertCalled
.
getAlertStage
());
esAlertCalled
.
setAlertStatus
(
alertCalled
.
getAlertStatus
());
esAlertCalled
.
setEmergencyCall
(
alertCalled
.
getEmergencyCall
());
esAlertCalled
.
setDeviceId
(
alertCalled
.
getDeviceId
());
if
(
alertCalled
.
getAlertStatus
())
{
esAlertCalled
.
setAlertStatusStr
(
AlertStatusEnum
.
CLOSED
.
getCode
());
}
else
{
esAlertCalled
.
setAlertStatusStr
(
AlertStatusEnum
.
UNCLOSED
.
getCode
());
}
esAlertCalledRepository
.
save
(
esAlertCalled
);
return
esAlertCalled
;
}
}
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 @
b9103c7f
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask;
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.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.RepairConsultMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRepairConsultService
;
...
...
@@ -56,6 +57,14 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
@Autowired
RescueProcessServiceImpl
rescueProcessServiceImpl
;
/**
* 记录处置日志同时修改案件的状态
* @param alertId
* @param type
* @param taskId
* @param user
* @return
*/
@Transactional
@Override
public
Boolean
saveRepairConsultByAlertIdType
(
Long
alertId
,
String
type
,
Long
taskId
,
AgencyUserModel
user
)
{
...
...
@@ -77,7 +86,10 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
Template
template
=
templateServiceImpl
.
getOne
(
templateQueryWrapper
);
String
content
=
template
.
getContent
();
String
createTime
=
DateUtils
.
getDateNowString
();
DispatchPaperEnums
CZHJ
=
null
;
if
(
AlertStageEnums
.
JJ
.
getCode
().
equals
(
type
))
{
// 接警的处置环节为已接警
CZHJ
=
DispatchPaperEnums
.
receivedAlert
;
String
createUser
=
user
.
getRealName
();
String
emergency_call
=
alertCalledVo
.
getEmergencyCall
();
String
area
=
alertCalledVo
.
getAddress
();
...
...
@@ -93,6 +105,8 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$call"
,
emergency_call
);
content
=
content
.
replace
(
"$area"
,
area
).
replace
(
"$alertType"
,
alertType
);
}
else
if
(
TzsCommonParam
.
PQ
.
equals
(
type
))
{
// 派遣的处置环节为已派遣
CZHJ
=
DispatchPaperEnums
.
dispatched
;
String
createUser
=
user
.
getRealName
();
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
unit
=
dispatchTask
.
getResponseOrgName
();
...
...
@@ -115,13 +129,22 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$unit"
,
unit
);
content
=
content
.
replace
(
"$person"
,
person
).
replace
(
"$phone"
,
phone
).
replace
(
"$taskType"
,
taskType
);
}
else
if
(
TzsCommonParam
.
DD
.
equals
(
type
))
{
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
RescueProcessDto
rescueProcessDto
=
rescueProcessServiceImpl
.
getProcessByAlertId
(
alertId
);
String
FKFS
=
rescueProcessDto
.
getArriveFeedbackType
();
content
=
content
.
replace
(
"$FKFS"
,
FKFS
);
if
(
true
==
dispatchTask
.
getIsSaveTask
())
{
// 到达的处置环节为维保已到达或者 已到达
CZHJ
=
DispatchPaperEnums
.
rescueArrived
;
}
else
{
CZHJ
=
DispatchPaperEnums
.
repaireArrived
;
}
}
else
if
(
TzsCommonParam
.
JC
.
equals
(
type
))
{
//救出为救援完成
CZHJ
=
DispatchPaperEnums
.
rescued
;
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -129,10 +152,14 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
String
FKFS
=
rescueProcessDto
.
getArriveFeedbackType
();
content
=
content
.
replace
(
"$FKFS"
,
FKFS
);
}
else
if
(
TzsCommonParam
.
JYHF
.
equals
(
type
))
{
//救援回访
CZHJ
=
DispatchPaperEnums
.
rescueBack
;
String
createUser
=
user
.
getRealName
();
String
create
=
alertCalledVo
.
getEmergencyPerson
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$create"
,
create
);
}
else
if
(
TzsCommonParam
.
WXFK
.
equals
(
type
))
{
//从派遣单获取数据
//维修反馈修改到维修完成
CZHJ
=
DispatchPaperEnums
.
repaired
;
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -147,6 +174,8 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaper
.
getFeedbackType
()).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
}
else
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
//从派遣单获取数据
//投诉的维修反馈修改成维保已处置
CZHJ
=
DispatchPaperEnums
.
disposed
;
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -162,6 +191,8 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaper
.
getFeedbackType
()).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
type
=
TzsCommonParam
.
WXFK
;
}
else
if
(
TzsCommonParam
.
BXFK
.
equals
(
type
))
{
//报修反馈
CZHJ
=
DispatchPaperEnums
.
reportorBack
;
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -177,6 +208,8 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
TzsCommonParam
.
FKFS
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"fixResult"
));
}
else
if
(
TzsCommonParam
.
TSRFK
.
equals
(
type
))
{
//投诉人已反馈
CZHJ
=
DispatchPaperEnums
.
complainantBack
;
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -192,11 +225,16 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
TzsCommonParam
.
FKFS
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"action_result"
));
}
repairConsult
.
setType
(
AlertStageEnums
.
getEnumByCode
(
type
).
getId
());
repairConsult
.
setAlertStageCode
(
AlertStageEnums
.
getEnumByCode
(
type
).
getId
());
repairConsult
.
setAlertStatus
(
AlertStageEnums
.
getEnumByCode
(
type
).
getValue
());
AlertStageEnums
RZHJ
=
AlertStageEnums
.
getEnumByCode
(
type
);
repairConsult
.
setType
(
RZHJ
.
getCode
());
repairConsult
.
setAlertStageCode
(
RZHJ
.
getId
());
repairConsult
.
setAlertStatus
(
RZHJ
.
getValue
());
repairConsult
.
setDescription
(
content
);
flag
=
this
.
save
(
repairConsult
);
if
(
flag
)
{
// 记录处置记录后修改 案件状态
alertCalledServiceImpl
.
updateAlertStage
(
alertCalledVo
,
CZHJ
);
}
return
flag
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RescueProcessServiceImpl.java
View file @
b9103c7f
...
...
@@ -138,6 +138,7 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
dispatchTaskDto
.
setResponseOrgName
(
"119"
);
dispatchTaskDto
.
setResponseUserName
(
"119"
);
dispatchTaskDto
.
setResponseUserTel
(
"119"
);
dispatchTaskDto
.
setIsSaveTask
(
true
);
DispatchTask
dispatchTask
=
BeanDtoVoUtils
.
convert
(
dispatchTaskDto
,
DispatchTask
.
class
);
dispatchTask
.
setPaperId
(
dispatchPaper
.
getSequenceNbr
());
Boolean
flag
=
dispatchTaskServiceImpl
.
save
(
dispatchTask
);
...
...
@@ -215,8 +216,6 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
throw
new
BadRequest
(
"派遣任务单信息未找到"
);
}
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
rescueProcessDto
.
getAlertId
(),
"DD"
,
taskId
,
sendUser
);
//保存接警日志
// 修改警情到抵达
iAlertCalledService
.
updateAlertStageByAlertId
(
rescueProcessDto
.
getAlertId
(),
"DD"
);
}
if
(
saveByUser
)
{
// 手动救援
DispatchPaperFormDto
dispatchPaperDto
=
dispatchPaperServiceImpl
.
selectDispatchPaperDtoByAlertId
(
rescueProcessDto
.
getAlertId
());
...
...
@@ -232,8 +231,6 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
throw
new
BadRequest
(
"派遣任务单信息未找到"
);
}
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
rescueProcessDto
.
getAlertId
(),
"JC"
,
taskId
,
sendUser
);
//保存接警日志
// 修改警情到抵达
iAlertCalledService
.
updateAlertStageByAlertId
(
rescueProcessDto
.
getAlertId
(),
"JC"
);
}
return
flag
;
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
b9103c7f
spring.application.name
=
JCS
spring.application.name
=
JCS
_chenhao
server.servlet.context-path
=
/jcs
server.port
=
11100
spring.profiles.active
=
dev
...
...
@@ -50,7 +50,7 @@ spring.redis.expire.time=300
## mqtt-警情初报消息主题
mqtt.topic.alert.reporting
=
alertReporting
## 实战指挥新警情
?
报主题
## 实战指挥新警情
�?�
报主题
mqtt.topic.command.alert.notice
=
alertNotice
## 跑马灯地震,天气预警信息
...
...
@@ -60,6 +60,8 @@ mqtt.topic.command.power.deployment=power
security.systemctl.name
=
AMOS-API-SYSTEMCTL
supervision.feign.name
=
AMOS-SUPERVISION-API
iot.fegin.name
=
AMOS-API-IOT
equip.fegin.name
=
AMOS-EQUIPMANAGE
\ No newline at end of file
amos-boot-system-maintenance/src/main/resources/application.properties
View file @
b9103c7f
...
...
@@ -31,7 +31,7 @@ spring.liquibase.enabled=true
mybatis.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
equip.feign.name
=
AMOS-EQUIPMANAGE
-SHG
equip.feign.name
=
AMOS-EQUIPMANAGE
equip.feign.prefix
=
/equip
input.custom.prefix
=
QYZD
input.statute.prefix
=
FG
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
b9103c7f
...
...
@@ -205,6 +205,7 @@
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_route r on r.id = pt.route_id
where pt.status = 0
) a
<include
refid=
"mobile-plan-task-where"
/>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
...
...
@@ -263,6 +264,7 @@
p_plan_task pt
INNER JOIN p_plan p ON pt.plan_id = p.id
INNER JOIN p_route r on r.id = pt.route_id
where pt.status = 0
) a
<include
refid=
"mobile-plan-task-where"
/>
</select>
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/plan_task_detail.xml
View file @
b9103c7f
...
...
@@ -5,8 +5,13 @@
<update
id=
"finishTaskDetail"
>
call updatePlanTask(#{planTaskId}, #{pointId}, #{planTaskDetailId} ,#{executorId})
</update>
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
<delete
id=
"deleteByPointIdAndRouteId"
>
delete FROM `p_plan_task_detail`
where
point_id = #{pointId}
and task_no in (select id from p_plan_task t where t.route_id = #{routeId}) ;
</delete>
<select
id=
"findPlanTaskByTaskIdAndPointId"
resultType=
"Map"
>
SELECT
p.name planName, pt.begin_time beginTime, pt.end_time endTime, pp.name pointName, pp.point_no pointNo, ptd.id planTaskDetailId, pt.route_id routeId, pr.name routeName
FROM
...
...
amos-boot-system-tzs/src/main/resources/application.properties
View file @
b9103c7f
spring.application.name
=
TZS
server.servlet.context-path
=
/tzs
server.port
=
1
0
000
server.port
=
1
1
000
spring.profiles.active
=
dev
spring.jackson.time-zone
=
GMT+8
...
...
@@ -20,4 +20,8 @@ spring.datasource.hikari.connection-test-query=SELECT 1
iot.fegin.name
=
AMOS-API-IOT
equip.fegin.name
=
AMOS-EQUIPMANAGE
\ No newline at end of file
equip.fegin.name
=
AMOS-EQUIPMANAGE
supervision.feign.name
=
AMOS-SUPERVISION-API
security.systemctl.name
=
AMOS-API-SYSTEMCTL
\ 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