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
84efc3c6
Commit
84efc3c6
authored
Aug 11, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新水源
parent
e4cf571b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
191 additions
and
17 deletions
+191
-17
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+3
-0
WaterResourceMapper.java
...os/boot/module/common/api/mapper/WaterResourceMapper.java
+4
-0
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+29
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+21
-0
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+24
-2
DCenterController.java
...com/yeejoin/equipmanage/controller/DCenterController.java
+19
-10
EquipmentSpecificController.java
...n/equipmanage/controller/EquipmentSpecificController.java
+22
-1
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+4
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+1
-1
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+1
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+2
-2
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+55
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+6
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
84efc3c6
...
@@ -417,4 +417,7 @@ public interface EquipFeignClient {
...
@@ -417,4 +417,7 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"equipSpecific/getListByEquipmentCodeEQ/{code}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"equipSpecific/getListByEquipmentCodeEQ/{code}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getListByEquipmentCodeEQ
(
@PathVariable
(
"code"
)
String
code
);
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getListByEquipmentCodeEQ
(
@PathVariable
(
"code"
)
String
code
);
@RequestMapping
(
value
=
"equipSpecific/getListByEquipmentIds"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getListByEquipmentSpesById
(
@RequestParam
(
"ids"
)
String
ids
,
@RequestParam
(
"type"
)
String
type
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/WaterResourceMapper.java
View file @
84efc3c6
...
@@ -53,4 +53,8 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
...
@@ -53,4 +53,8 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
Map
<
String
,
Object
>
getWaterResourceInfoList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
Map
<
String
,
Object
>
getWaterResourceInfoList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
Map
<
String
,
Object
>
getResourcesCount
();
Map
<
String
,
Object
>
getResourcesCount
();
List
<
String
>
getPoolEquipIds
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
String
>
getOtherResourceEquipIds
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"type"
)
String
type
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
84efc3c6
...
@@ -285,4 +285,33 @@
...
@@ -285,4 +285,33 @@
a.peopleType = '1602'
a.peopleType = '1602'
) run
) run
</select>
</select>
<select
id=
"getPoolEquipIds"
resultType=
"String"
>
select
rp.level_device_id AS equipId
from
cb_water_resource r
left join cb_water_resource_pool rp on r.sequence_nbr = rp.resource_id
where
level_device_id IS NOT NULL
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND r.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
</select>
<select
id=
"getOtherResourceEquipIds"
resultType=
"String"
>
select
r.equip_id AS equipId
from
cb_water_resource r
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
r.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
<if
test=
"type != null and type != ''"
>
AND r.resource_type LIKE concat(#{type}, '%')
</if>
</where>
GROUP BY resource_type
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
84efc3c6
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.github.pagehelper.util.StringUtil
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResubmitCheck
;
import
com.yeejoin.amos.boot.biz.common.annotation.ResubmitCheck
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
...
@@ -18,6 +19,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import
com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -27,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -27,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -632,4 +635,22 @@ public class WaterResourceController extends BaseController {
...
@@ -632,4 +635,22 @@ public class WaterResourceController extends BaseController {
Object
list
=
waterResourceServiceImpl
.
getwaterResourceType
();
Object
list
=
waterResourceServiceImpl
.
getwaterResourceType
();
return
ResponseHelper
.
buildResponse
(
list
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
@GetMapping
(
"/equip/page"
)
@ApiOperation
(
value
=
"消防水源信息分页列表"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getWaterInfoEquipListPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"id"
)
String
id
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
return
CommonResponseUtil
.
success
(
waterResourceServiceImpl
.
getWaterInfoEquipListPage
(
page
,
bizOrgCode
,
id
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
84efc3c6
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.google.common.base.Joiner
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
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.EnumsUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.EnumsUtils
;
...
@@ -16,6 +17,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum;
...
@@ -16,6 +17,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService
;
import
io.github.classgraph.utils.Join
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -511,7 +513,27 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -511,7 +513,27 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
return
list
;
return
list
;
}
}
public
Page
<
Map
<
String
,
Object
>>
getWaterInfoEquipListPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
id
)
{
WaterResource
resource
=
this
.
waterResourceMapper
.
selectById
(
id
);
String
type
=
resource
.
getResourceType
();
if
(
"pool"
.
equalsIgnoreCase
(
type
))
{
List
<
String
>
equipIds
=
this
.
waterResourceMapper
.
getPoolEquipIds
(
bizOrgCode
);
String
ids
=
Joiner
.
on
(
","
).
join
(
equipIds
);
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
response
=
equipFeignClient
.
getListByEquipmentSpesById
(
ids
,
"1"
);
if
(
response
.
getStatus
()
!=
200
)
{
return
new
Page
<>();
}
page
.
setRecords
((
response
.
getResult
()));
}
else
{
List
<
String
>
equipmentIds
=
this
.
waterResourceMapper
.
getOtherResourceEquipIds
(
bizOrgCode
,
type
);
String
equipIdStr
=
Joiner
.
on
(
","
).
join
(
equipmentIds
);
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
response
=
equipFeignClient
.
getListByEquipmentSpesById
(
equipIdStr
,
"0"
);
if
(
response
.
getStatus
()
!=
200
)
{
return
new
Page
<>();
}
page
.
setRecords
(
response
.
getResult
());
}
return
new
Page
<>();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/DCenterController.java
View file @
84efc3c6
...
@@ -208,32 +208,41 @@ public class DCenterController extends AbstractBaseController {
...
@@ -208,32 +208,41 @@ public class DCenterController extends AbstractBaseController {
@GetMapping
(
"/water/statics"
)
@GetMapping
(
"/water/statics"
)
@ApiOperation
(
value
=
"消防水源信息"
)
@ApiOperation
(
value
=
"消防水源信息"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getFireWaterStatics
()
{
public
ResponseModel
getFireWaterStatics
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getFireWaterStatics
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getFireWaterStatics
(
bizOrgCode
));
}
}
@GetMapping
(
"/water/info"
)
@GetMapping
(
"/water/info"
)
@ApiOperation
(
value
=
"消防水源信息饼图统计"
)
@ApiOperation
(
value
=
"消防水源信息饼图统计"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getFireWaterInfo
()
{
public
ResponseModel
getFireWaterInfo
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getFireWaterInfo
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getFireWaterInfo
(
bizOrgCode
));
}
}
@GetMapping
(
"/water/info/page"
)
@GetMapping
(
"/water/info/page"
)
@ApiOperation
(
value
=
"消防水源信息分页列表"
)
@ApiOperation
(
value
=
"消防水源信息分页列表"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getWaterInfoPage
(
CommonPageable
commonPageable
)
{
public
ResponseModel
getWaterInfoPage
(
CommonPageable
commonPageable
,
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"status"
,
required
=
false
)
String
status
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
commonPageable
.
setPageNumber
(
1
);
}
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getWaterInfoPage
(
page
,
bizOrgCode
));
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getWaterInfoPage
(
page
,
bizOrgCode
,
type
,
status
));
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentSpecificController.java
View file @
84efc3c6
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.dto.EquipmentSpecificDto
;
import
com.yeejoin.equipmanage.common.entity.EquipQrcodeRecord
;
import
com.yeejoin.equipmanage.common.entity.EquipQrcodeRecord
;
import
com.yeejoin.equipmanage.common.entity.Equipment
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentDetail
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
com.yeejoin.equipmanage.common.entity.EquipmentSpecific
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
...
@@ -24,6 +25,7 @@ import com.yeejoin.equipmanage.fegin.IotFeign;
...
@@ -24,6 +25,7 @@ import com.yeejoin.equipmanage.fegin.IotFeign;
import
com.yeejoin.equipmanage.mapper.EquipQrcodeRecordMapper
;
import
com.yeejoin.equipmanage.mapper.EquipQrcodeRecordMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.impl.FireFightingSystemServiceImpl
;
import
com.yeejoin.equipmanage.service.impl.FireFightingSystemServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -67,6 +69,9 @@ public class EquipmentSpecificController extends AbstractBaseController {
...
@@ -67,6 +69,9 @@ public class EquipmentSpecificController extends AbstractBaseController {
@Autowired
@Autowired
IEquipmentDetailService
equipmentDetailService
;
IEquipmentDetailService
equipmentDetailService
;
@Autowired
IEquipmentService
equipmentService
;
@Value
(
"${systemctl.sync.switch}"
)
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
private
Boolean
syncSwitch
;
...
@@ -566,6 +571,22 @@ public class EquipmentSpecificController extends AbstractBaseController {
...
@@ -566,6 +571,22 @@ public class EquipmentSpecificController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
indexInfoList
);
return
CommonResponseUtil
.
success
(
indexInfoList
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据装备分类code获取装备list"
,
notes
=
"根据装备分类code获取装备list"
)
public
List
<
Map
<
String
,
Object
>>
getListByEquipmentIds
(
@RequestParam
(
value
=
"ids"
)
String
ids
,
@RequestParam
(
value
=
"type"
)
String
type
){
ReginParams
ReginParams
=
getSelectedOrgInfo
();
String
bizCode
=
ReginParams
.
getPersonIdentity
().
getBizOrgCode
();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
// 1 表示speId 0 表示equipmentId
if
(
"1"
.
equals
(
type
))
{
String
[]
strings
=
ids
.
split
(
","
);
list
=
equipmentSpecificMapper
.
getListByIds
(
strings
,
bizCode
);
}
else
{
Equipment
equipment
=
equipmentService
.
getById
(
ids
);
list
=
equipmentSpecificMapper
.
getListByCode
(
equipment
.
getCode
(),
bizCode
);
}
return
list
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
84efc3c6
...
@@ -284,4 +284,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -284,4 +284,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Map
<
String
,
Object
>
getPointById
(
@Param
(
value
=
"pointId"
)
Long
id
);
Map
<
String
,
Object
>
getPointById
(
@Param
(
value
=
"pointId"
)
Long
id
);
List
<
Map
<
String
,
Object
>>
getListByIds
(
@Param
(
"list"
)
String
[]
list
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getListByCode
(
@Param
(
"code"
)
String
code
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
84efc3c6
...
@@ -700,5 +700,5 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -700,5 +700,5 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
Object
>
getFireWaterInfo
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Map
<
String
,
Object
>
getFireWaterInfo
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
getWaterInfoPage
(
Page
page
,
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
getWaterInfoPage
(
Page
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
84efc3c6
...
@@ -330,6 +330,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -330,6 +330,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Map
<
String
,
Object
>
getFireWaterInfo
(
String
bizOrgCode
);
Map
<
String
,
Object
>
getFireWaterInfo
(
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
getWaterInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
getWaterInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
type
,
String
status
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
84efc3c6
...
@@ -2486,7 +2486,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2486,7 +2486,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
@Override
@Override
public
Page
<
Map
<
String
,
Object
>>
getWaterInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
)
{
public
Page
<
Map
<
String
,
Object
>>
getWaterInfoPage
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
type
,
String
status
)
{
return
fireFightingSystemMapper
.
getWaterInfoPage
(
page
,
bizOrgCode
);
return
fireFightingSystemMapper
.
getWaterInfoPage
(
page
,
bizOrgCode
,
type
,
status
);
}
}
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
84efc3c6
...
@@ -2462,4 +2462,58 @@
...
@@ -2462,4 +2462,58 @@
where p.id = #{pointId}
where p.id = #{pointId}
</select>
</select>
<select
id=
"getListByIds"
resultType=
"Map"
>
SELECT
wes.id,
wes.name,
wes.position,
wes.code,
wes.equipment_code equipmentCode,
wes.realtime_iot_index_name realtimeIotIndexName,
wes.realtime_iot_index_key realtimeIotIndexKey,
wes.realtime_iot_index_value realtimeIotIndexValue,
wes.value_label valueLabel,
wes.realtime_iot_es_index_id realtimeIotSpecificIndexId,
wes.realtime_iot_index_update_date realtiemIotIndexUpdateDate,
wes.realtime_iot_index_id realtimeIotIndexId
FROM
wl_equipment_specific wes
<where>
<if
test=
"list != null and list.length > 0"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"OR"
>
wes.id = #{item}
</foreach>
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and wes.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
</where>
</select>
<select
id=
"getListByCode"
resultType=
"Map"
>
SELECT
wes.id,
wes.name,
wes.position,
wes.code,
wes.equipment_code equipmentCode,
wes.realtime_iot_index_name realtimeIotIndexName,
wes.realtime_iot_index_key realtimeIotIndexKey,
wes.realtime_iot_index_value realtimeIotIndexValue,
wes.value_label valueLabel,
wes.realtime_iot_es_index_id realtimeIotSpecificIndexId,
wes.realtime_iot_index_update_date realtiemIotIndexUpdateDate,
wes.realtime_iot_index_id realtimeIotIndexId
FROM
wl_equipment_specific wes
<where>
<if
test=
"code != null and code != ''"
>
wes.equipment_code = #{code}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and wes.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
84efc3c6
...
@@ -6070,6 +6070,12 @@
...
@@ -6070,6 +6070,12 @@
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
biz_org_code like concat(#{bizOrgCode}, '%')
biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</if>
<if
test=
"type != null and type != ''"
>
AND resource_type = #{type}
</if>
<if
test=
"status != null and status != ''"
>
AND water_status = #{status}
</if>
</where>
</where>
</select>
</select>
<select
id=
"getEquiplistBySystemIdPage"
<select
id=
"getEquiplistBySystemIdPage"
...
...
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