Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
045181bf
Commit
045181bf
authored
Jun 17, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
abd424a9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
17 deletions
+54
-17
ExcelController.java
...yeejoin/amos/fas/business/controller/ExcelController.java
+5
-0
FireStationEquipmentMapper.java
...s/fas/business/dao/mapper/FireStationEquipmentMapper.java
+2
-0
FireEquipmentParam.java
...m/yeejoin/amos/fas/business/param/FireEquipmentParam.java
+3
-3
FireEquipmentPointParam.java
...join/amos/fas/business/param/FireEquipmentPointParam.java
+8
-8
FireStationServiceImpl.java
...mos/fas/business/service/impl/FireStationServiceImpl.java
+28
-6
dbTemplate_fier_station_equipment.xml
...resources/db/mapper/dbTemplate_fier_station_equipment.xml
+6
-0
dbTemplate_fire_car.xml
...tart/src/main/resources/db/mapper/dbTemplate_fire_car.xml
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ExcelController.java
View file @
045181bf
...
...
@@ -78,6 +78,11 @@ public class ExcelController extends BaseController {
@ApiParam
(
value
=
"data:导出数据;model:导出模板"
,
required
=
true
)
@RequestParam
String
exportType
,
@ApiParam
(
value
=
"point:监测点;equipment:设备"
,
required
=
true
)
@RequestParam
String
modelName
,
@ApiParam
(
value
=
"查询条件"
)
@RequestBody
(
required
=
false
)
Map
<
String
,
Object
>
paramsMap
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
paramsMap
.
put
(
"compCode"
,
orgCode
);
String
fileName
=
UUID
.
randomUUID
().
toString
()
+
".xls"
;
String
title
=
"监测点"
;
Class
cls
=
null
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireStationEquipmentMapper.java
View file @
045181bf
...
...
@@ -8,4 +8,6 @@ public interface FireStationEquipmentMapper extends BaseMapper {
Map
queryRelation
(
@Param
(
"fireStationId"
)
Long
fireStationId
,
@Param
(
"fireEquipmentId"
)
Long
fireEquipmentId
);
void
updateNumberById
(
@Param
(
"stationEquiId"
)
Long
stationEquiId
,
@Param
(
"diff"
)
Double
diff
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FireEquipmentParam.java
View file @
045181bf
...
...
@@ -6,13 +6,13 @@ public class FireEquipmentParam {
private
Long
id
;
@Excel
(
name
=
"机构编号"
)
@Excel
(
name
=
"机构编号
(必填)
"
)
private
String
orgCode
;
@Excel
(
name
=
"编号"
,
orderNum
=
"1"
)
private
String
code
;
@Excel
(
name
=
"装备分类"
,
replace
=
{
"设备类_0"
,
"耗材类_1"
,
"视频监控_2"
,
"灭火器材_3"
},
orderNum
=
"2"
)
@Excel
(
name
=
"装备分类
(设备类_0,耗材类_1,视频监控_2,灭火器材_3)
"
,
replace
=
{
"设备类_0"
,
"耗材类_1"
,
"视频监控_2"
,
"灭火器材_3"
},
orderNum
=
"2"
)
private
Integer
equipClassify
;
@Excel
(
name
=
"装备类型"
,
orderNum
=
"3"
)
...
...
@@ -24,7 +24,7 @@ public class FireEquipmentParam {
@Excel
(
name
=
"三维楼层"
,
orderNum
=
"5"
)
private
String
floor3d
;
@Excel
(
name
=
"是否室内"
,
replace
=
{
"否_0"
,
"是_1"
},
orderNum
=
"6"
)
@Excel
(
name
=
"是否室内
(必填 0/1)
"
,
replace
=
{
"否_0"
,
"是_1"
},
orderNum
=
"6"
)
private
Integer
isIndoor
;
@Excel
(
name
=
"装备名称"
,
orderNum
=
"7"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FireEquipmentPointParam.java
View file @
045181bf
...
...
@@ -8,30 +8,30 @@ public class FireEquipmentPointParam {
private
Long
id
;
@Excel
(
name
=
"名称"
,
orderNum
=
"
1
"
,
width
=
50
)
@Excel
(
name
=
"名称"
,
orderNum
=
"
2
"
,
width
=
50
)
private
String
name
;
@Excel
(
name
=
"编号"
,
orderNum
=
"
2
"
,
width
=
12
)
@Excel
(
name
=
"编号"
,
orderNum
=
"
1
"
,
width
=
12
)
private
String
code
;
@Excel
(
name
=
"消防装备编号"
,
orderNum
=
"
3
"
,
width
=
15
)
@Excel
(
name
=
"消防装备编号"
,
orderNum
=
"
8
"
,
width
=
15
)
private
String
fireEquipmentCode
;
@Excel
(
name
=
"
消防装备名称"
,
orderNum
=
"4
"
,
width
=
50
)
@Excel
(
name
=
"
绑定消防装备名称"
,
orderNum
=
"7
"
,
width
=
50
)
private
String
fireEquipmentName
;
private
Long
fireEquipmentId
;
@Excel
(
name
=
"
类型"
,
replace
=
{
"模拟量_ANALOGUE"
,
"开关量_SWITCH"
},
orderNum
=
"5
"
)
@Excel
(
name
=
"
数据类型"
,
replace
=
{
"模拟量_ANALOGUE"
,
"开关量_SWITCH"
},
orderNum
=
"3
"
)
private
String
type
;
@Excel
(
name
=
"
值"
,
replace
=
{
"是_true"
,
"否_false"
},
orderNum
=
"6
"
,
width
=
12
)
@Excel
(
name
=
"
状态"
,
replace
=
{
"是_true"
,
"否_false"
},
orderNum
=
"5
"
,
width
=
12
)
private
String
value
;
@Excel
(
name
=
"单位"
,
orderNum
=
"
7
"
,
width
=
12
)
@Excel
(
name
=
"单位"
,
orderNum
=
"
6
"
,
width
=
12
)
private
String
unit
;
@Excel
(
name
=
"
告警类型"
,
replace
=
{
"火灾告警_1"
,
"电源开关_2"
,
"换流变_6"
,
"液位_3"
,
"流量_4"
,
"容量_5"
,
"故障告警_7"
},
orderNum
=
"8
"
)
@Excel
(
name
=
"
指标类型"
,
replace
=
{
"火灾告警_1"
,
"电源开关_2"
,
"换流变_6"
,
"液位_3"
,
"流量_4"
,
"容量_5"
,
"故障告警_7"
},
orderNum
=
"4
"
)
private
Long
alarmType
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireStationServiceImpl.java
View file @
045181bf
...
...
@@ -69,17 +69,39 @@ public class FireStationServiceImpl implements IFireStationService {
fireEquipment
=
fireEquipment1
.
get
();
}
Map
map
=
fireStationEquipmentMapper
.
queryRelation
(
fireStationFireEquipment
.
getFireStationId
(),
fireStationFireEquipment
.
getFireEquipmentId
());
if
(
fireStation
==
null
)
throw
new
Exception
(
"找不到指定的消防站"
);
if
(
fireEquipment
==
null
)
throw
new
Exception
(
"消防设备不存在"
);
if
(!
CollectionUtils
.
isEmpty
(
map
))
throw
new
Exception
(
"绑定关系已经存在."
);
// if (!CollectionUtils.isEmpty(map))
// throw new Exception("绑定关系已经存在.");
Map
map
=
fireStationEquipmentMapper
.
queryRelation
(
fireStationFireEquipment
.
getFireStationId
(),
fireStationFireEquipment
.
getFireEquipmentId
());
if
(!
CollectionUtils
.
isEmpty
(
map
))
{
if
(
fireEquipment
.
getEquipClassify
()
==
1
)
{
//耗材类
Long
stationEquiId
=
(
Long
)
map
.
get
(
"id"
);
Double
number
=
(
Double
)
map
.
get
(
"number"
);
//当前数量
Double
number2
=
fireStationFireEquipment
.
getNumber
();
//添加的数量
Double
number3
=
(
double
)
fireEquipment
.
getNumber
();
//库存
Double
diff
=
number3
-
number2
;
if
(
diff
<
0
){
throw
new
Exception
(
"添加数量超过现有数量!."
);
}
else
{
Double
curNumber
=
number
+
number2
;
fireStationEquipmentMapper
.
updateNumberById
(
stationEquiId
,
curNumber
);
fireEquipment
.
setNumber
(
diff
.
intValue
());
iFireEquipmentDao
.
saveAndFlush
(
fireEquipment
);
}
}
}
else
{
fireStationFireEquipment
=
iFireStationEquipmentDao
.
save
(
fireStationFireEquipment
);
}
fireStationFireEquipment
=
iFireStationEquipmentDao
.
save
(
fireStationFireEquipment
);
}
return
fireStationFireEquipments
;
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_station_equipment.xml
View file @
045181bf
...
...
@@ -14,4 +14,9 @@
se.fire_equipment_id = ${fireEquipmentId}
AND se.fire_station_id = ${fireStationId};
</select>
<update
id=
"updateNumberById"
>
update f_fire_station_equipment set number = #{diff}
where id = #{stationEquiId}
</update>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_car.xml
View file @
045181bf
...
...
@@ -68,6 +68,8 @@
a.is_indoor as isIndoor,
a.org_code AS orgCode,
a.position3d,
a.ue4_rotation as ue4Rotation,
a.ue4_location as ue4Location,
a.photo_path AS photoPath,
a.risk_source_id as riskSourceId
FROM
...
...
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