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
340b3168
Commit
340b3168
authored
Jun 24, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
bug
parents
427d3c0c
b0822c9c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
3 deletions
+17
-3
WeatherController.java
...ejoin/amos/fas/business/controller/WeatherController.java
+6
-2
IEquipmentFireEquipmentDao.java
...s/business/dao/repository/IEquipmentFireEquipmentDao.java
+4
-0
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+5
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+0
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/WeatherController.java
View file @
340b3168
...
@@ -7,13 +7,13 @@ import java.net.URLConnection;
...
@@ -7,13 +7,13 @@ import java.net.URLConnection;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
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.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
...
@@ -25,6 +25,10 @@ import io.swagger.annotations.ApiOperation;
...
@@ -25,6 +25,10 @@ import io.swagger.annotations.ApiOperation;
@Api
(
tags
=
"天气api"
)
@Api
(
tags
=
"天气api"
)
public
class
WeatherController
extends
BaseController
{
public
class
WeatherController
extends
BaseController
{
@Value
(
"${param.weather.url}"
)
private
String
weatherUrl
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"天气查询"
,
notes
=
"天气查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"天气查询"
,
notes
=
"天气查询"
)
@GetMapping
(
"/{address}"
)
@GetMapping
(
"/{address}"
)
public
CommonResponse
getWeather
(
@PathVariable
(
"address"
)
String
address
)
{
public
CommonResponse
getWeather
(
@PathVariable
(
"address"
)
String
address
)
{
...
@@ -32,7 +36,7 @@ public class WeatherController extends BaseController {
...
@@ -32,7 +36,7 @@ public class WeatherController extends BaseController {
String
result
=
""
;
String
result
=
""
;
BufferedReader
in
=
null
;
BufferedReader
in
=
null
;
try
{
try
{
String
urlNameString
=
"http://t.weather.sojson.com/api/weather/city/"
+
address
;
String
urlNameString
=
weatherUrl
+
address
;
URL
realUrl
=
new
URL
(
urlNameString
);
URL
realUrl
=
new
URL
(
urlNameString
);
// 打开和URL之间的连接
// 打开和URL之间的连接
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IEquipmentFireEquipmentDao.java
View file @
340b3168
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.fas.business.dao.repository;
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.fas.business.dao.repository;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Modifying
;
import
java.util.List
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -19,6 +21,8 @@ public interface IEquipmentFireEquipmentDao extends BaseDao<EquipmentFireEquipme
...
@@ -19,6 +21,8 @@ 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
)
@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
);
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
)
@Query
(
value
=
"SELECT count(1) FROM `f_equipment_fire_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countImpEquipByIds
(
String
[]
ids
);
int
countImpEquipByIds
(
String
[]
ids
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
340b3168
...
@@ -133,6 +133,11 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -133,6 +133,11 @@ public class EquipmentServiceImpl implements IEquipmentService {
equipment
=
equipment1
.
get
();
equipment
=
equipment1
.
get
();
}
}
if
(
equipment
!=
null
)
{
if
(
equipment
!=
null
)
{
List
<
EquipmentFireEquipment
>
eqFireEqs
=
equipmentFireEquipmentDao
.
findAllByEquipmentId
(
equipment
.
getId
());
if
(!
eqFireEqs
.
isEmpty
()){
equipmentFireEquipmentDao
.
deleteAll
(
eqFireEqs
);
}
this
.
iEquipmentDao
.
deleteById
(
Long
.
parseLong
(
id
));
this
.
iEquipmentDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
}
else
{
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
340b3168
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
340b3168
spring.application.name
=
Amos-autosys
-sqy
spring.application.name
=
Amos-autosys
server.port
=
8083
server.port
=
8083
...
@@ -52,3 +52,4 @@ windows.img.path = F:\\
...
@@ -52,3 +52,4 @@ windows.img.path = F:\\
linux.img.path = /
linux.img.path = /
param.safetyIndexChange.cron
=
0 0 2 * * ?
param.safetyIndexChange.cron
=
0 0 2 * * ?
param.weather.url
=
http://t.weather.sojson.com/api/weather/city/
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