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
7b65b85e
Commit
7b65b85e
authored
Jul 25, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加接口
parent
3b0a1f5f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
0 deletions
+124
-0
PointController.java
...join/amos/patrol/business/controller/PointController.java
+15
-0
PointMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
+6
-0
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+33
-0
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+2
-0
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+68
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
7b65b85e
...
...
@@ -1241,6 +1241,21 @@ public class PointController extends AbstractBaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"关联巡检点分页列表"
,
notes
=
"关联巡检点分页列表"
)
@GetMapping
(
value
=
"/listNew"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointList4RouteNew
(
@ApiParam
(
value
=
"区域"
)
@RequestParam
(
value
=
"riskSourceId"
,
required
=
false
)
Long
riskSourceId
,
@ApiParam
(
value
=
"点编号"
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"点名称"
)
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"10"
)
int
size
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
companyBizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointList4RouteNew
(
companyBizOrgCode
,
riskSourceId
,
pointNo
,
name
,
current
,
size
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点列表"
,
notes
=
"新*查询巡检点列表"
)
@GetMapping
(
value
=
"/route-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
queryPointListByRouteId
(
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
View file @
7b65b85e
...
...
@@ -135,9 +135,15 @@ public interface PointMapper extends BaseMapper {
int
queryPointCount4Route
(
@Param
(
value
=
"structureIdList"
)
List
<
Long
>
structureIdList
,
@Param
(
value
=
"pointNo"
)
String
pointNo
,
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"nullRiskSourceId"
)
boolean
nullRiskSourceId
);
int
queryPointCount4RouteNew
(
@Param
(
value
=
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
value
=
"structureIdList"
)
List
<
Long
>
structureIdList
,
@Param
(
value
=
"pointNo"
)
String
pointNo
,
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"nullRiskSourceId"
)
boolean
nullRiskSourceId
);
List
<
Map
<
String
,
Object
>>
queryPointList4Route
(
@Param
(
value
=
"structureIdList"
)
List
<
Long
>
structureIdList
,
@Param
(
value
=
"pointNo"
)
String
pointNo
,
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"offset"
)
int
offset
,
@Param
(
value
=
"size"
)
int
size
,
@Param
(
value
=
"nullRiskSourceId"
)
boolean
nullRiskSourceId
);
List
<
Map
<
String
,
Object
>>
queryPointList4RouteNew
(
@Param
(
value
=
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
value
=
"structureIdList"
)
List
<
Long
>
structureIdList
,
@Param
(
value
=
"pointNo"
)
String
pointNo
,
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"offset"
)
int
offset
,
@Param
(
value
=
"size"
)
int
size
,
@Param
(
value
=
"nullRiskSourceId"
)
boolean
nullRiskSourceId
);
List
<
Map
<
String
,
Object
>>
queryPointListByRouteId
(
@Param
(
value
=
"routeId"
)
Long
routeId
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
7b65b85e
...
...
@@ -1604,6 +1604,39 @@ public class PointServiceImpl implements IPointService {
return
new
PageImpl
(
list
,
PageRequest
.
of
(
current
-
1
,
size
),
total
);
}
@Override
public
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
)
{
if
(
current
<
1
||
size
<
0
)
{
throw
new
RuntimeException
(
"查询条件有误"
);
}
List
<
Long
>
structureIdList
=
null
;
List
<
Map
<
String
,
Object
>>
list
=
Collections
.
EMPTY_LIST
;
// 传入riskSourceId为-2请求的是巡检点区域为空
if
(
riskSourceId
!=
null
&&
riskSourceId
!=
-
2
)
{
LinkedHashMap
<
String
,
Object
>
o
=
equipFeign
.
getBuildingTree
();
if
(
o
==
null
||!
"200"
.
equals
(
o
.
get
(
"status"
).
toString
()))
{
throw
new
YeeException
(
"获取建筑树出错"
);
}
List
<
Map
<
String
,
Object
>>
buildingTree
=
(
List
<
Map
<
String
,
Object
>>)
o
.
get
(
"result"
);
Map
<
String
,
Object
>
node
=
getAllNodes
(
buildingTree
).
stream
().
filter
(
map
->
riskSourceId
.
toString
().
equals
(
map
.
get
(
"id"
))).
findFirst
().
orElse
(
null
);
if
(
node
!=
null
)
{
structureIdList
=
findBuildChildrenIds
(
node
);
}
}
boolean
nullRiskSourceId
=
false
;
if
(
riskSourceId
!=
null
&&
riskSourceId
==
-
2
)
{
nullRiskSourceId
=
true
;
}
int
total
=
pointMapper
.
queryPointCount4RouteNew
(
bizOrgCode
,
structureIdList
,
pointNo
,
name
,
nullRiskSourceId
);
int
offset
=
(
current
-
1
)
*
size
;
if
(
total
>
offset
)
{
list
=
pointMapper
.
queryPointList4RouteNew
(
bizOrgCode
,
structureIdList
,
pointNo
,
name
,
offset
,
size
,
nullRiskSourceId
);
}
return
new
PageImpl
(
list
,
PageRequest
.
of
(
current
-
1
,
size
),
total
);
}
private
List
<
Map
<
String
,
Object
>>
getAllNodes
(
List
<
Map
<
String
,
Object
>>
buildingTree
)
{
List
<
Map
<
String
,
Object
>>
res
=
new
LinkedList
<>();
if
(
buildingTree
!=
null
&&
!
buildingTree
.
isEmpty
())
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPointService.java
View file @
7b65b85e
...
...
@@ -357,6 +357,8 @@ public interface IPointService {
Page
queryPointList4Route
(
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
);
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
);
List
queryPointListByRouteId
(
Long
routeId
);
List
queryEquipListByPointId
(
Long
pointId
);
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
7b65b85e
...
...
@@ -1078,6 +1078,36 @@
</where>
</select>
<select
id=
"queryPointCount4RouteNew"
parameterType=
"long"
resultType=
"int"
>
SELECT
count(1)
FROM
p_point pp
LEFT JOIN wl_warehouse_structure wws
ON pp.risk_source_id = wws.source_id
<where>
<if
test=
"structureIdList != null and structureIdList.size > 0"
>
AND pp.risk_source_id in
<foreach
collection=
"structureIdList"
open=
"("
close=
")"
separator=
","
item=
"sid"
>
#{sid}
</foreach>
</if>
<if
test=
"name != null and name.length > 0"
>
AND pp.name LIKE concat("%", #{name}, "%")
</if>
<if
test=
"pointNo != null and pointNo.length > 0"
>
AND pp.point_no LIKE concat("%", #{pointNo}, "%")
</if>
<if
test=
"nullRiskSourceId == true"
>
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='')
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '' "
>
AND PP.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
AND pp.is_delete = 0
</where>
</select>
<select
id=
"queryPointList4Route"
parameterType=
"long"
resultType=
"map"
>
SELECT
pp.id pointId
...
...
@@ -1086,6 +1116,7 @@
, wws.name area
, pp.address pointAddress
, wws.full_name position
, pp.biz_org_name bizOrgName
FROM
p_point pp
LEFT JOIN wl_warehouse_structure wws
...
...
@@ -1111,6 +1142,43 @@
LIMIT #{offset}, #{size}
</select>
<select
id=
"queryPointList4RouteNew"
parameterType=
"long"
resultType=
"map"
>
SELECT
pp.id pointId
, pp.name pointName
, pp.point_no pointNo
, wws.name area
, pp.address pointAddress
, wws.full_name position
, pp.biz_org_name bizOrgName
FROM
p_point pp
LEFT JOIN wl_warehouse_structure wws
ON pp.risk_source_id = wws.source_id
<where>
<if
test=
"structureIdList != null and structureIdList.size > 0"
>
AND pp.risk_source_id in
<foreach
collection=
"structureIdList"
open=
"("
close=
")"
separator=
","
item=
"sid"
>
#{sid}
</foreach>
</if>
<if
test=
"name != null and name.length > 0"
>
AND pp.name LIKE concat("%", #{name}, "%")
</if>
<if
test=
"pointNo != null and pointNo.length > 0"
>
AND pp.point_no LIKE concat("%", #{pointNo}, "%")
</if>
<if
test=
"nullRiskSourceId == true"
>
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='' )
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '' "
>
AND PP.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
AND pp.is_delete = 0
</where>
LIMIT #{offset}, #{size}
</select>
<select
id=
"queryPointListByRouteId"
parameterType=
"long"
resultType=
"map"
>
SELECT
pp.id pointId
...
...
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