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
ff9038aa
Commit
ff9038aa
authored
Mar 18, 2024
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增工单处理状态
parent
79dd6a46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
24 deletions
+51
-24
TdHygfJpInverterWarnDto.java
...mos/boot/module/hygf/api/dto/TdHygfJpInverterWarnDto.java
+3
-0
TdHygfJpInverterWarnMapper.xml
.../resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
+6
-6
TdHygfJpInverterWarnController.java
...e/hygf/biz/controller/TdHygfJpInverterWarnController.java
+17
-8
TdHygfJpInverterWarnServiceImpl.java
...ygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
+25
-10
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/TdHygfJpInverterWarnDto.java
View file @
ff9038aa
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -221,4 +222,6 @@ public class TdHygfJpInverterWarnDto {
private
Long
sequenceNbr
;
private
String
ticketStatus
;
private
List
<
HYGFMaintenanceTickets
>
listTickets
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInverterWarnMapper.xml
View file @
ff9038aa
...
...
@@ -74,9 +74,9 @@
<if
test=
"state != null and state != ''"
>
AND `state` = #{state}
</if>
<if
test=
"handlerStatus != null and handlerStatus != ''"
>
AND handler_status = #{handlerStatus}
</if
>
<!-- <if test="handlerStatus != null and handlerStatus != ''">--
>
<!-- AND handler_status = #{handlerStatus}-->
<!-- </if>--
>
<if
test=
"level != null and level != ''"
>
AND `level` = #{level}
</if>
...
...
@@ -118,9 +118,9 @@
<if
test=
"state != null and state != ''"
>
AND handler_status = #{state}
</if>
<if
test=
"handlerStatus != null and handlerStatus != ''"
>
AND handler_status = #{handlerStatus}
</if
>
<!-- <if test="handlerStatus != null and handlerStatus != ''">--
>
<!-- AND handler_status = #{handlerStatus}-->
<!-- </if>--
>
<if
test=
"level != null and level != ''"
>
AND level = #{level}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInverterWarnController.java
View file @
ff9038aa
...
...
@@ -2,14 +2,17 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import
cn.hutool.core.collection.CollectionUtil
;
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.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpStation
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpPersonStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper
;
...
...
@@ -49,6 +52,8 @@ public class TdHygfJpInverterWarnController extends BaseController {
TdHygfJpInverterWarnMapper
tdHygfJpInverterWarnMapper
;
@Autowired
JpStationMapper
jpStationMapper
;
@Autowired
HYGFMaintenanceTicketsMapper
hygfMaintenanceTicketsMapper
;
/**
* 新增户用光伏监盘逆变器报警表
...
...
@@ -126,7 +131,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器报警表分页查询"
,
notes
=
"户用光伏监盘逆变器报警表分页查询"
)
public
ResponseModel
<
Page
<
TdHygfJpInverterWarnDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
...
...
@@ -179,11 +184,6 @@ public class TdHygfJpInverterWarnController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>
>
selectcount
(
JpStationDto
reviewDto
)
{
LambdaQueryWrapper
<
JpStation
>
qugda
=
new
LambdaQueryWrapper
<>();
//获取当前人管理场站
if
(
reviewDto
.
getThirdStationId
()==
null
){
//获取当前人管理场站
...
...
@@ -194,8 +194,6 @@ public class TdHygfJpInverterWarnController extends BaseController {
if
(
pPersonStation
==
null
||
pPersonStation
.
isEmpty
()){
return
ResponseHelper
.
buildResponse
(
null
);
}
List
ids
=
null
;
if
(
pPersonStation
!=
null
&&!
pPersonStation
.
isEmpty
()){
ids
=
new
ArrayList
();
...
...
@@ -293,6 +291,17 @@ public class TdHygfJpInverterWarnController extends BaseController {
}
result
.
setTotal
(
tdHygfJpInverterWarnServiceImpl
.
selectWarnListTotal
(
state
,
level
,
minvalue
,
maxValue
,
snCode
,
stationId
,
startTime
,
endTime
,
content
,
handlerStatus
));
List
<
Long
>
waringIds
=
maps
.
stream
().
map
(
tdHygfJpInverterWarnDto
->
tdHygfJpInverterWarnDto
.
getCreatedTime
()).
collect
(
Collectors
.
toList
());
List
<
HYGFMaintenanceTickets
>
hygfMaintenanceTicketsList
=
hygfMaintenanceTicketsMapper
.
selectList
(
new
QueryWrapper
<
HYGFMaintenanceTickets
>().
in
(
"warning_id"
,
waringIds
));
maps
.
forEach
(
tdHygfJpInverterWarnDto
->
{
Set
<
String
>
status
=
hygfMaintenanceTicketsList
.
stream
().
filter
(
hygfmaintenanceTickets
->
tdHygfJpInverterWarnDto
.
getCreatedTime
().
equals
(
hygfmaintenanceTickets
.
getWarningId
())).
map
(
HYGFMaintenanceTickets:
:
getHandlerStatus
).
collect
(
Collectors
.
toSet
());
if
(
status
.
contains
(
"未处理"
)){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"处理中"
);
}
if
(
status
.
contains
(
"已处理"
)&&
status
.
size
()==
1
){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"已处理"
);
}
});
result
.
setRecords
(
maps
);
return
ResponseHelper
.
buildResponse
(
result
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInverterWarnServiceImpl.java
View file @
ff9038aa
...
...
@@ -49,10 +49,10 @@ public class TdHygfJpInverterWarnServiceImpl
int
pageNum
=
(
int
)
pageParam
.
getCurrent
();
int
pageSize
=
(
int
)
pageParam
.
getSize
();
PageHelper
.
startPage
(
pageNum
,
pageSize
);
//
if (tdHygfJpInverterWarnDto.getState() != null) {
//
String[] s = tdHygfJpInverterWarnDto.getState().split(",");
//
tdHygfJpInverterWarnDto.setStates(Arrays.asList(s));
//
}
if
(
tdHygfJpInverterWarnDto
.
getState
()
!=
null
)
{
String
[]
s
=
tdHygfJpInverterWarnDto
.
getState
().
split
(
","
);
tdHygfJpInverterWarnDto
.
setStates
(
Arrays
.
asList
(
s
));
}
if
(
tdHygfJpInverterWarnDto
.
getStationName
()
!=
null
)
{
LambdaQueryWrapper
<
JpStation
>
wapper
=
new
LambdaQueryWrapper
<
JpStation
>().
like
(
JpStation:
:
getName
,
tdHygfJpInverterWarnDto
.
getStationName
());
...
...
@@ -63,10 +63,10 @@ public class TdHygfJpInverterWarnServiceImpl
List
<
String
>
ids
=
sList
.
stream
().
map
(
i
->
i
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
tdHygfJpInverterWarnDto
.
setStationIds
(
ids
);
}
if
(
tdHygfJpInverterWarnDto
.
getHandlerStatus
()
!=
null
)
{
String
[]
s
=
tdHygfJpInverterWarnDto
.
getHandlerStatus
().
split
(
","
);
tdHygfJpInverterWarnDto
.
setListHandlerStatus
(
Arrays
.
asList
(
s
));
}
//
if (tdHygfJpInverterWarnDto.getHandlerStatus() != null) {
//
String[] s = tdHygfJpInverterWarnDto.getHandlerStatus().split(",");
//
tdHygfJpInverterWarnDto.setListHandlerStatus(Arrays.asList(s));
//
}
List
<
TdHygfJpInverterWarnDto
>
list
=
new
ArrayList
<>();
if
(
tdHygfJpInverterWarnDto
.
getStationIds
().
isEmpty
())
{
list
=
this
.
baseMapper
.
list
(
tdHygfJpInverterWarnDto
);
...
...
@@ -89,6 +89,15 @@ public class TdHygfJpInverterWarnServiceImpl
});
}
}
List
<
Long
>
waringIds
=
list
.
stream
().
map
(
tdHygfJpInverterWarnDto1
->
tdHygfJpInverterWarnDto1
.
getCreatedTime
()).
collect
(
Collectors
.
toList
());
List
<
HYGFMaintenanceTickets
>
hygfMaintenanceTicketsList
=
hygfMaintenanceTicketsMapper
.
selectList
(
new
QueryWrapper
<
HYGFMaintenanceTickets
>().
in
(
"warning_id"
,
waringIds
));
Set
<
String
>
status
=
hygfMaintenanceTicketsList
.
stream
().
filter
(
hygfmaintenanceTickets
->
tdHygfJpInverterWarnDto
.
getCreatedTime
().
equals
(
hygfmaintenanceTickets
.
getWarningId
())).
map
(
HYGFMaintenanceTickets:
:
getHandlerStatus
).
collect
(
Collectors
.
toSet
());
if
(
status
.
contains
(
"未处理"
)){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"处理中"
);
}
if
(
status
.
contains
(
"已处理"
)&&
status
.
size
()==
1
){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"已处理"
);
}
PageInfo
<
TdHygfJpInverterWarnDto
>
page
=
new
PageInfo
(
list
);
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
TdHygfJpInverterWarnDto
>
pagenew
=
new
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
TdHygfJpInverterWarnDto
>();
pagenew
.
setCurrent
(
pageNum
);
...
...
@@ -134,8 +143,14 @@ public class TdHygfJpInverterWarnServiceImpl
}
}
if
(
hygfMaintenanceTickets
.
size
()>
0
){
HYGFMaintenanceTickets
hygfMaintenanceTickets1
=
hygfMaintenanceTickets
.
get
(
0
);
BeanUtil
.
copyProperties
(
hygfMaintenanceTickets1
,
tdHygfJpInverterWarnDto
,
"handlerStatus"
);
Set
<
String
>
status
=
hygfMaintenanceTickets
.
stream
().
filter
(
hygfmaintenanceTickets
->
tdHygfJpInverterWarnDto
.
getCreatedTime
().
equals
(
hygfmaintenanceTickets
.
getWarningId
())).
map
(
HYGFMaintenanceTickets:
:
getHandlerStatus
).
collect
(
Collectors
.
toSet
());
if
(
status
.
contains
(
"未处理"
)){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"处理中"
);
}
if
(
status
.
contains
(
"已处理"
)&&
status
.
size
()==
1
){
tdHygfJpInverterWarnDto
.
setTicketStatus
(
"已处理"
);
}
tdHygfJpInverterWarnDto
.
setListTickets
(
hygfMaintenanceTickets
);
}
return
tdHygfJpInverterWarnDto
;
}
...
...
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