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
6d302577
Commit
6d302577
authored
Aug 17, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
53299f6c
df367b4e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
182 additions
and
135 deletions
+182
-135
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+20
-0
VoiceRecordFileDto.java
...join/amos/boot/module/tzs/api/dto/VoiceRecordFileDto.java
+3
-0
DispatchPaperEnums.java
...in/amos/boot/module/tzs/api/enums/DispatchPaperEnums.java
+4
-1
FailureMaintainController.java
...dule/common/biz/controller/FailureMaintainController.java
+1
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+29
-20
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+27
-26
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+2
-0
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+14
-12
DispatchTaskController.java
...oot/module/tzs/biz/controller/DispatchTaskController.java
+3
-2
RepairConsultController.java
...ot/module/tzs/biz/controller/RepairConsultController.java
+3
-2
VoiceRecordFileController.java
.../module/tzs/biz/controller/VoiceRecordFileController.java
+19
-4
AlertCalledServiceImpl.java
...t/module/tzs/biz/service/impl/AlertCalledServiceImpl.java
+17
-15
DispatchPaperServiceImpl.java
...module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
+0
-0
DispatchTaskServiceImpl.java
.../module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
+22
-20
ElevatorServiceImpl.java
...boot/module/tzs/biz/service/impl/ElevatorServiceImpl.java
+2
-2
RepairConsultServiceImpl.java
...module/tzs/biz/service/impl/RepairConsultServiceImpl.java
+12
-28
RescueProcessServiceImpl.java
...module/tzs/biz/service/impl/RescueProcessServiceImpl.java
+2
-2
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+2
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
6d302577
...
@@ -34,6 +34,11 @@ public class DateUtils {
...
@@ -34,6 +34,11 @@ public class DateUtils {
private
static
final
SimpleDateFormat
shortDateNew
=
new
SimpleDateFormat
(
"yyyy/M/d"
);
private
static
final
SimpleDateFormat
shortDateNew
=
new
SimpleDateFormat
(
"yyyy/M/d"
);
/**
/**
* 获取时分秒
*/
private
static
final
SimpleDateFormat
timeSdf
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
/**
* 获取当前时间
* 获取当前时间
*
*
* @return 当前日期时间
* @return 当前日期时间
...
@@ -687,4 +692,19 @@ public class DateUtils {
...
@@ -687,4 +692,19 @@ public class DateUtils {
int
age
=
birth
.
until
(
now
).
getYears
();
int
age
=
birth
.
until
(
now
).
getYears
();
return
age
;
return
age
;
}
}
/**
* 根据两个日期返回相差的时分秒
* @param newTime 靠后时间
* @param oldTime 靠前时间
* @return
*/
public
static
String
getTimestr
(
Date
newTime
,
Date
oldTime
)
{
Long
newTimes
=
newTime
.
getTime
();
Long
oldTimes
=
oldTime
.
getTime
();
// 不改时间会多加八个小时
timeSdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"GMT+00:00"
));
return
timeSdf
.
format
(
newTimes
-
oldTimes
);
}
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/VoiceRecordFileDto.java
View file @
6d302577
...
@@ -48,4 +48,7 @@ public class VoiceRecordFileDto extends BaseDto {
...
@@ -48,4 +48,7 @@ public class VoiceRecordFileDto extends BaseDto {
@ApiModelProperty
(
value
=
"警情阶段code"
)
@ApiModelProperty
(
value
=
"警情阶段code"
)
private
String
alertStageCode
;
private
String
alertStageCode
;
@ApiModelProperty
(
value
=
"通话时长"
)
private
String
telTime
;
}
}
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 @
6d302577
...
@@ -52,7 +52,10 @@ public enum DispatchPaperEnums {
...
@@ -52,7 +52,10 @@ public enum DispatchPaperEnums {
repairUnit
(
"950"
,
"repairUnit"
,
"维保单位"
),
repairUnit
(
"950"
,
"repairUnit"
,
"维保单位"
),
levelOneUnit
(
"951"
,
"levelOneUnit"
,
"一级响应"
),
levelOneUnit
(
"951"
,
"levelOneUnit"
,
"一级响应"
),
levelTwoUnit
(
"952"
,
"levelTwoUnit"
,
"二级响应"
),
levelTwoUnit
(
"952"
,
"levelTwoUnit"
,
"二级响应"
),
levelThreeUnit
(
"953"
,
"levelThreeUnit"
,
"三级响应"
);
levelThreeUnit
(
"953"
,
"levelThreeUnit"
,
"三级响应"
),
hasDispatched
(
"956"
,
"hasDispatched"
,
"已派遣"
),
notDispatched
(
"957"
,
"notDispatched"
,
"未派遣"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureMaintainController.java
View file @
6d302577
...
@@ -53,7 +53,7 @@ public class FailureMaintainController extends BaseController {
...
@@ -53,7 +53,7 @@ public class FailureMaintainController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"验收操作"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"验收操作"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
FailureMaintainDto
>
updateBySequenceNbrFailureMaintain
(
@RequestBody
FailureMaintainDto
model
,
Integer
status
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
ReginParams
userInfo
)
{
public
Object
updateBySequenceNbrFailureMaintain
(
@RequestBody
FailureMaintainDto
model
,
Integer
status
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
,
ReginParams
userInfo
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
updateModel
(
model
,
status
,
userInfo
));
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
updateModel
(
model
,
status
,
userInfo
));
}
}
...
...
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 @
6d302577
...
@@ -132,9 +132,9 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -132,9 +132,9 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
QueryWrapper
<
FailureDetails
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
FailureDetails
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"submission_pid"
,
submissionPid
);
wrapper
.
eq
(
"submission_pid"
,
submissionPid
);
wrapper
.
lt
(
"current_status"
,
FailureStatuEnum
.
REFUSE
.
getCode
());
wrapper
.
notIn
(
"current_status"
,
FailureStatuEnum
.
REFUSE
.
getCode
(),
wrapper
.
lt
(
"current_status"
,
FailureStatuEnum
.
FINISH
.
getCode
());
FailureStatuEnum
.
FINISH
.
getCode
(),
wrapper
.
lt
(
"current_status"
,
FailureStatuEnum
.
WAITING_AUDIT
.
getCode
());
FailureStatuEnum
.
WAITING_AUDIT
.
getCode
());
wrapper
.
orderByDesc
(
"submission_time"
);
wrapper
.
orderByDesc
(
"submission_time"
);
IPage
<
FailureDetails
>
failureDetailsPage
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
IPage
<
FailureDetails
>
failureDetailsPage
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
return
baseMapper
.
selectPage
(
failureDetailsPage
,
wrapper
);
return
baseMapper
.
selectPage
(
failureDetailsPage
,
wrapper
);
...
@@ -249,8 +249,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -249,8 +249,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
*
*
* @throws Exception
* @throws Exception
*/
*/
@Transactional
public
Object
savemodel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
throws
Exception
{
public
Object
savemodel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
{
String
businessKey
=
buildOrderNo
();
String
businessKey
=
buildOrderNo
();
JSONObject
body
=
new
JSONObject
();
JSONObject
body
=
new
JSONObject
();
body
.
put
(
"businessKey"
,
businessKey
);
body
.
put
(
"businessKey"
,
businessKey
);
...
@@ -281,20 +280,26 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -281,20 +280,26 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
sourceFileServiceImpl
.
saveSourceFile
(
failureDetailsDto
.
getSequenceNbr
(),
failureDetailsDto
.
getAttachment
());
sourceFileServiceImpl
.
saveSourceFile
(
failureDetailsDto
.
getSequenceNbr
(),
failureDetailsDto
.
getAttachment
());
}
}
//添加至报修日志
Long
faultId
=
model
.
getSequenceNbr
();
try
{
String
processAuditor
=
model
.
getRecUserName
();
Long
faultId
=
model
.
getSequenceNbr
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processAuditor
=
model
.
getRecUserName
();
String
processResult
=
"提交报修单"
;
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
String
processResult
=
"提交报修单"
;
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
);
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
logger
.
info
(
"添加流程日志到数据库失败"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
false
;
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
logger
.
info
(
"添加故障维修信息到数据库失败"
);
logger
.
info
(
"添加故障维修信息到数据库失败"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
false
;
return
false
;
// return CommonResponseUtil.failure("添加失败");
// return CommonResponseUtil.failure("添加失败");
}
}
...
@@ -313,7 +318,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -313,7 +318,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
/**
/**
* 添加报修日志
* 添加报修日志
*/
*/
public
void
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
String
processDepartment
,
@Transactional
public
Boolean
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
String
processDepartment
,
String
processResult
)
{
String
processResult
)
{
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
failureRepairlogDto
.
setFaultId
(
faultId
);
...
@@ -323,8 +329,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -323,8 +329,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setIsDelete
(
false
);
FailureRepairlogDto
RepairlogModel
=
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
RepairlogModel
)){
return
true
;
}
return
false
;
}
}
public
boolean
excuteTask
(
Long
sequenceNbr
,
ReginParams
userInfo
,
String
condition
)
{
public
boolean
excuteTask
(
Long
sequenceNbr
,
ReginParams
userInfo
,
String
condition
)
{
...
@@ -519,10 +528,10 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -519,10 +528,10 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
0
]))
{
//提交维修单
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
0
]))
{
//提交维修单
flag
=
1
;
flag
=
1
;
}
else
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
1
]))
{
//审核
}
else
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
1
]))
{
//审核
flag
=
2
;
if
(
buttonValueString
.
startsWith
(
PROCESS_NAME
[
2
]))
{
if
(
buttonValueString
.
startsWith
(
PROCESS_NAME
[
2
]))
{
flag
=
3
;
flag
=
3
;
}
}
flag
=
2
;
}
else
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
2
]))
{
//维修
}
else
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
2
]))
{
//维修
flag
=
4
;
flag
=
4
;
}
else
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
3
]))
{
//验收
}
else
if
(
buttonValueString
.
endsWith
(
PROCESS_NAME
[
3
]))
{
//验收
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureMaintainServiceImpl.java
View file @
6d302577
...
@@ -84,34 +84,35 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,F
...
@@ -84,34 +84,35 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,F
/**
/**
*根据审核结果更新维修表
*根据审核结果更新维修表
*/
*/
public
FailureMaintainDto
updateModel
(
FailureMaintainDto
failureMaintainDto
,
Integer
status
,
ReginParams
userInfo
)
{
public
Boolean
updateModel
(
FailureMaintainDto
failureMaintainDto
,
Integer
status
,
ReginParams
userInfo
)
{
failureDetailsService
.
checkExcuteTaskAuthMap
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
if
(
result
){
this
.
updateWithModel
(
failureMaintainDto
);
this
.
updateWithModel
(
failureMaintainDto
);
//根据status修改状态
//根据status修改状态
String
processResult
=
new
String
();
String
processResult
=
new
String
();
String
condition
=
new
String
();
String
condition
=
new
String
();
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
if
(
status
==
AuditResultEnum
.
AGREE
.
getCode
())
{
//同意状态为已完结
if
(
status
==
AuditResultEnum
.
AGREE
.
getCode
())
{
//同意状态为已完结
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
FINISH
.
getCode
());
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
FINISH
.
getCode
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
processResult
=
"验证通过"
;
processResult
=
"验证通过"
;
condition
=
AuditResultEnum
.
AGREE
.
getName
();
condition
=
AuditResultEnum
.
AGREE
.
getName
();
}
else
{
//不同意状态为已拒绝
}
else
{
//不同意状态为已拒绝
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
REFUSE
.
getCode
());
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
REFUSE
.
getCode
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
processResult
=
"验证未通过"
;
processResult
=
"验证未通过"
;
condition
=
AuditResultEnum
.
REFUSE
.
getName
();
condition
=
AuditResultEnum
.
REFUSE
.
getName
();
}
//添加报修日志
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
);
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
);
return
true
;
}
}
return
false
;
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
);
//添加报修日志
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
);
return
failureMaintainDto
;
}
}
/**
/**
* 查询当前故障报修单的流程的审批历史节点
* 查询当前故障报修单的流程的审批历史节点
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CheckController.java
View file @
6d302577
...
@@ -498,6 +498,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -498,6 +498,7 @@ public class CheckController extends AbstractBaseController {
@ApiParam
(
value
=
"结束时间"
)
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"结束时间"
)
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"维保人员"
)
@RequestParam
(
value
=
"personId"
,
required
=
false
)
String
person
,
@ApiParam
(
value
=
"维保人员"
)
@RequestParam
(
value
=
"personId"
,
required
=
false
)
String
person
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"teamId"
,
required
=
false
)
String
teamId
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"teamId"
,
required
=
false
)
String
teamId
,
@ApiParam
(
value
=
"设施Id"
)
@RequestParam
(
value
=
"equipId"
,
required
=
false
)
String
equipId
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -513,6 +514,7 @@ public class CheckController extends AbstractBaseController {
...
@@ -513,6 +514,7 @@ public class CheckController extends AbstractBaseController {
params
.
put
(
"endTime"
,
endTime
);
params
.
put
(
"endTime"
,
endTime
);
params
.
put
(
"person"
,
person
);
params
.
put
(
"person"
,
person
);
params
.
put
(
"teamId"
,
teamId
);
params
.
put
(
"teamId"
,
teamId
);
params
.
put
(
"equipId"
,
equipId
);
params
.
put
(
"orgCode"
,
loginOrgCode
);
params
.
put
(
"orgCode"
,
loginOrgCode
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
checkService
.
getCheckPage
(
params
,
pageable
));
return
CommonResponseUtil
.
success
(
checkService
.
getCheckPage
(
params
,
pageable
));
...
...
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 @
6d302577
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
...
@@ -325,12 +327,12 @@ public class AlertCalledController extends BaseController {
...
@@ -325,12 +327,12 @@ public class AlertCalledController extends BaseController {
}
}
void
getResponseLevel
(
Long
alertId
,
AlertCalledDto
alertCalledDto
,
ESAlertCalledDto
esAlertCalledDto
)
{
void
getResponseLevel
(
Long
alertId
,
AlertCalledDto
alertCalledDto
,
ESAlertCalledDto
esAlertCalledDto
)
{
QueryWrapper
<
DispatchPaper
>
dispatchPaperQueryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
DispatchPaper
>
dispatchPaperQueryWrapper
=
new
Lambda
QueryWrapper
<>();
dispatchPaperQueryWrapper
.
eq
(
"alert_id"
,
alertId
);
dispatchPaperQueryWrapper
.
eq
(
DispatchPaper:
:
getAlertId
,
alertId
);
DispatchPaper
dispatchPaper
=
dispatchPaperServiceImpl
.
getOne
(
dispatchPaperQueryWrapper
);
DispatchPaper
dispatchPaper
=
dispatchPaperServiceImpl
.
getOne
(
dispatchPaperQueryWrapper
);
if
(
null
!=
dispatchPaper
)
{
if
(
null
!=
dispatchPaper
)
{
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
Lambda
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
dispatchPaper
.
getSequenceNbr
()).
eq
(
"alert_type_code"
,
DispatchPaperEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getDynamicCode
());
queryWrapper
.
eq
(
AlertFormValue:
:
getAlertCalledId
,
dispatchPaper
.
getSequenceNbr
()).
eq
(
AlertFormValue:
:
getAlertTypeCode
,
DispatchPaperEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getDynamicCode
());
// 派遣单动态表单数据
// 派遣单动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
// map 存取数据
// map 存取数据
...
@@ -385,10 +387,10 @@ public class AlertCalledController extends BaseController {
...
@@ -385,10 +387,10 @@ public class AlertCalledController extends BaseController {
||
ValidationUtil
.
isEmpty
(
forzenResult
)){
||
ValidationUtil
.
isEmpty
(
forzenResult
)){
throw
new
BadRequest
(
"参数校验失败."
);
throw
new
BadRequest
(
"参数校验失败."
);
}
}
UpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
UpdateWrapper
<>();
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
Lambda
UpdateWrapper
<>();
updateWrapper
.
set
(
"forzen_result"
,
forzenResult
);
updateWrapper
.
set
(
AlertCalled:
:
getForzenResult
,
forzenResult
);
updateWrapper
.
set
(
"alert_status"
,
1
);
updateWrapper
.
set
(
AlertCalled:
:
getAlertStage
,
1
);
updateWrapper
.
eq
(
"sequence_nbr"
,
alertId
);
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertId
);
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
update
(
updateWrapper
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
update
(
updateWrapper
));
}
}
...
@@ -406,10 +408,10 @@ public class AlertCalledController extends BaseController {
...
@@ -406,10 +408,10 @@ public class AlertCalledController extends BaseController {
||
ValidationUtil
.
isEmpty
(
alertId
)){
||
ValidationUtil
.
isEmpty
(
alertId
)){
throw
new
BadRequest
(
"参数校验失败."
);
throw
new
BadRequest
(
"参数校验失败."
);
}
}
UpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
UpdateWrapper
<>();
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
Lambda
UpdateWrapper
<>();
updateWrapper
.
set
(
"final_reason"
,
finalReason
);
updateWrapper
.
set
(
AlertCalled:
:
getFinalReason
,
finalReason
);
updateWrapper
.
set
(
"alert_status"
,
1
);
updateWrapper
.
set
(
AlertCalled:
:
getAlertStage
,
1
);
updateWrapper
.
eq
(
"sequence_nbr"
,
alertId
);
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertId
);
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
update
(
updateWrapper
));
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/DispatchTaskController.java
View file @
6d302577
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -78,8 +79,8 @@ public class DispatchTaskController extends BaseController {
...
@@ -78,8 +79,8 @@ public class DispatchTaskController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找力量调派信息"
,
notes
=
"根据警情id 查找力量调派信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找力量调派信息"
,
notes
=
"根据警情id 查找力量调派信息"
)
@GetMapping
(
value
=
"/list/alert/{alertId}"
)
@GetMapping
(
value
=
"/list/alert/{alertId}"
)
public
ResponseModel
<
List
<
DispatchTask
>>
selectForListByAlertId
(
@PathVariable
Long
alertId
)
{
public
ResponseModel
<
List
<
DispatchTask
>>
selectForListByAlertId
(
@PathVariable
Long
alertId
)
{
QueryWrapper
<
DispatchTask
>
queryWrapper
=
new
QueryWrapper
<
DispatchTask
>();
LambdaQueryWrapper
<
DispatchTask
>
queryWrapper
=
new
Lambda
QueryWrapper
<
DispatchTask
>();
queryWrapper
.
eq
(
"alert_id"
,
alertId
);
queryWrapper
.
eq
(
DispatchTask:
:
getAlertId
,
alertId
);
List
<
DispatchTask
>
list
=
dispatchTaskServiceImpl
.
list
(
queryWrapper
);
List
<
DispatchTask
>
list
=
dispatchTaskServiceImpl
.
list
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/RepairConsultController.java
View file @
6d302577
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
@@ -62,8 +63,8 @@ public class RepairConsultController extends BaseController {
...
@@ -62,8 +63,8 @@ public class RepairConsultController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找处置过程日志"
,
notes
=
"根据警情id 查找处置过程日志"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找处置过程日志"
,
notes
=
"根据警情id 查找处置过程日志"
)
@GetMapping
(
value
=
"/list/alert/{alertId}"
)
@GetMapping
(
value
=
"/list/alert/{alertId}"
)
public
ResponseModel
<
List
<
RepairConsult
>>
selectForListByAlertId
(
@PathVariable
Long
alertId
)
{
public
ResponseModel
<
List
<
RepairConsult
>>
selectForListByAlertId
(
@PathVariable
Long
alertId
)
{
QueryWrapper
<
RepairConsult
>
queryWrapper
=
new
QueryWrapper
<
RepairConsult
>();
LambdaQueryWrapper
<
RepairConsult
>
queryWrapper
=
new
Lambda
QueryWrapper
<
RepairConsult
>();
queryWrapper
.
eq
(
"parent_id"
,
alertId
).
orderByDesc
(
"rec_date"
);
queryWrapper
.
eq
(
RepairConsult:
:
getParentId
,
alertId
).
orderByDesc
(
RepairConsult:
:
getRecDate
);
List
<
RepairConsult
>
list
=
repairConsultServiceImpl
.
list
(
queryWrapper
);
List
<
RepairConsult
>
list
=
repairConsultServiceImpl
.
list
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/VoiceRecordFileController.java
View file @
6d302577
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
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.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
...
@@ -9,6 +11,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl;
...
@@ -9,6 +11,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.VoiceRecordFileServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.VoiceRecordFileServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -23,6 +26,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -23,6 +26,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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -83,10 +87,21 @@ public class VoiceRecordFileController extends BaseController {
...
@@ -83,10 +87,21 @@ public class VoiceRecordFileController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找通话记录信息"
,
notes
=
"根据警情id 查找通话记录信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id 查找通话记录信息"
,
notes
=
"根据警情id 查找通话记录信息"
)
@GetMapping
(
value
=
"/list/alert/{alertId}"
)
@GetMapping
(
value
=
"/list/alert/{alertId}"
)
public
ResponseModel
<
List
<
VoiceRecordFile
>>
selectForListByAlertId
(
@PathVariable
Long
alertId
)
{
public
ResponseModel
<
List
<
VoiceRecordFile
Dto
>>
selectForListByAlertId
(
@PathVariable
Long
alertId
)
{
QueryWrapper
<
VoiceRecordFile
>
queryWrapper
=
new
QueryWrapper
<
VoiceRecordFile
>();
LambdaQueryWrapper
<
VoiceRecordFile
>
queryWrapper
=
new
Lambda
QueryWrapper
<
VoiceRecordFile
>();
queryWrapper
.
eq
(
"alert_id"
,
alertId
).
orderByDesc
(
"rec_date"
);
queryWrapper
.
eq
(
VoiceRecordFile:
:
getAlertId
,
alertId
).
orderByDesc
(
VoiceRecordFile:
:
getRecDate
);
List
<
VoiceRecordFile
>
list
=
voiceRecordFileServiceImpl
.
list
(
queryWrapper
);
List
<
VoiceRecordFile
>
list
=
voiceRecordFileServiceImpl
.
list
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
List
<
VoiceRecordFileDto
>
dtoList
=
new
ArrayList
<
VoiceRecordFileDto
>(
list
.
size
());
list
.
stream
().
forEach
(
voiceRecord
->
{
// 创建新的对象实例
VoiceRecordFileDto
target
=
new
VoiceRecordFileDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
voiceRecord
,
target
);
if
(
voiceRecord
.
getTelStartTime
()
!=
null
&&
voiceRecord
.
getTelEndTime
()
!=
null
)
{
target
.
setTelTime
(
DateUtils
.
getTimestr
(
voiceRecord
.
getTelEndTime
(),
voiceRecord
.
getTelStartTime
()));
}
dtoList
.
add
(
target
);
});
return
ResponseHelper
.
buildResponse
(
dtoList
);
}
}
}
}
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 @
6d302577
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
...
@@ -4,6 +4,8 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -80,8 +82,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -80,8 +82,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
else
{
}
else
{
// 警情基本信息
// 警情基本信息
AlertCalled
alertCalled
=
this
.
getById
(
id
);
AlertCalled
alertCalled
=
this
.
getById
(
id
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
Lambda
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
queryWrapper
.
eq
(
AlertFormValue:
:
getAlertCalledId
,
id
);
// 警情动态表单数据
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
FormValue
>
formValue
=
new
ArrayList
<
FormValue
>();
List
<
FormValue
>
formValue
=
new
ArrayList
<
FormValue
>();
...
@@ -92,9 +94,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -92,9 +94,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
}
}
}
AlertCalledDto
alertCalledDto
=
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
);
AlertCalledDto
alertCalledDto
=
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
);
QueryWrapper
<
Elevator
>
elevatorQueryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
Elevator
>
elevatorQueryWrapper
=
new
Lambda
QueryWrapper
<>();
elevatorQueryWrapper
.
eq
(
"rescue_code"
,
alertCalled
.
getDeviceId
());
elevatorQueryWrapper
.
eq
(
Elevator:
:
getRescueCode
,
alertCalled
.
getDeviceId
());
elevatorQueryWrapper
.
eq
(
"register_code"
,
alertCalled
.
getRegistrationCode
());
elevatorQueryWrapper
.
eq
(
Elevator:
:
getRegisterCode
,
alertCalled
.
getRegistrationCode
());
Elevator
elevator
=
iElevatorService
.
getOne
(
elevatorQueryWrapper
);
Elevator
elevator
=
iElevatorService
.
getOne
(
elevatorQueryWrapper
);
if
(
null
!=
elevator
)
{
if
(
null
!=
elevator
)
{
alertCalledDto
.
setAddress
(
elevator
.
getAddress
());
alertCalledDto
.
setAddress
(
elevator
.
getAddress
());
...
@@ -117,8 +119,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -117,8 +119,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
public
AlertCalledFormDto
selectAlertCalledByIdNoCache
(
Long
id
)
{
public
AlertCalledFormDto
selectAlertCalledByIdNoCache
(
Long
id
)
{
// 警情基本信息
// 警情基本信息
AlertCalled
alertCalled
=
this
.
getById
(
id
);
AlertCalled
alertCalled
=
this
.
getById
(
id
);
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
Lambda
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
queryWrapper
.
eq
(
AlertFormValue:
:
getAlertCalledId
,
id
);
// 警情动态表单数据
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
FormValue
>
formValue
=
new
ArrayList
<
FormValue
>();
List
<
FormValue
>
formValue
=
new
ArrayList
<
FormValue
>();
...
@@ -129,9 +131,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -129,9 +131,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
}
}
}
AlertCalledDto
alertCalledDto
=
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
);
AlertCalledDto
alertCalledDto
=
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
);
QueryWrapper
<
Elevator
>
elevatorQueryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
Elevator
>
elevatorQueryWrapper
=
new
Lambda
QueryWrapper
<>();
elevatorQueryWrapper
.
eq
(
"rescue_code"
,
alertCalled
.
getDeviceId
());
elevatorQueryWrapper
.
eq
(
Elevator:
:
getRescueCode
,
alertCalled
.
getDeviceId
());
elevatorQueryWrapper
.
eq
(
"register_code"
,
alertCalled
.
getRegistrationCode
());
elevatorQueryWrapper
.
eq
(
Elevator:
:
getRegisterCode
,
alertCalled
.
getRegistrationCode
());
Elevator
elevator
=
iElevatorService
.
getOne
(
elevatorQueryWrapper
);
Elevator
elevator
=
iElevatorService
.
getOne
(
elevatorQueryWrapper
);
if
(
null
!=
elevator
)
{
if
(
null
!=
elevator
)
{
alertCalledDto
.
setAddress
(
elevator
.
getAddress
());
alertCalledDto
.
setAddress
(
elevator
.
getAddress
());
...
@@ -155,11 +157,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -155,11 +157,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Override
@Override
public
Boolean
updateAlertStageByAlertId
(
Long
alertId
,
String
alertStage
)
{
public
Boolean
updateAlertStageByAlertId
(
Long
alertId
,
String
alertStage
)
{
UpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
UpdateWrapper
<>();
LambdaUpdateWrapper
<
AlertCalled
>
updateWrapper
=
new
Lambda
UpdateWrapper
<>();
updateWrapper
.
eq
(
"sequence_nbr"
,
alertId
);
updateWrapper
.
eq
(
AlertCalled:
:
getSequenceNbr
,
alertId
);
AlertStageEnums
stage
=
AlertStageEnums
.
getEnumByCode
(
alertStage
);
AlertStageEnums
stage
=
AlertStageEnums
.
getEnumByCode
(
alertStage
);
updateWrapper
.
set
(
"alert_stage_code"
,
stage
.
getId
());
updateWrapper
.
set
(
AlertCalled:
:
getAlertStageCode
,
stage
.
getId
());
updateWrapper
.
set
(
"alert_stage"
,
stage
.
getValue
());
updateWrapper
.
set
(
AlertCalled:
:
getAlertStage
,
stage
.
getValue
());
return
this
.
update
(
updateWrapper
);
return
this
.
update
(
updateWrapper
);
}
}
...
@@ -232,7 +234,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -232,7 +234,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalledObjsDto
.
setAlertCalledDto
(
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
));
alertCalledObjsDto
.
setAlertCalledDto
(
BeanDtoVoUtils
.
convert
(
alertCalled
,
AlertCalledDto
.
class
));
alertCalledObjsDto
.
setAlertFormValue
(
alertFormValuelist
);
alertCalledObjsDto
.
setAlertFormValue
(
alertFormValuelist
);
//保存处置记录-接警
//保存处置记录-接警
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
alertCalled
.
getSequenceNbr
(),
"JJ"
,
null
,
user
);
//保存接警日志
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
alertCalled
.
getSequenceNbr
(),
AlertStageEnums
.
JJ
.
getCode
()
,
null
,
user
);
//保存接警日志
}
}
/**
/**
...
...
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 @
6d302577
This diff is collapsed.
Click to expand it.
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 @
6d302577
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.Template;
...
@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.Template;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UseUnit
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UseUnit
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
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.DispatchPaperEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.DispatchTaskMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.DispatchTaskMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IDispatchTaskService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IDispatchTaskService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService
;
...
@@ -99,9 +101,9 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -99,9 +101,9 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
dispatchTaskDto
.
setAlertId
(
alertId
);
dispatchTaskDto
.
setAlertId
(
alertId
);
dispatchTaskDto
.
setAlertCode
(
alertCalledDto
.
getAlarmTypeCode
());
dispatchTaskDto
.
setAlertCode
(
alertCalledDto
.
getAlarmTypeCode
());
// 获取模板 拼接json
// 获取模板 拼接json
QueryWrapper
<
Template
>
templateQueryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
Template
>
templateQueryWrapper
=
new
Lambda
QueryWrapper
<>();
String
alertTypeCode
=
AlertStageEnums
.
getEnumById
(
alertCalledDto
.
getAlarmTypeCode
()).
getCode
()
;
String
alertTypeCode
=
AlertStageEnums
.
getEnumById
(
alertCalledDto
.
getAlarmTypeCode
()).
getCode
()
;
templateQueryWrapper
.
eq
(
"type_code"
,
"TASK-"
+
alertTypeCode
);
templateQueryWrapper
.
eq
(
Template:
:
getTypeCode
,
"TASK-"
+
alertTypeCode
);
Template
template
=
templateServiceImpl
.
getOne
(
templateQueryWrapper
);
Template
template
=
templateServiceImpl
.
getOne
(
templateQueryWrapper
);
String
content
=
template
.
getContent
();
String
content
=
template
.
getContent
();
// 替换模板内容
// 替换模板内容
...
@@ -127,8 +129,8 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -127,8 +129,8 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
typeCode
=
AlertStageEnums
.
TSZX
.
getId
();
typeCode
=
AlertStageEnums
.
TSZX
.
getId
();
}
}
// 警情信息动态数据
// 警情信息动态数据
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
Lambda
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
alertId
).
eq
(
"alert_type_code"
,
typeCode
);
queryWrapper
.
eq
(
AlertFormValue:
:
getAlertCalledId
,
alertId
).
eq
(
AlertFormValue:
:
getAlertTypeCode
,
typeCode
);
// 派遣单动态表单数据
// 派遣单动态表单数据
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
// map 存取数据
// map 存取数据
...
@@ -182,13 +184,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -182,13 +184,13 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
dispatchTaskDto
.
setDispatchTime
(
new
Date
());
dispatchTaskDto
.
setDispatchTime
(
new
Date
());
DispatchTask
dispatchTask
=
BeanDtoVoUtils
.
convert
(
dispatchTaskDto
,
DispatchTask
.
class
);
DispatchTask
dispatchTask
=
BeanDtoVoUtils
.
convert
(
dispatchTaskDto
,
DispatchTask
.
class
);
dispatchTask
.
setPaperId
(
dispatchPaperDto
.
getDispatchPaper
().
getSequenceNbr
());
dispatchTask
.
setPaperId
(
dispatchPaperDto
.
getDispatchPaper
().
getSequenceNbr
());
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
(
dispatchTask
.
getOrgTypeCode
().
equals
(
"levelOneUnit"
)
||
dispatchTask
.
getOrgTypeCode
().
equals
(
"levelTwoUnit"
)))
{
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
(
dispatchTask
.
getOrgTypeCode
().
equals
(
DispatchPaperEnums
.
levelOneUnit
.
getCode
())
||
dispatchTask
.
getOrgTypeCode
().
equals
(
DispatchPaperEnums
.
levelTwoUnit
.
getCode
()
)))
{
throw
new
BadRequest
(
"已经派遣过其他力量调派"
);
throw
new
BadRequest
(
"已经派遣过其他力量调派"
);
}
}
if
(
dispatchPaper
.
getUseOrgTaskId
()
!=
null
&&
dispatchTask
.
getOrgTypeCode
().
equals
(
"useUnit"
))
{
if
(
dispatchPaper
.
getUseOrgTaskId
()
!=
null
&&
dispatchTask
.
getOrgTypeCode
().
equals
(
DispatchPaperEnums
.
useUnit
.
getCode
()
))
{
throw
new
BadRequest
(
"已经派遣过使用单位"
);
throw
new
BadRequest
(
"已经派遣过使用单位"
);
}
}
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
dispatchTask
.
getOrgTypeCode
().
equals
(
"repairUnit"
)
)
{
if
(
dispatchPaper
.
getRepairOrgTaskId
()
!=
null
&&
dispatchTask
.
getOrgTypeCode
().
equals
(
DispatchPaperEnums
.
repairUnit
.
getCode
()
)
)
{
throw
new
BadRequest
(
"已经派遣过维修单位调派"
);
throw
new
BadRequest
(
"已经派遣过维修单位调派"
);
}
}
...
@@ -201,11 +203,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -201,11 +203,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
UseUnit
useUnit
=
iUseUnitService
.
getById
(
dispatchTask
.
getResponseOrgId
());
UseUnit
useUnit
=
iUseUnitService
.
getById
(
dispatchTask
.
getResponseOrgId
());
dispatchPaper
.
setUseOrgId
(
useUnit
.
getSequenceNbr
());
dispatchPaper
.
setUseOrgId
(
useUnit
.
getSequenceNbr
());
dispatchPaper
.
setUseOrgTaskId
(
dispatchTask
.
getSequenceNbr
());
dispatchPaper
.
setUseOrgTaskId
(
dispatchTask
.
getSequenceNbr
());
if
(
AlertStageEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getCode
().
equals
(
"KRJY"
))
{
if
(
AlertStageEnums
.
getEnumById
(
dispatchPaper
.
getAlertCode
()).
getCode
().
equals
(
AlertStageEnums
.
KRJY
.
getCode
()
))
{
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
alertFormValue
.
setFieldValue
(
"已派遣"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
hasDispatched
.
getValue
()
);
alertFormValue
.
setFieldValueCode
(
"hasDispatched"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
hasDispatched
.
getId
()
);
}
}
});
});
}
}
...
@@ -223,11 +225,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -223,11 +225,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
// 修改动态字段
// 修改动态字段
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
alertFormValue
.
setFieldValue
(
"已派遣"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
hasDispatched
.
getValue
()
);
alertFormValue
.
setFieldValueCode
(
"hasDispatched"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
hasDispatched
.
getId
()
);
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
alertFormValue
.
setFieldValue
(
"一级响应"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelOneUnit
.
getValue
()
);
alertFormValue
.
setFieldValueCode
(
"levelOneUnit"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelOneUnit
.
getId
()
);
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"save_credit_code"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"save_credit_code"
))
{
alertFormValue
.
setFieldValue
(
socialCreditCode
);
alertFormValue
.
setFieldValue
(
socialCreditCode
);
}
}
...
@@ -240,11 +242,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -240,11 +242,11 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
// 修改动态字段
// 修改动态字段
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
dynamicFormAlert
.
stream
().
forEach
(
alertFormValue
->
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
if
(
alertFormValue
.
getFieldCode
().
equals
(
"dispatch_status"
))
{
alertFormValue
.
setFieldValue
(
"已派遣"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
hasDispatched
.
getValue
()
);
alertFormValue
.
setFieldValueCode
(
"hasDispatched"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
hasDispatched
.
getId
()
);
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
}
else
if
(
alertFormValue
.
getFieldCode
().
equals
(
"response_level"
))
{
alertFormValue
.
setFieldValue
(
"二级响应"
);
alertFormValue
.
setFieldValue
(
DispatchPaperEnums
.
levelTwoUnit
.
getValue
()
);
alertFormValue
.
setFieldValueCode
(
"levelTwoUnit"
);
alertFormValue
.
setFieldValueCode
(
DispatchPaperEnums
.
levelTwoUnit
.
getId
()
);
}
}
});
});
break
;
break
;
...
@@ -254,9 +256,9 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
...
@@ -254,9 +256,9 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
// 保存动态表单数据
// 保存动态表单数据
iAlertFormValueService
.
updateBatchById
(
dynamicFormAlert
);
iAlertFormValueService
.
updateBatchById
(
dynamicFormAlert
);
// 记录日志
// 记录日志
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchTask
.
getAlertId
(),
"PQ"
,
dispatchTask
.
getSequenceNbr
(),
sendUser
);
repairConsultServiceImpl
.
saveRepairConsultByAlertIdType
(
dispatchTask
.
getAlertId
(),
TzsCommonParam
.
PQ
,
dispatchTask
.
getSequenceNbr
(),
sendUser
);
// 派遣后如果困人救援更新派遣过程表
// 派遣后如果困人救援更新派遣过程表
if
(
"960"
.
equals
(
dispatchPaper
.
getAlertCode
()))
{
if
(
AlertStageEnums
.
KRJY
.
getId
()
.
equals
(
dispatchPaper
.
getAlertCode
()))
{
RescueProcessDto
rescueProcessDto
=
rescueProcessServiceImpl
.
getProcessByAlertId
(
dispatchTaskDto
.
getAlertId
());
RescueProcessDto
rescueProcessDto
=
rescueProcessServiceImpl
.
getProcessByAlertId
(
dispatchTaskDto
.
getAlertId
());
if
(
rescueProcessDto
.
getDispatchStatus
()
==
null
&&
rescueProcessDto
.
getDispatchTime
()
==
null
)
{
if
(
rescueProcessDto
.
getDispatchStatus
()
==
null
&&
rescueProcessDto
.
getDispatchTime
()
==
null
)
{
rescueProcessDto
.
setDispatchStatus
(
true
);
rescueProcessDto
.
setDispatchStatus
(
true
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ElevatorServiceImpl.java
View file @
6d302577
...
@@ -102,8 +102,8 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
...
@@ -102,8 +102,8 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
String
equipmentClassificationCode
=
alertCalledDto
.
getEquipmentClassificationCode
();
String
equipmentClassificationCode
=
alertCalledDto
.
getEquipmentClassificationCode
();
String
deviceId
=
alertCalledDto
.
getDeviceId
();
String
deviceId
=
alertCalledDto
.
getDeviceId
();
// 目前只有电梯类型
// 目前只有电梯类型
QueryWrapper
<
Elevator
>
queryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
Elevator
>
queryWrapper
=
new
Lambda
QueryWrapper
<>();
queryWrapper
.
eq
(
"rescue_code"
,
deviceId
);
queryWrapper
.
eq
(
Elevator:
:
getRescueCode
,
deviceId
);
Elevator
elevator
=
this
.
getOne
(
queryWrapper
);
Elevator
elevator
=
this
.
getOne
(
queryWrapper
);
if
(
ValidationUtil
.
isEmpty
(
elevator
))
if
(
ValidationUtil
.
isEmpty
(
elevator
))
throw
new
BadRequest
(
"设备未找到"
);
throw
new
BadRequest
(
"设备未找到"
);
...
...
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 @
6d302577
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.
bo.ReginParam
s
;
import
com.yeejoin.amos.boot.biz.common.
utils.DateUtil
s
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
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.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
...
@@ -22,12 +21,10 @@ import com.yeejoin.amos.boot.module.tzs.api.service.IRepairConsultService;
...
@@ -22,12 +21,10 @@ import com.yeejoin.amos.boot.module.tzs.api.service.IRepairConsultService;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.
typroject.tyboot.core.foundation.context.RequestContext
;
import
org.
springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -40,12 +37,6 @@ import java.util.Map;
...
@@ -40,12 +37,6 @@ import java.util.Map;
*/
*/
@Service
@Service
public
class
RepairConsultServiceImpl
extends
BaseService
<
RepairConsultDto
,
RepairConsult
,
RepairConsultMapper
>
implements
IRepairConsultService
{
public
class
RepairConsultServiceImpl
extends
BaseService
<
RepairConsultDto
,
RepairConsult
,
RepairConsultMapper
>
implements
IRepairConsultService
{
/**
* 分页查询
*/
public
Page
<
RepairConsultDto
>
queryForRepairConsultPage
(
Page
<
RepairConsultDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
@Autowired
@Autowired
TemplateServiceImpl
templateServiceImpl
;
TemplateServiceImpl
templateServiceImpl
;
...
@@ -65,13 +56,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
...
@@ -65,13 +56,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
@Autowired
@Autowired
RescueProcessServiceImpl
rescueProcessServiceImpl
;
RescueProcessServiceImpl
rescueProcessServiceImpl
;
/**
@Transactional
* 列表查询 示例
*/
public
List
<
RepairConsultDto
>
queryForRepairConsultList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
@Override
public
Boolean
saveRepairConsultByAlertIdType
(
Long
alertId
,
String
type
,
Long
taskId
,
AgencyUserModel
user
)
{
public
Boolean
saveRepairConsultByAlertIdType
(
Long
alertId
,
String
type
,
Long
taskId
,
AgencyUserModel
user
)
{
Boolean
flag
=
false
;
Boolean
flag
=
false
;
...
@@ -83,17 +68,16 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
...
@@ -83,17 +68,16 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
}
AlertCalledDto
alertCalledVo
=
alertCallFrom
.
getAlertCalledDto
();
AlertCalledDto
alertCalledVo
=
alertCallFrom
.
getAlertCalledDto
();
// 获取模板 拼接json
// 获取模板 拼接json
QueryWrapper
<
Template
>
templateQueryWrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
Template
>
templateQueryWrapper
=
new
Lambda
QueryWrapper
<>();
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
templateQueryWrapper
.
eq
(
"type_code"
,
"RECORD-WXFK"
);
templateQueryWrapper
.
eq
(
Template:
:
getTypeCode
,
"RECORD-"
+
TzsCommonParam
.
WXFK
);
}
else
{
}
else
{
templateQueryWrapper
.
eq
(
"type_code"
,
"RECORD-"
+
type
);
templateQueryWrapper
.
eq
(
Template:
:
getTypeCode
,
"RECORD-"
+
type
);
}
}
Template
template
=
templateServiceImpl
.
getOne
(
templateQueryWrapper
);
Template
template
=
templateServiceImpl
.
getOne
(
templateQueryWrapper
);
String
content
=
template
.
getContent
();
String
content
=
template
.
getContent
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
createTime
=
DateUtils
.
getDateNowString
();
String
createTime
=
sdf
.
format
(
new
Date
());
if
(
AlertStageEnums
.
JJ
.
getCode
().
equals
(
type
))
{
if
(
"JJ"
.
equals
(
type
))
{
String
createUser
=
user
.
getUserName
();
String
createUser
=
user
.
getUserName
();
String
emergency_call
=
alertCalledVo
.
getEmergencyCall
();
String
emergency_call
=
alertCalledVo
.
getEmergencyCall
();
String
area
=
alertCalledVo
.
getAddress
();
String
area
=
alertCalledVo
.
getAddress
();
...
@@ -121,11 +105,11 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
...
@@ -121,11 +105,11 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
phone
=
""
;
phone
=
""
;
}
}
String
taskType
=
""
;
String
taskType
=
""
;
if
(
"960"
.
equals
(
alertCalledVo
.
getAlarmTypeCode
()))
{
if
(
AlertStageEnums
.
KRJY
.
getId
()
.
equals
(
alertCalledVo
.
getAlarmTypeCode
()))
{
taskType
=
"救援任务单"
;
taskType
=
"救援任务单"
;
}
else
if
(
"961"
.
equals
(
alertCalledVo
.
getAlarmTypeCode
()))
{
}
else
if
(
AlertStageEnums
.
GZWX
.
getId
()
.
equals
(
alertCalledVo
.
getAlarmTypeCode
()))
{
taskType
=
"故障维修单"
;
taskType
=
"故障维修单"
;
}
else
if
(
"962"
.
equals
(
alertCalledVo
.
getAlarmTypeCode
()))
{
}
else
if
(
AlertStageEnums
.
TSZX
.
getId
()
.
equals
(
alertCalledVo
.
getAlarmTypeCode
()))
{
taskType
=
"投诉处理单"
;
taskType
=
"投诉处理单"
;
}
}
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$unit"
,
unit
);
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$unit"
,
unit
);
...
...
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 @
6d302577
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.RescueProcessDto
;
...
@@ -95,8 +96,7 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
...
@@ -95,8 +96,7 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
Date
rescueTime
=
rescueProcessDto
.
getRescueTime
();
Date
rescueTime
=
rescueProcessDto
.
getRescueTime
();
if
(
arriveTime
!=
null
&&
dispatchTime
!=
null
)
{
if
(
arriveTime
!=
null
&&
dispatchTime
!=
null
)
{
Long
arriveTimes
=
arriveTime
.
getTime
()
-
dispatchTime
.
getTime
();
// 相差毫秒数
Long
arriveTimes
=
arriveTime
.
getTime
()
-
dispatchTime
.
getTime
();
// 相差毫秒数
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
//这里想要只保留分秒可以写成"mm:ss"
String
hms
=
DateUtils
.
getTimestr
(
arriveTime
,
dispatchTime
);
String
hms
=
formatter
.
format
(
arriveTimes
);
rescueProcessDto
.
setIsTimeout
(
arriveTimes
<
1800000
?
false
:
true
);
rescueProcessDto
.
setIsTimeout
(
arriveTimes
<
1800000
?
false
:
true
);
rescueProcessDto
.
setArriveUseTime
(
hms
);
rescueProcessDto
.
setArriveUseTime
(
hms
);
}
}
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
6d302577
...
@@ -1907,6 +1907,7 @@
...
@@ -1907,6 +1907,7 @@
pp.belong_system_id systemId,
pp.belong_system_id systemId,
pp.belong_system_name systemName,
pp.belong_system_name systemName,
pp.address address,
pp.address address,
pp.original_id equipId,
CONCAT(pp.address, pp.building_name) buildingName
CONCAT(pp.address, pp.building_name) buildingName
FROM p_check pc
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_point pp ON pp.id = pc.point_id
...
@@ -1937,6 +1938,7 @@
...
@@ -1937,6 +1938,7 @@
<include
refid=
"mobile-check-time-last-month"
></include>
<include
refid=
"mobile-check-time-last-month"
></include>
</if>
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"equipId != null and equipId != '' "
>
and a.equipId = #{equipId}
</if>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != '' "
>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != '' "
>
AND (
AND (
(
(
...
...
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