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
1ec64c53
Commit
1ec64c53
authored
Aug 24, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加app坐标
parent
b29ca6a9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
0 deletions
+124
-0
ESCar.java
...va/com/yeejoin/amos/boot/module/jcs/api/entity/ESCar.java
+33
-0
IESCarService.java
...ejoin/amos/boot/module/jcs/api/service/IESCarService.java
+13
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+30
-0
ESCarRepository.java
...yeejoin/amos/boot/module/jcs/biz/dao/ESCarRepository.java
+16
-0
ESCarService.java
...n/amos/boot/module/jcs/biz/service/impl/ESCarService.java
+32
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/ESCar.java
0 → 100644
View file @
1ec64c53
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.elasticsearch.annotations.DateFormat
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
/**
* @description:
* @author: tw
* @createDate: 2022/8/24
*/
@Data
@Accessors
(
chain
=
true
)
@Document
(
indexName
=
"jcs"
,
type
=
"car"
,
shards
=
1
,
replicas
=
0
)
public
class
ESCar
{
@Id
private
Long
sequenceNbr
;
@Field
(
type
=
FieldType
.
Double
)
private
String
longitude
;
@Field
(
type
=
FieldType
.
Double
)
private
String
latitude
;
@Field
(
type
=
FieldType
.
Long
)
private
Long
Time
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IESCarService.java
0 → 100644
View file @
1ec64c53
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ESCar
;
/**
* @description:
* @author: tw
* @createDate: 2022/8/24
*/
public
interface
IESCarService
{
public
ESCar
saveESCar
(
ESCar
Car
)
throws
Exception
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
1ec64c53
...
@@ -159,6 +159,9 @@ public class CommandController extends BaseController {
...
@@ -159,6 +159,9 @@ public class CommandController extends BaseController {
RestTemplate
restTemplate
;
RestTemplate
restTemplate
;
@Autowired
@Autowired
IESCarService
esCarService
;
@Autowired
AirportStandMapper
airportStandMapper
;
AirportStandMapper
airportStandMapper
;
private
static
final
String
JW
=
"mechinePosition"
;
private
static
final
String
JW
=
"mechinePosition"
;
private
static
final
String
KEYSITE
=
"keySiteExcle"
;
private
static
final
String
KEYSITE
=
"keySiteExcle"
;
...
@@ -1190,6 +1193,10 @@ public class CommandController extends BaseController {
...
@@ -1190,6 +1193,10 @@ public class CommandController extends BaseController {
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
());
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
());
List
<
PowerTransferCompanyResources
>
alertFormValue
=
powerTransferCompanyResourcesMapper
.
selectList
(
queryWrapper
);
List
<
PowerTransferCompanyResources
>
alertFormValue
=
powerTransferCompanyResourcesMapper
.
selectList
(
queryWrapper
);
result
.
stream
().
forEach
(
e
->
{
result
.
stream
().
forEach
(
e
->
{
e
.
put
(
"latitude"
,
34.43760404432992
);
e
.
put
(
"longitude"
,
108.7585304877751
);
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
))
{
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
))
{
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
}
}
...
@@ -1714,4 +1721,26 @@ public class CommandController extends BaseController {
...
@@ -1714,4 +1721,26 @@ public class CommandController extends BaseController {
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
return
ResponseHelper
.
buildResponse
(
userCar
);
return
ResponseHelper
.
buildResponse
(
userCar
);
}
}
//存储啊手机上报的车辆信息
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/addESCar"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"手机上报"
,
notes
=
"手机上报"
)
public
ResponseModel
<
Object
>
addESCar
(
@RequestBody
ESCar
esCar
)
{
try
{
Date
date
=
new
Date
();
esCar
.
setTime
(
date
.
getTime
());
esCarService
.
saveESCar
(
esCar
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
ResponseHelper
.
buildResponse
(
true
);
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/dao/ESCarRepository.java
0 → 100644
View file @
1ec64c53
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
dao
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ESCar
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.stereotype.Repository
;
/**
* @description:
* @author: tw
* @createDate: 2022/8/24
*/
@Repository
public
interface
ESCarRepository
extends
PagingAndSortingRepository
<
ESCar
,
Long
>
{
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ESCarService.java
0 → 100644
View file @
1ec64c53
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ESAlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ESCar
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IESCarService
;
import
com.yeejoin.amos.boot.module.jcs.biz.dao.ESCarRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate
;
import
org.springframework.stereotype.Service
;
/**
* @description:
* @author: tw
* @createDate: 2022/8/24
*/
@Service
public
class
ESCarService
implements
IESCarService
{
@Autowired
private
ElasticsearchRestTemplate
elasticsearchTemplate
;
@Autowired
private
ESCarRepository
esCarRepository
;
@Override
public
ESCar
saveESCar
(
ESCar
Car
)
throws
Exception
{
esCarRepository
.
save
(
Car
);
return
Car
;
}
}
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