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
fc32f558
Commit
fc32f558
authored
Aug 15, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
859f7408
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
8 deletions
+42
-8
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+10
-0
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+2
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+14
-0
PointController.java
...join/amos/patrol/business/controller/PointController.java
+4
-2
PointMapper.java
.../yeejoin/amos/patrol/business/dao/mapper/PointMapper.java
+2
-2
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+3
-3
IPointService.java
...oin/amos/patrol/business/service/intfc/IPointService.java
+1
-1
pointMapper.xml
...ystem-patrol/src/main/resources/db/mapper/pointMapper.xml
+6
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
fc32f558
...
@@ -4,6 +4,7 @@ import java.util.LinkedHashMap;
...
@@ -4,6 +4,7 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -351,4 +352,13 @@ public class BuildingController extends AbstractBaseController {
...
@@ -351,4 +352,13 @@ public class BuildingController extends AbstractBaseController {
return
buildService
.
getBuildingTreeInOrgCode
(
bizOrgCode
);
return
buildService
.
getBuildingTreeInOrgCode
(
bizOrgCode
);
}
}
@ApiOperation
(
value
=
"查询指定单位的建筑树"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/myTree"
)
public
List
<
BuildingTreeVo
>
buildingTreeByMyCompany
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
buildService
.
getBuildingTreeInMyOrgCode
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
fc32f558
...
@@ -331,5 +331,7 @@ public interface IBuilldService extends IService<Building> {
...
@@ -331,5 +331,7 @@ public interface IBuilldService extends IService<Building> {
*/
*/
List
<
BuildingTreeVo
>
getBuildingTreeInOrgCode
(
String
bizOrgCode
);
List
<
BuildingTreeVo
>
getBuildingTreeInOrgCode
(
String
bizOrgCode
);
List
<
BuildingTreeVo
>
getBuildingTreeInMyOrgCode
(
String
bizOrgCode
);
List
<
OrgMenuDto
>
companyTreeByUserAndType
();
List
<
OrgMenuDto
>
companyTreeByUserAndType
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
fc32f558
...
@@ -47,6 +47,7 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
...
@@ -47,6 +47,7 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -1490,6 +1491,19 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1490,6 +1491,19 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
public
List
<
BuildingTreeVo
>
getBuildingTreeInMyOrgCode
(
String
bizOrgCode
)
{
//如果传递的为部门bizOrgCode 取其上级单位下的建筑
ResponseModel
<
OrgUsrDto
>
companyByBizOrgCodeList
=
jcsFeign
.
getCompanyByBizOrgCodeList
(
bizOrgCode
);
String
companyCode
=
companyByBizOrgCodeList
.
getResult
().
getBizOrgCode
();
List
<
BuildingTreeVo
>
buildingTreeVos
=
this
.
getBuildingTreeVos
(
true
);
List
<
BuildingTreeVo
>
orgBuildingTreeVos
=
buildingTreeVos
.
stream
().
filter
(
b
->
b
.
getBizOrgCode
()
!=
null
&&
b
.
getBizOrgCode
().
startsWith
(
companyCode
)).
collect
(
Collectors
.
toList
());
return
buildingTreeVos
.
stream
().
filter
(
b
->
"-1"
.
equals
(
b
.
getParentId
())).
peek
(
b
->
{
b
.
setId
(
0L
);
b
.
setChildren
(
this
.
getCompanyBuildingChildrenTree
(
b
.
getId
().
toString
(),
orgBuildingTreeVos
));
}).
collect
(
Collectors
.
toList
());
}
@Override
@Override
public
List
<
OrgMenuDto
>
companyTreeByUserAndType
()
{
public
List
<
OrgMenuDto
>
companyTreeByUserAndType
()
{
return
jcsRemoteService
.
getCompanyDeptTreeWithAuth
(
authKey
,
"COMPANY"
);
return
jcsRemoteService
.
getCompanyDeptTreeWithAuth
(
authKey
,
"COMPANY"
);
...
...
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 @
fc32f558
...
@@ -1364,11 +1364,12 @@ public class PointController extends AbstractBaseController {
...
@@ -1364,11 +1364,12 @@ public class PointController extends AbstractBaseController {
@ApiParam
(
value
=
"点编号"
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"点编号"
)
@RequestParam
(
value
=
"pointNo"
,
required
=
false
)
String
pointNo
,
@ApiParam
(
value
=
"点名称"
)
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@ApiParam
(
value
=
"点名称"
)
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"0"
)
int
pageNumber
,
@RequestParam
(
value
=
"pageNumber"
,
defaultValue
=
"0"
)
int
pageNumber
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
int
pageSize
)
{
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
value
=
"companyId"
)
String
companyId
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
companyBizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
String
companyBizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointList4RouteNew
(
companyBizOrgCode
,
riskSourceId
,
pointNo
,
name
,
pageNumber
,
pageSize
));
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointList4RouteNew
(
companyBizOrgCode
,
riskSourceId
,
pointNo
,
name
,
pageNumber
,
pageSize
,
companyId
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -1379,6 +1380,7 @@ public class PointController extends AbstractBaseController {
...
@@ -1379,6 +1380,7 @@ public class PointController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointListByRouteId
(
routeId
));
return
CommonResponseUtil
.
success
(
iPointService
.
queryPointListByRouteId
(
routeId
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表"
,
notes
=
"新*查询巡检点对应设备列表"
)
@ApiOperation
(
value
=
"新*查询巡检点对应设备列表"
,
notes
=
"新*查询巡检点对应设备列表"
)
@GetMapping
(
value
=
"/equip-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
@GetMapping
(
value
=
"/equip-list-new"
,
produces
=
"application/json;charset=UTF-8"
)
...
...
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 @
fc32f558
...
@@ -138,13 +138,13 @@ public interface PointMapper extends BaseMapper {
...
@@ -138,13 +138,13 @@ 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
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
);
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
,
@Param
(
value
=
"companyId"
)
String
companyId
);
List
<
Map
<
String
,
Object
>>
queryPointList4Route
(
@Param
(
value
=
"structureIdList"
)
List
<
Long
>
structureIdList
,
@Param
(
value
=
"pointNo"
)
String
pointNo
,
@Param
(
value
=
"name"
)
String
name
,
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
);
@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
,
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
);
@Param
(
value
=
"offset"
)
int
offset
,
@Param
(
value
=
"size"
)
int
size
,
@Param
(
value
=
"nullRiskSourceId"
)
boolean
nullRiskSourceId
,
@Param
(
value
=
"companyId"
)
String
companyId
);
...
...
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 @
fc32f558
...
@@ -1776,7 +1776,7 @@ public class PointServiceImpl implements IPointService {
...
@@ -1776,7 +1776,7 @@ public class PointServiceImpl implements IPointService {
}
}
@Override
@Override
public
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
)
{
public
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
,
String
companyId
)
{
List
<
Long
>
structureIdList
=
null
;
List
<
Long
>
structureIdList
=
null
;
List
<
Map
<
String
,
Object
>>
list
=
Collections
.
EMPTY_LIST
;
List
<
Map
<
String
,
Object
>>
list
=
Collections
.
EMPTY_LIST
;
// 传入riskSourceId为-2请求的是巡检点区域为空
// 传入riskSourceId为-2请求的是巡检点区域为空
...
@@ -1797,10 +1797,10 @@ public class PointServiceImpl implements IPointService {
...
@@ -1797,10 +1797,10 @@ public class PointServiceImpl implements IPointService {
nullRiskSourceId
=
true
;
nullRiskSourceId
=
true
;
}
}
int
total
=
pointMapper
.
queryPointCount4RouteNew
(
bizOrgCode
,
structureIdList
,
pointNo
,
name
,
nullRiskSourceId
);
int
total
=
pointMapper
.
queryPointCount4RouteNew
(
bizOrgCode
,
structureIdList
,
pointNo
,
name
,
nullRiskSourceId
,
companyId
);
int
offset
=
(
current
-
1
)
*
size
;
int
offset
=
(
current
-
1
)
*
size
;
if
(
total
>
offset
)
{
if
(
total
>
offset
)
{
list
=
pointMapper
.
queryPointList4RouteNew
(
bizOrgCode
,
structureIdList
,
pointNo
,
name
,
offset
,
size
,
nullRiskSourceId
);
list
=
pointMapper
.
queryPointList4RouteNew
(
bizOrgCode
,
structureIdList
,
pointNo
,
name
,
offset
,
size
,
nullRiskSourceId
,
companyId
);
}
}
return
new
PageImpl
(
list
,
PageRequest
.
of
(
current
-
1
,
size
),
total
);
return
new
PageImpl
(
list
,
PageRequest
.
of
(
current
-
1
,
size
),
total
);
}
}
...
...
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 @
fc32f558
...
@@ -361,7 +361,7 @@ public interface IPointService {
...
@@ -361,7 +361,7 @@ public interface IPointService {
Page
queryPointList4Route
(
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
);
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
);
Page
queryPointList4RouteNew
(
String
bizOrgCode
,
Long
riskSourceId
,
String
pointNo
,
String
name
,
int
current
,
int
size
,
String
companyId
);
List
queryPointListByRouteId
(
Long
routeId
);
List
queryPointListByRouteId
(
Long
routeId
);
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/pointMapper.xml
View file @
fc32f558
...
@@ -1229,6 +1229,9 @@
...
@@ -1229,6 +1229,9 @@
<if
test=
"nullRiskSourceId == true"
>
<if
test=
"nullRiskSourceId == true"
>
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='')
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='')
</if>
</if>
<if
test=
"companyId != null and companyId != '' "
>
AND PP.charge_dept_id = #{companyId}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != '' "
>
<if
test=
"bizOrgCode != null and bizOrgCode != '' "
>
AND PP.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
AND PP.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
</if>
...
@@ -1303,6 +1306,9 @@
...
@@ -1303,6 +1306,9 @@
<if
test=
"bizOrgCode != null and bizOrgCode != '' "
>
<if
test=
"bizOrgCode != null and bizOrgCode != '' "
>
AND PP.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
AND PP.biz_org_code LIKE CONCAT (#{bizOrgCode},'%')
</if>
</if>
<if
test=
"companyId != null and companyId != '' "
>
AND PP.charge_dept_id = #{companyId}
</if>
and ( select COUNT(p_point_inputitem.id) fROM p_point_inputitem where p_point_inputitem.point_id =pp.id) >0
and ( select COUNT(p_point_inputitem.id) fROM p_point_inputitem where p_point_inputitem.point_id =pp.id) >0
AND pp.is_delete = 0
AND pp.is_delete = 0
</where>
</where>
...
...
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