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
06af89e0
Commit
06af89e0
authored
Nov 09, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改故障案例
parent
090b428d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
40 deletions
+31
-40
FaultCaseImportParam.java
.../yeejoin/equipmanage/common/dto/FaultCaseImportParam.java
+2
-2
FaultCase.java
...java/com/yeejoin/equipmanage/common/entity/FaultCase.java
+2
-8
FaultCaseController.java
...m/yeejoin/equipmanage/controller/FaultCaseController.java
+19
-23
wl-3.6.0.xml
...ot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
+4
-5
FaultCaseMapper.xml
...ystem-equip/src/main/resources/mapper/FaultCaseMapper.xml
+4
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/dto/FaultCaseImportParam.java
View file @
06af89e0
...
...
@@ -23,8 +23,8 @@ public class FaultCaseImportParam {
@Excel
(
name
=
"消防系统"
,
orderNum
=
"0"
)
private
String
systemInfo
;
@Excel
(
name
=
"部件
id
"
,
orderNum
=
"1"
)
private
String
equipI
d
;
@Excel
(
name
=
"部件"
,
orderNum
=
"1"
)
private
String
equipI
nfo
;
@Excel
(
name
=
"故障类型"
,
orderNum
=
"2"
)
private
String
faultType
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/FaultCase.java
View file @
06af89e0
...
...
@@ -34,12 +34,6 @@ public class FaultCase extends BaseEntity {
private
String
systemId
;
/**
* 系统编码
*/
@TableField
(
"system_type_code"
)
private
String
systemTypeCode
;
/**
* 系统名称
*/
@TableField
(
"system_name"
)
...
...
@@ -48,8 +42,8 @@ public class FaultCase extends BaseEntity {
/**
* 部件id
*/
@TableField
(
"equip_
id
"
)
private
String
equip
Id
;
@TableField
(
"equip_
code
"
)
private
String
equip
Code
;
/**
* 部件名称
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FaultCaseController.java
View file @
06af89e0
...
...
@@ -12,10 +12,8 @@ import com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO;
import
com.yeejoin.equipmanage.common.enums.EmergencyLevelEum
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IFaultCaseService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.ISignalClassifyService
;
import
com.yeejoin.equipmanage.common.vo.EquipmentManageVo
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.utils.FileHelper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -61,6 +59,9 @@ public class FaultCaseController extends AbstractBaseController {
@Autowired
IEquipmentSpecificSerivce
equipmentSpecificService
;
@Autowired
IEquipmentService
iEquipmentService
;
/**
* 新增信号分类量测枚举表
*
...
...
@@ -157,13 +158,13 @@ public class FaultCaseController extends AbstractBaseController {
@GetMapping
(
value
=
"/export"
)
public
ResponseModel
<
List
<
FaultCase
>>
exportTemplate
(
HttpServletResponse
response
)
{
String
fileName
=
"故障案例模板.xls"
;
//模板名称
String
[]
handers
=
{
"消防系统"
,
"部件
id
"
,
"故障类型"
,
"故障等级"
,
"故障描述"
,
"处理建议"
,
"故障影响"
,
"预防措施"
};
//列标题
String
[]
handers
=
{
"消防系统"
,
"部件"
,
"故障类型"
,
"故障等级"
,
"故障描述"
,
"处理建议"
,
"故障影响"
,
"预防措施"
};
//列标题
List
<
String
[]>
downData
=
new
ArrayList
();
List
<
FireFightingSystemEntity
>
systems
=
fireFightingSystemService
.
getList
();
List
<
EquipmentManageVo
>
systems
=
fireFightingSystemService
.
getSystemCategory
();
if
(
0
<
systems
.
size
())
{
List
<
String
>
sysList
=
new
ArrayList
<>();
for
(
FireFightingSystemEntity
entity
:
systems
)
{
String
str
=
entity
.
getName
()
+
"@"
+
entity
.
getId
()
+
"@"
+
entity
.
getSystemTypeCode
()
;
for
(
EquipmentManageVo
entity
:
systems
)
{
String
str
=
entity
.
getName
()
+
"@"
+
entity
.
getId
();
sysList
.
add
(
str
);
}
// 消防系统
...
...
@@ -215,7 +216,6 @@ public class FaultCaseController extends AbstractBaseController {
String
[]
strings
=
dto
.
getSystemInfo
().
split
(
"@"
);
faultCase
.
setSystemName
(
strings
[
0
]);
faultCase
.
setSystemId
(
strings
[
1
]);
faultCase
.
setSystemTypeCode
(
strings
[
2
]);
}
else
{
return
CommonResponseUtil
.
failure
(
"请补充消防系统信息!"
);
}
...
...
@@ -227,20 +227,16 @@ public class FaultCaseController extends AbstractBaseController {
return
CommonResponseUtil
.
failure
(
"请补充故障等级信息!"
);
}
if
(
StringUtil
.
isNotEmpty
(
dto
.
getEquipI
d
()))
{
EquipmentSpecific
specific
=
equipmentSpecificService
.
getOne
(
new
QueryWrapper
<
EquipmentSpecific
>().
eq
(
"id"
,
Long
.
valueOf
(
dto
.
getEquipId
()))
);
if
(
ObjectUtils
.
isEmpty
(
specific
)
)
{
return
CommonResponseUtil
.
failure
(
"部件
信息有误!
"
);
if
(
StringUtil
.
isNotEmpty
(
dto
.
getEquipI
nfo
()))
{
String
[]
strings
=
dto
.
getEquipInfo
().
split
(
"@"
);
if
(
2
>
strings
.
length
)
{
return
CommonResponseUtil
.
failure
(
"部件
支持的导入格式错误,正确格式例如:部件名称@部件编码 !
"
);
}
else
{
faultCase
.
setEquipId
(
dto
.
getEquipId
());
faultCase
.
setEquipName
(
specific
.
getName
());
}
List
<
EquiplistSpecificBySystemVO
>
equips
=
fireFightingSystemService
.
getEquiplistBySystemId
(
Long
.
valueOf
(
faultCase
.
getSystemId
()));
if
(
0
==
equips
.
size
())
{
return
CommonResponseUtil
.
failure
(
"对应的消防系统下未找到导入的部件!"
);
faultCase
.
setEquipName
(
strings
[
0
]);
faultCase
.
setEquipCode
(
strings
[
1
]);
}
}
else
{
return
CommonResponseUtil
.
failure
(
"请补充部件
id
!"
);
return
CommonResponseUtil
.
failure
(
"请补充部件
信息
!"
);
}
cases
.
add
(
faultCase
);
}
...
...
@@ -271,9 +267,9 @@ public class FaultCaseController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
获取系统下装备列表"
,
notes
=
"获取系统下装备列表
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
装备定义列表不分页"
,
notes
=
"装备定义列表不分页
"
)
@GetMapping
(
value
=
"/equip/list"
)
public
ResponseModel
<
List
<
EquiplistSpecificBySystemVO
>>
getEquipList
BySystemId
(
@RequestParam
(
value
=
"systemId"
)
String
systemId
)
{
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getEquipBySystemId
(
Long
.
valueOf
(
systemId
)
));
public
ResponseModel
<
List
<
EquiplistSpecificBySystemVO
>>
getEquipList
(
)
{
return
CommonResponseUtil
.
success
(
iEquipmentService
.
getAll
(
));
}
}
amos-boot-system-equip/src/main/resources/changelog/wl-3.6.0.xml
View file @
06af89e0
...
...
@@ -1023,11 +1023,10 @@
<sql>
CREATE TABLE `wl_fault_case` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`system_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统id',
`system_type_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统名称',
`system_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统名称',
`equip_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '部件id',
`equip_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '部件名称',
`system_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统类型id',
`system_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统类型名称',
`equip_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '装备定义id',
`equip_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '装备定义名称',
`fault_level` varchar(20) DEFAULT NULL COMMENT '故障等级',
`fault_type` varchar(20) DEFAULT NULL COMMENT '故障类型',
`fault_describe` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '故障描述',
...
...
amos-boot-system-equip/src/main/resources/mapper/FaultCaseMapper.xml
View file @
06af89e0
...
...
@@ -29,9 +29,11 @@
'' AS unit,
wfc.system_name AS `name`,
wfc.id AS `key`,
wfc.system_type_code AS typeCode
wfc.system_id AS systemId,
wec.remark AS typeCode
FROM
wl_fault_case wfc
GROUP BY wfc.system_type_code
LEFT JOIN wl_equipment_category wec ON wec.id = wfc.system_id
GROUP BY wfc.system_id
</select>
</mapper>
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