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
4c528941
Commit
4c528941
authored
Jul 24, 2024
by
tianyiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents
65bc5f8a
4c147ab4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
13 deletions
+54
-13
DispatchTaskMapper.java
...s/boot/module/elevator/api/mapper/DispatchTaskMapper.java
+3
-0
DispatchTaskMapper.xml
...6333-api/src/main/resources/mapper/DispatchTaskMapper.xml
+21
-0
DPStatisticsController.java
...odule/elevator/biz/controller/DPStatisticsController.java
+1
-1
DPStatisticsServiceImpl.java
...le/elevator/biz/service/impl/DPStatisticsServiceImpl.java
+28
-10
JgChangeRegistrationTransferMapper.xml
...n/resources/mapper/JgChangeRegistrationTransferMapper.xml
+1
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+0
-1
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/java/com/yeejoin/amos/boot/module/elevator/api/mapper/DispatchTaskMapper.java
View file @
4c528941
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.elevator.api.entity.DispatchTask;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.elevator.api.entity.DispatchTask;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 派遣任务 Mapper 接口
* 派遣任务 Mapper 接口
...
@@ -24,4 +25,6 @@ public interface DispatchTaskMapper extends BaseMapper<DispatchTask> {
...
@@ -24,4 +25,6 @@ public interface DispatchTaskMapper extends BaseMapper<DispatchTask> {
List
<
WechatMyTaskListDto
>
getTaskListByPhonePager
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"current"
)
Long
current
);
List
<
WechatMyTaskListDto
>
getTaskListByPhonePager
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"current"
)
Long
current
);
List
<
MainPersonDto
>
todayTaskPerson
();
List
<
MainPersonDto
>
todayTaskPerson
();
List
<
Map
<
String
,
Object
>>
rankUnitByRescueTime
(
@Param
(
"regionCode"
)
String
regionCode
);
}
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/resources/mapper/DispatchTaskMapper.xml
View file @
4c528941
...
@@ -106,5 +106,26 @@
...
@@ -106,5 +106,26 @@
where to_days(t.dispatch_time) = TO_DAYS(now())
where to_days(t.dispatch_time) = TO_DAYS(now())
</select>
</select>
<select
id=
"rankUnitByRescueTime"
resultType=
"java.util.Map"
>
SELECT
tac.city,
tdt.sequence_nbr as sequenceNbr,
tdt.response_org_name as maintUnit,
AVG (TIMESTAMPDIFF (SECOND, tdt.arrive_time, tdt.save_time)) AS avgTime
FROM
tz_dispatch_task tdt
LEFT JOIN tz_alert_called tac ON tdt.alert_id = tac.sequence_nbr
LEFT JOIN tz_base_enterprise_info tbei ON tdt.response_org_id = tbei.sequence_nbr
WHERE
tac.alarm_type_code = '960'
AND tdt.org_type_code = 'repairUnit'
AND tac.biz_org_code LIKE concat(#{regionCode}, '%')
AND tdt.arrive_time IS NOT NULL
AND tdt.save_time IS NOT NULL
GROUP BY
tdt.response_org_id
ORDER BY
timeAvg
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/DPStatisticsController.java
View file @
4c528941
...
@@ -122,7 +122,7 @@ public class DPStatisticsController {
...
@@ -122,7 +122,7 @@ public class DPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏-应急-维保单位平均救援时间排名"
,
notes
=
"大屏-应急-维保单位平均救援时间排名"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏-应急-维保单位平均救援时间排名"
,
notes
=
"大屏-应急-维保单位平均救援时间排名"
)
@PostMapping
(
value
=
"/yj/rankUnitByRescueTime"
)
@PostMapping
(
value
=
"/yj/rankUnitByRescueTime"
)
public
ResponseModel
<
List
<
AlertMaintenanceUnitStatisticsDto
>>
rankUnitByRescueTime
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>
>>
rankUnitByRescueTime
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
throws
Exception
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/DPStatisticsServiceImpl.java
View file @
4c528941
...
@@ -32,6 +32,7 @@ import java.time.format.DateTimeFormatter;
...
@@ -32,6 +32,7 @@ import java.time.format.DateTimeFormatter;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.ChronoUnit
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -57,6 +58,8 @@ public class DPStatisticsServiceImpl {
...
@@ -57,6 +58,8 @@ public class DPStatisticsServiceImpl {
private
AlertStatisticsMapper
alertStatisticsMapper
;
private
AlertStatisticsMapper
alertStatisticsMapper
;
private
DispatchTaskMapper
dispatchTaskMapper
;
@Autowired
@Autowired
AlertCalledServiceImpl
alertCalledService
;
AlertCalledServiceImpl
alertCalledService
;
...
@@ -64,7 +67,7 @@ public class DPStatisticsServiceImpl {
...
@@ -64,7 +67,7 @@ public class DPStatisticsServiceImpl {
private
static
Map
<
String
,
List
<
RegionModel
>>
regionChildRegionMap
=
new
ConcurrentHashMap
<>();
private
static
Map
<
String
,
List
<
RegionModel
>>
regionChildRegionMap
=
new
ConcurrentHashMap
<>();
public
DPStatisticsServiceImpl
(
YjBaseMapper
yjBaseMapper
,
AlertCalledMapper
alertCalledMapper
,
ElevatorMapper
elevatorMapper
,
AlertRescueStatisticsMapper
alertRescueStatisticsMapper
,
AlertUseUnitStatisticsMapper
alertUseUnitStatisticsMapper
,
AlertMaintenanceUnitStatisticsMapper
alertMaintenanceUnitStatisticsMapper
,
AlertStatisticsMapper
alertStatisticsMapper
)
{
public
DPStatisticsServiceImpl
(
YjBaseMapper
yjBaseMapper
,
AlertCalledMapper
alertCalledMapper
,
ElevatorMapper
elevatorMapper
,
AlertRescueStatisticsMapper
alertRescueStatisticsMapper
,
AlertUseUnitStatisticsMapper
alertUseUnitStatisticsMapper
,
AlertMaintenanceUnitStatisticsMapper
alertMaintenanceUnitStatisticsMapper
,
AlertStatisticsMapper
alertStatisticsMapper
,
DispatchTaskMapper
dispatchTaskMapper
)
{
this
.
yjBaseMapper
=
yjBaseMapper
;
this
.
yjBaseMapper
=
yjBaseMapper
;
this
.
alertCalledMapper
=
alertCalledMapper
;
this
.
alertCalledMapper
=
alertCalledMapper
;
this
.
elevatorMapper
=
elevatorMapper
;
this
.
elevatorMapper
=
elevatorMapper
;
...
@@ -72,6 +75,7 @@ public class DPStatisticsServiceImpl {
...
@@ -72,6 +75,7 @@ public class DPStatisticsServiceImpl {
this
.
alertUseUnitStatisticsMapper
=
alertUseUnitStatisticsMapper
;
this
.
alertUseUnitStatisticsMapper
=
alertUseUnitStatisticsMapper
;
this
.
alertMaintenanceUnitStatisticsMapper
=
alertMaintenanceUnitStatisticsMapper
;
this
.
alertMaintenanceUnitStatisticsMapper
=
alertMaintenanceUnitStatisticsMapper
;
this
.
alertStatisticsMapper
=
alertStatisticsMapper
;
this
.
alertStatisticsMapper
=
alertStatisticsMapper
;
this
.
dispatchTaskMapper
=
dispatchTaskMapper
;
}
}
public
JSONObject
eventStatByDay
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
public
JSONObject
eventStatByDay
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
...
@@ -199,16 +203,30 @@ public class DPStatisticsServiceImpl {
...
@@ -199,16 +203,30 @@ public class DPStatisticsServiceImpl {
return
Bean
.
toModels
(
alertUseUnitStatistics
,
AlertUseUnitStatisticsDto
.
class
);
return
Bean
.
toModels
(
alertUseUnitStatistics
,
AlertUseUnitStatisticsDto
.
class
);
}
}
public
List
<
AlertMaintenanceUnitStatisticsDto
>
rankUnitByRescueTime
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
public
List
<
Map
<
String
,
Object
>>
rankUnitByRescueTime
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
String
date
=
DateUtil
.
formatDate
(
new
Date
(),
"yyyy-MM"
);
String
orgCode
=
this
.
getAndSetOrgCode
(
dpFilterParamDto
);
String
orgCode
=
this
.
getAndSetOrgCode
(
dpFilterParamDto
);
List
<
Map
<
String
,
Object
>>
maps
=
dispatchTaskMapper
.
rankUnitByRescueTime
(
orgCode
);
LambdaQueryWrapper
<
AlertMaintenanceUnitStatistics
>
lambda
=
new
QueryWrapper
<
AlertMaintenanceUnitStatistics
>().
lambda
();
maps
.
stream
().
forEach
(
x
->
{
lambda
.
likeLeft
(
AlertMaintenanceUnitStatistics:
:
getSupervisoryUnitOrgCode
,
orgCode
);
String
avgTime
=
""
;
lambda
.
eq
(
AlertMaintenanceUnitStatistics
::
getStatisticsDate
,
date
);
Long
seconds
=
Long
.
valueOf
(
x
.
get
(
"avgTime"
).
toString
());
List
<
AlertMaintenanceUnitStatistics
>
alertMaintenanceUnitStatistics
=
alertMaintenanceUnitStatisticsMapper
.
selectList
(
lambda
);
long
days
=
TimeUnit
.
SECONDS
.
toDays
(
seconds
);
List
<
AlertMaintenanceUnitStatisticsDto
>
models
=
Bean
.
toModels
(
alertMaintenanceUnitStatistics
,
AlertMaintenanceUnitStatisticsDto
.
class
);
long
hours
=
TimeUnit
.
SECONDS
.
toHours
(
seconds
)
-
TimeUnit
.
DAYS
.
toHours
(
days
);
return
models
;
long
minutes
=
TimeUnit
.
SECONDS
.
toMinutes
(
seconds
)
-
TimeUnit
.
HOURS
.
toMinutes
(
hours
);
if
(!
ValidationUtil
.
isEmpty
(
days
)
&&
days
>
0
){
avgTime
=
avgTime
+
days
+
"天"
;
}
if
(!
ValidationUtil
.
isEmpty
(
hours
)
&&
hours
>
0
){
avgTime
=
avgTime
+
hours
+
"小时"
;
}
if
(!
ValidationUtil
.
isEmpty
(
minutes
)
&&
minutes
>
0
){
avgTime
=
avgTime
+
minutes
+
"分钟"
;
}
if
(
seconds
<
60
){
avgTime
=
avgTime
+
seconds
+
"秒"
;
}
x
.
put
(
"avgTime"
,
avgTime
);
});
return
maps
;
}
}
public
JSONObject
regionEventRank
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
public
JSONObject
regionEventRank
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationTransferMapper.xml
View file @
4c528941
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
select change_data
select change_data
from tzs_jg_registration_history his,
from tzs_jg_registration_history his,
tzs_jg_change_registration_transfer crt
tzs_jg_change_registration_transfer crt
where crt.
sequence_nbr
= his.current_document_id
where crt.
apply_no
= his.current_document_id
and crt.audit_status in ('三级待受理', '二级待受理', '一级待受理')
and crt.audit_status in ('三级待受理', '二级待受理', '一级待受理')
and his.registration_class = '移装变更登记'
and his.registration_class = '移装变更登记'
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationTransferServiceImpl.java
View file @
4c528941
...
@@ -776,7 +776,6 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -776,7 +776,6 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
//流程执行完成后,更新设备使用信息
//流程执行完成后,更新设备使用信息
JgRegistrationHistory
historyData
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
JgRegistrationHistory
historyData
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgChangeRegistrationTransfer
.
getApplyNo
()));
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgChangeRegistrationTransfer
.
getApplyNo
()));
this
.
updateByFlowEnd
(
jgChangeRegistrationTransfer
.
getSequenceNbr
().
toString
(),
historyData
);
this
.
updateByFlowEnd
(
jgChangeRegistrationTransfer
.
getSequenceNbr
().
toString
(),
historyData
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
map
.
put
(
"taskStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
...
...
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