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
3b807bba
Commit
3b807bba
authored
May 17, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 设备平台-消防系统配置-系统分组接口开发
parent
07cd621a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
348 additions
and
0 deletions
+348
-0
FireFightingSystemGroupDto.java
...in/equipmanage/common/dto/FireFightingSystemGroupDto.java
+43
-0
SystemEquipmentRelationDto.java
...in/equipmanage/common/dto/SystemEquipmentRelationDto.java
+26
-0
FireFightingSystemGroupEntity.java
...ipmanage/common/entity/FireFightingSystemGroupEntity.java
+43
-0
SystemEquipmentRelationEntity.java
...ipmanage/common/entity/SystemEquipmentRelationEntity.java
+31
-0
SystemGroupShowTypeEnum.java
...oin/equipmanage/common/enums/SystemGroupShowTypeEnum.java
+29
-0
FireFightingSystemGroupController.java
...pmanage/controller/FireFightingSystemGroupController.java
+85
-0
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+2
-0
FireFightingSystemGroupMapper.java
...oin/equipmanage/mapper/FireFightingSystemGroupMapper.java
+9
-0
SystemEquipmentRelationMapper.java
...oin/equipmanage/mapper/SystemEquipmentRelationMapper.java
+9
-0
FireFightingSystemGroupService.java
...n/equipmanage/service/FireFightingSystemGroupService.java
+36
-0
SystemEquipmentRelationService.java
...n/equipmanage/service/SystemEquipmentRelationService.java
+7
-0
FireFightingSystemGroupServiceImpl.java
...nage/service/impl/FireFightingSystemGroupServiceImpl.java
+0
-0
SystemEquipmentRelationServiceImpl.java
...nage/service/impl/SystemEquipmentRelationServiceImpl.java
+11
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+17
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/dto/FireFightingSystemGroupDto.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
common
.
dto
;
import
com.yeejoin.equipmanage.common.entity.FireFightingSystemGroupEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
FireFightingSystemGroupDto
extends
BaseDTO
<
FireFightingSystemGroupEntity
>
{
@ApiModelProperty
(
value
=
"分组名称"
)
private
String
groupName
;
@ApiModelProperty
(
value
=
"分组编码"
)
private
String
groupCode
;
@ApiModelProperty
(
value
=
"展示类型:0-系统部件 1-安措"
)
private
Integer
showType
;
@ApiModelProperty
(
value
=
"系统ID"
)
private
String
systemIds
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
value
=
"分组排序"
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"业务组织编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"业务组织名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"系统与系统部件"
)
private
List
<
SystemEquipmentRelationDto
>
systemEquipmentRelations
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/dto/SystemEquipmentRelationDto.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
common
.
dto
;
import
com.yeejoin.equipmanage.common.entity.SystemEquipmentRelationEntity
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
@Data
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
SystemEquipmentRelationDto
extends
BaseDTO
<
SystemEquipmentRelationEntity
>
{
@ApiModelProperty
(
value
=
"系统ID"
)
private
Long
systemId
;
@ApiModelProperty
(
value
=
"分组编码"
)
private
Long
equipmentId
;
@ApiModelProperty
(
value
=
"类型(0:系统部件、1:安措)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"部件排序"
)
private
Integer
sort
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/FireFightingSystemGroupEntity.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
@Data
@Builder
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"f_fire_fighting_system_group"
)
@ApiModel
(
value
=
"f_fire_fighting_system_group"
,
description
=
"消防系统分组"
)
public
class
FireFightingSystemGroupEntity
extends
BaseEntity
{
@ApiModelProperty
(
value
=
"分组名称"
)
private
String
groupName
;
@ApiModelProperty
(
value
=
"分组编码"
)
private
String
groupCode
;
@ApiModelProperty
(
value
=
"展示类型:0-系统部件 1-安措"
)
private
Integer
showType
;
@ApiModelProperty
(
value
=
"系统ID"
)
private
String
systemIds
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
@ApiModelProperty
(
value
=
"分组排序"
)
private
Integer
sort
;
@ApiModelProperty
(
value
=
"业务组织编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"业务组织名称"
)
private
String
bizOrgName
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/SystemEquipmentRelationEntity.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
@Data
@Builder
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"f_system_equipment_relation"
)
@ApiModel
(
value
=
"f_system_equipment_relation"
,
description
=
"消防系统部件关系"
)
public
class
SystemEquipmentRelationEntity
extends
BaseEntity
{
@ApiModelProperty
(
value
=
"系统ID"
)
private
Long
systemId
;
@ApiModelProperty
(
value
=
"分组编码"
)
private
Long
equipmentId
;
@ApiModelProperty
(
value
=
"类型(0:系统部件、1:安措)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"部件排序"
)
private
Integer
sort
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/SystemGroupShowTypeEnum.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
common
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.Objects
;
@Getter
@AllArgsConstructor
public
enum
SystemGroupShowTypeEnum
{
SYSTEM_EQUIPMENT
(
0
,
"系统部件"
),
SECURITY_MEASURE
(
1
,
"安措"
);
private
final
Integer
code
;
private
final
String
value
;
public
static
SystemGroupShowTypeEnum
getEnumByCode
(
Integer
code
)
{
SystemGroupShowTypeEnum
aEnum
=
null
;
for
(
SystemGroupShowTypeEnum
item
:
SystemGroupShowTypeEnum
.
values
())
{
if
(
Objects
.
equals
(
item
.
getCode
(),
code
))
{
aEnum
=
item
;
break
;
}
}
return
aEnum
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemGroupController.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.equipmanage.common.dto.FireFightingSystemGroupDto
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.service.FireFightingSystemGroupService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
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.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Objects
;
@Slf4j
@RestController
@Api
(
tags
=
"消防系统分组"
)
@RequestMapping
(
value
=
"/fire-fighting-system"
)
public
class
FireFightingSystemGroupController
extends
BaseController
{
@Autowired
private
FireFightingSystemGroupService
fireFightingSystemGroupService
;
@PutMapping
(
value
=
"/save"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"添加分组"
,
notes
=
"添加分组"
)
public
ResponseModel
save
(
@RequestBody
FireFightingSystemGroupDto
dto
)
{
if
(!(
Objects
.
nonNull
(
dto
.
getGroupName
())
&&
Objects
.
nonNull
(
dto
.
getShowType
())
&&
Objects
.
nonNull
(
dto
.
getSystemIds
())
&&
!
dto
.
getSystemEquipmentRelations
().
isEmpty
()))
{
return
CommonResponseUtil
.
failure
(
"非法参数"
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
dto
.
setBizOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
dto
.
setBizOrgCode
(
reginParams
.
getCompany
().
getCompanyName
());
return
CommonResponseUtil
.
success
(
fireFightingSystemGroupService
.
saveOrUpdate
(
dto
));
}
@PostMapping
(
value
=
"/update"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新分组"
,
notes
=
"更新分组"
)
public
ResponseModel
update
(
@RequestBody
FireFightingSystemGroupDto
dto
)
{
if
(!(
Objects
.
nonNull
(
dto
.
getId
())
&&
Objects
.
nonNull
(
dto
.
getGroupName
())
&&
Objects
.
nonNull
(
dto
.
getShowType
())
&&
Objects
.
nonNull
(
dto
.
getSystemIds
())
&&
!
dto
.
getSystemEquipmentRelations
().
isEmpty
()))
{
return
CommonResponseUtil
.
failure
(
"非法参数"
);
}
return
CommonResponseUtil
.
success
(
fireFightingSystemGroupService
.
saveOrUpdate
(
dto
));
}
@PostMapping
(
value
=
"/update-group-sort"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新分组展示顺序"
,
notes
=
"更新分组展示顺序"
)
public
ResponseModel
updateGroupSort
(
@RequestBody
List
<
Long
>
groupIds
)
{
if
(
Objects
.
isNull
(
groupIds
)
||
groupIds
.
isEmpty
())
{
return
CommonResponseUtil
.
failure
(
"非法参数"
);
}
fireFightingSystemGroupService
.
updateGroupSort
(
groupIds
);
return
CommonResponseUtil
.
success
();
}
@PostMapping
(
value
=
"/update-system-sort/{groupId}"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新系统展示顺序"
,
notes
=
"更新系统展示顺序"
)
public
ResponseModel
updateSystemSort
(
@PathVariable
Long
groupId
,
@RequestBody
List
<
Long
>
systemIds
)
{
if
(
Objects
.
isNull
(
systemIds
)
||
systemIds
.
isEmpty
())
{
return
CommonResponseUtil
.
failure
(
"非法参数"
);
}
fireFightingSystemGroupService
.
updateSystemSort
(
groupId
,
systemIds
);
return
CommonResponseUtil
.
success
();
}
@GetMapping
(
value
=
"/list"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询分组列表"
,
notes
=
"查询分组列表"
)
public
ResponseModel
list
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
bizOrgCode
=
getOrgCode
();
}
return
CommonResponseUtil
.
success
(
fireFightingSystemGroupService
.
listGroup
(
bizOrgCode
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
3b807bba
...
@@ -29,6 +29,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -29,6 +29,8 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
int
getEquipmentSpeCount
(
Map
<
String
,
Object
>
map
);
int
getEquipmentSpeCount
(
Map
<
String
,
Object
>
map
);
List
<
Map
<
String
,
Object
>>
getEquipmentSpecificCount
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
IPage
<
ComplementCodeVO
>
selectEquipmentSpecific
(
Page
page
,
EquipmentSpecificDTO
equipmentSpecificDTO
);
IPage
<
ComplementCodeVO
>
selectEquipmentSpecific
(
Page
page
,
EquipmentSpecificDTO
equipmentSpecificDTO
);
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemGroupMapper.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.FireFightingSystemGroupEntity
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
FireFightingSystemGroupMapper
extends
BaseMapper
<
FireFightingSystemGroupEntity
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/SystemEquipmentRelationMapper.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.SystemEquipmentRelationEntity
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
SystemEquipmentRelationMapper
extends
BaseMapper
<
SystemEquipmentRelationEntity
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/FireFightingSystemGroupService.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.dto.FireFightingSystemGroupDto
;
import
com.yeejoin.equipmanage.common.entity.FireFightingSystemGroupEntity
;
import
java.util.List
;
public
interface
FireFightingSystemGroupService
extends
IService
<
FireFightingSystemGroupEntity
>
{
/**
* 保存分组
*
* @param fireFightingSystemGroupDto 分组信息
*/
Boolean
saveOrUpdate
(
FireFightingSystemGroupDto
fireFightingSystemGroupDto
);
/**
* 更新分组排序
*/
void
updateGroupSort
(
List
<
Long
>
groupIds
);
/**
* 更新系统排序
*/
void
updateSystemSort
(
Long
groupId
,
List
<
Long
>
systemIds
);
/**
* 获取分组
*
* @param bizOrgCode 业务组织编码
* @return 分组列表
*/
JSONArray
listGroup
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/SystemEquipmentRelationService.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.entity.SystemEquipmentRelationEntity
;
public
interface
SystemEquipmentRelationService
extends
IService
<
SystemEquipmentRelationEntity
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemGroupServiceImpl.java
0 → 100644
View file @
3b807bba
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SystemEquipmentRelationServiceImpl.java
0 → 100644
View file @
3b807bba
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.equipmanage.common.entity.SystemEquipmentRelationEntity
;
import
com.yeejoin.equipmanage.mapper.SystemEquipmentRelationMapper
;
import
com.yeejoin.equipmanage.service.SystemEquipmentRelationService
;
import
org.springframework.stereotype.Service
;
@Service
public
class
SystemEquipmentRelationServiceImpl
extends
ServiceImpl
<
SystemEquipmentRelationMapper
,
SystemEquipmentRelationEntity
>
implements
SystemEquipmentRelationService
{
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
3b807bba
...
@@ -109,6 +109,23 @@
...
@@ -109,6 +109,23 @@
AND code like CONCAT('%',#{code},'%')
AND code like CONCAT('%',#{code},'%')
</if>
</if>
</select>
</select>
<select
id=
"getEquipmentSpecificCount"
resultType=
"Map"
>
SELECT
we.id as id,
we.name as equipmentName,
count(1) as count
FROM
wl_equipment_specific wesp
LEFT JOIN wl_equipment_detail wsd ON wesp.equipment_detail_id = wsd.id
LEFT JOIN wl_equipment we ON wsd.equipment_id = we.id
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND wesp.biz_org_code = concat(#{bizOrgCode},'%')
</if>
</where>
GROUP BY
we.code
</select>
<select
id=
"selectEquipmentSpecific"
resultMap=
"ComplementCode"
>
<select
id=
"selectEquipmentSpecific"
resultMap=
"ComplementCode"
>
SELECT
SELECT
wesp.id id,
wesp.id id,
...
...
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