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
8bb63e3a
Commit
8bb63e3a
authored
Jun 24, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
ac2285e8
340b3168
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
7 deletions
+54
-7
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+3
-1
WeatherController.java
...ejoin/amos/fas/business/controller/WeatherController.java
+6
-2
IEquipmentFireEquipmentDao.java
...s/business/dao/repository/IEquipmentFireEquipmentDao.java
+12
-0
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+9
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+22
-3
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireEquimtPointController.java
View file @
8bb63e3a
...
...
@@ -50,9 +50,11 @@ public class FireEquimtPointController extends BaseController {
if
(
fireEquipmentPoint
==
null
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
())){
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
())
||
(
"ANALOGUE"
.
equals
(
fireEquipmentPoint
.
getType
())
&&
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getUnit
()))){
return
CommonResponseUtil
.
failure
(
"请检查必填字段"
);
};
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
fireEquipmentPoint
.
setOrgCode
(
compCode
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/WeatherController.java
View file @
8bb63e3a
...
...
@@ -7,13 +7,13 @@ import java.net.URLConnection;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
...
...
@@ -25,6 +25,10 @@ import io.swagger.annotations.ApiOperation;
@Api
(
tags
=
"天气api"
)
public
class
WeatherController
extends
BaseController
{
@Value
(
"${param.weather.url}"
)
private
String
weatherUrl
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"天气查询"
,
notes
=
"天气查询"
)
@GetMapping
(
"/{address}"
)
public
CommonResponse
getWeather
(
@PathVariable
(
"address"
)
String
address
)
{
...
...
@@ -32,7 +36,7 @@ public class WeatherController extends BaseController {
String
result
=
""
;
BufferedReader
in
=
null
;
try
{
String
urlNameString
=
"http://t.weather.sojson.com/api/weather/city/"
+
address
;
String
urlNameString
=
weatherUrl
+
address
;
URL
realUrl
=
new
URL
(
urlNameString
);
// 打开和URL之间的连接
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IEquipmentFireEquipmentDao.java
View file @
8bb63e3a
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
org.springframework.data.jpa.repository.Modifying
;
import
java.util.List
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.transaction.annotation.Transactional
;
@Repository
(
"iEquipmentFireEquipmentDao"
)
public
interface
IEquipmentFireEquipmentDao
extends
BaseDao
<
EquipmentFireEquipment
,
Long
>
{
...
...
@@ -17,7 +22,14 @@ public interface IEquipmentFireEquipmentDao extends BaseDao<EquipmentFireEquipme
@Query
(
value
=
"select count(1) from f_equipment_fire_equipment WHERE equipment_id = ?1 and fire_equipment_id = ?2"
,
nativeQuery
=
true
)
int
findByEqmtIdAndFireEqmtId
(
Long
equipmentId
,
Long
fireEquipmentId
);
List
<
EquipmentFireEquipment
>
findAllByEquipmentId
(
Long
equipmentId
);
@Query
(
value
=
"SELECT count(1) FROM `f_equipment_fire_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countImpEquipByIds
(
String
[]
ids
);
@Transactional
@Modifying
@Query
(
value
=
"delete FROM `f_equipment_fire_equipment` WHERE equipment_id = ?1"
,
nativeQuery
=
true
)
void
deleteByEquipmentId
(
Long
id
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
8bb63e3a
...
...
@@ -124,6 +124,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
@Override
@Transactional
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
Optional
<
Equipment
>
equipment1
=
iEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
...
...
@@ -132,10 +133,18 @@ public class EquipmentServiceImpl implements IEquipmentService {
equipment
=
equipment1
.
get
();
}
if
(
equipment
!=
null
)
{
List
<
EquipmentFireEquipment
>
eqFireEqs
=
equipmentFireEquipmentDao
.
findAllByEquipmentId
(
equipment
.
getId
());
if
(!
eqFireEqs
.
isEmpty
()){
equipmentFireEquipmentDao
.
deleteAll
(
eqFireEqs
);
}
this
.
iEquipmentDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
}
//删除重点设备关联关系
equipmentFireEquipmentDao
.
deleteByEquipmentId
(
Long
.
valueOf
(
id
));
}
return
idArray
;
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
8bb63e3a
spring.application.name
=
Amos-autosys
-sqy
spring.application.name
=
Amos-autosys
server.port
=
8083
...
...
@@ -52,3 +52,4 @@ windows.img.path = F:\\
linux.img.path = /
param.safetyIndexChange.cron
=
0 0 2 * * ?
param.weather.url
=
http://t.weather.sojson.com/api/weather/city/
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
8bb63e3a
...
...
@@ -568,7 +568,17 @@
</select>
<select
id=
"getImpEqu3dPoints"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
SELECT id,name,code,ue4_location,ue4_rotation,'monitorEquipment' as type,'monitorEquipment' as level,
SELECT id,name,code,ue4_location,ue4_rotation,
case
when equip_classify= 0 then 'monitorEquipment'
when equip_classify= 2 then 'video'
when equip_classify= 3 then 'fireEquipment'
end as type,
case
when equip_classify= 0 then 'monitorEquipment'
when equip_classify= 2 then 'video'
when equip_classify= 3 then 'fireEquipment'
end as level,
null as relationKeys,
CASE
WHEN (
...
...
@@ -595,6 +605,7 @@
WHERE fe.id IN (
select fire_equipment_id from f_equipment_fire_equipment
) AND (org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%'))
AND fe.equip_classify
<![CDATA[ <> ]]>
1
UNION ALL
SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,
TMP.relationKeys,
...
...
@@ -662,7 +673,15 @@
FROM f_water_resource
WHERE org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%')
UNION ALL
SELECT id,name,code,ue4_location,ue4_rotation,'fireChamber' as type,'fireChamber' as level,
SELECT id,name,code,ue4_location,ue4_rotation,
case
when type = 1 then 'fireChamber'
when type = 2 then 'fireFoamRoom'
end as type,
case
when type = 1 then 'fireChamber'
when type = 2 then 'fireFoamRoom'
end as level,
null as relationKeys,
CASE
WHEN (
...
...
@@ -686,7 +705,7 @@
END position,
concat('fireChamber-',id) as `key`
FROM f_fire_station
WHERE
type = 1 AND
org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%')
WHERE org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%')
UNION ALL
SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,
null as relationKeys,
...
...
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