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
9bc23146
Commit
9bc23146
authored
Jun 15, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆统计页面接口提交
parent
5282006a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
499 additions
and
34 deletions
+499
-34
CarEquipAlarmInfoDto.java
...n/equipmanage/common/entity/dto/CarEquipAlarmInfoDto.java
+35
-0
CarEquipStateInfoDto.java
...n/equipmanage/common/entity/dto/CarEquipStateInfoDto.java
+41
-0
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+79
-2
BasicTableDataDto.java
...n/java/com/yeejoin/equipmanage/dto/BasicTableDataDto.java
+92
-0
CarAreaInfoDto.java
...main/java/com/yeejoin/equipmanage/dto/CarAreaInfoDto.java
+10
-0
CarExceptionDto.java
...ain/java/com/yeejoin/equipmanage/dto/CarExceptionDto.java
+11
-0
CarExportDto.java
...c/main/java/com/yeejoin/equipmanage/dto/CarExportDto.java
+20
-0
ChartIntegerDto.java
...ain/java/com/yeejoin/equipmanage/dto/ChartIntegerDto.java
+10
-0
ColModel.java
...z/src/main/java/com/yeejoin/equipmanage/dto/ColModel.java
+21
-0
MileageDto.java
...src/main/java/com/yeejoin/equipmanage/dto/MileageDto.java
+13
-0
MypageDto.java
.../src/main/java/com/yeejoin/equipmanage/dto/MypageDto.java
+17
-0
ZZChartsDto.java
...rc/main/java/com/yeejoin/equipmanage/dto/ZZChartsDto.java
+30
-0
CarIotNewListener.java
...a/com/yeejoin/equipmanage/listener/CarIotNewListener.java
+25
-1
CarMapper.java
...c/main/java/com/yeejoin/equipmanage/mapper/CarMapper.java
+5
-1
WlCarMileageMapper.java
...va/com/yeejoin/equipmanage/mapper/WlCarMileageMapper.java
+2
-0
ICarService.java
...ain/java/com/yeejoin/equipmanage/service/ICarService.java
+18
-0
IWlCarMileageService.java
...com/yeejoin/equipmanage/service/IWlCarMileageService.java
+2
-0
CarServiceImpl.java
.../com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
+0
-0
WlCarMileageServiceImpl.java
...oin/equipmanage/service/impl/WlCarMileageServiceImpl.java
+9
-1
application-dev.properties
...ystem-equip/src/main/resources/application-dev.properties
+12
-7
application.properties
...ot-system-equip/src/main/resources/application.properties
+1
-2
CarMapper.xml
...boot-system-equip/src/main/resources/mapper/CarMapper.xml
+31
-20
WlCarMileageMapper.xml
...em-equip/src/main/resources/mapper/WlCarMileageMapper.xml
+15
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/dto/CarEquipAlarmInfoDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.models.auth.In
;
import
lombok.Data
;
import
org.joda.time.DateTime
;
import
java.util.Date
;
/**
* 消防车信息
*
* @author wujiang
* @date 2020-07-07
*/
@Data
public
class
CarEquipAlarmInfoDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"序号"
)
private
Integer
no
;
@ApiModelProperty
(
value
=
"告警车辆"
)
private
String
carNum
;
@ApiModelProperty
(
value
=
"扩展字段2"
)
private
String
extra2
;
@ApiModelProperty
(
value
=
"告警时间"
)
private
String
alarmDate
=
new
DateTime
().
toLocalDate
().
toString
();
@ApiModelProperty
(
value
=
"告警信息"
)
private
String
alarmMessage
=
"该设备电量低!"
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/dto/CarEquipStateInfoDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.publics.BaseEntity
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentOnCarAppVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 消防车信息
*
* @author wujiang
* @date 2020-07-07
*/
@Data
public
class
CarEquipStateInfoDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"车牌号"
)
private
String
carNum
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"扩展字段2"
)
private
String
extra2
;
@ApiModelProperty
(
value
=
"设备状态"
)
private
String
equipState
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
9bc23146
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.feign.privilege.Privilege;
...
@@ -12,6 +12,8 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import
com.yeejoin.equipmanage.common.dto.CarInfoDto
;
import
com.yeejoin.equipmanage.common.dto.CarInfoDto
;
import
com.yeejoin.equipmanage.common.dto.CarStatusInfoDto
;
import
com.yeejoin.equipmanage.common.dto.CarStatusInfoDto
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.dto.CarEquipAlarmInfoDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarEquipStateInfoDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CommonFile
;
import
com.yeejoin.equipmanage.common.entity.dto.CommonFile
;
import
com.yeejoin.equipmanage.common.entity.publics.CommonResponse
;
import
com.yeejoin.equipmanage.common.entity.publics.CommonResponse
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
...
@@ -20,6 +22,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentOnCarAppVO;
...
@@ -20,6 +22,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentOnCarAppVO;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.dto.*
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
...
@@ -31,6 +34,7 @@ import io.swagger.annotations.ApiParam;
...
@@ -31,6 +34,7 @@ import io.swagger.annotations.ApiParam;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpResponse
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -49,6 +53,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -49,6 +53,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -416,7 +421,7 @@ public class CarController extends AbstractBaseController {
...
@@ -416,7 +421,7 @@ public class CarController extends AbstractBaseController {
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
Car
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
Car
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
return
iCarService
.
selectOneById
(
id
);
return
iCarService
.
selectOneById
(
id
);
...
@@ -1391,10 +1396,82 @@ public class CarController extends AbstractBaseController {
...
@@ -1391,10 +1396,82 @@ public class CarController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
iCarService
.
getQRCode
(
id
));
return
ResponseHelper
.
buildResponse
(
iCarService
.
getQRCode
(
id
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/location"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/location"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取二维码图片"
,
notes
=
"获取二维码图片"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取二维码图片"
,
notes
=
"获取二维码图片"
)
public
ResponseModel
<
Object
>
location
()
throws
Exception
{
public
ResponseModel
<
Object
>
location
()
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iCarService
.
location
());
return
ResponseHelper
.
buildResponse
(
iCarService
.
location
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCountOfCar"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取车辆总数"
,
notes
=
"车辆统计-获取车辆总数"
)
public
Map
<
String
,
Integer
>
getCountOfCar
()
{
return
iCarService
.
getCountOfCar
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCountOfCarBelongCompany"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取车辆归属单位总数"
,
notes
=
"车辆统计-获取车辆归属单位总数"
)
public
ResponseModel
<
Integer
>
getCountOfCarBelongCompany
()
{
return
CommonResponseUtil
.
success
(
iCarService
.
getCountOfCarBelongCompany
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarCategoryInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取车辆分类用途信息"
,
notes
=
"车辆统计-获取车辆分类用途信息"
)
public
List
<
ChartIntegerDto
>
getCarCategoryInfo
()
{
return
iCarService
.
getCarCategoryInfo
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarEquipStateInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取设备状态信息"
,
notes
=
"车辆统计-获取设备状态信息"
)
public
Page
<
CarEquipStateInfoDto
>
getCarEquipStateInfo
()
{
return
iCarService
.
getCarEquipStateInfo
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarEquipAlarmInfoDto"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取设备告警信息"
,
notes
=
"车辆统计-获取设备告警信息"
)
public
Page
<
CarEquipAlarmInfoDto
>
getCarEquipAlarmInfoDto
()
{
return
iCarService
.
getCarEquipAlarmInfoDto
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarBelongAreaInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取车辆归属信息接口"
,
notes
=
"车辆统计-获取车辆归属信息接口"
)
public
List
<
ChartIntegerDto
>
getCarBelongAreaInfo
()
{
return
iCarService
.
getCarBelongAreaInfo
();
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarAreaInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取片区车辆归属信息接口"
,
notes
=
"车辆统计-获取片区车辆归属信息接口"
)
public
Page
<
CarAreaInfoDto
>
getCarAreaInfo
(
@RequestParam
Long
id
)
{
return
iCarService
.
getCarAreaInfo
(
id
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarMileageInfoByMoth"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计车辆里程"
,
notes
=
"车辆统计-按照月份统计车辆里程"
)
public
Page
<
MileageDto
>
getCarMileageInfoByMoth
(
@RequestParam
String
date
)
{
return
iCarService
.
getCarMileageInfoByMoth
(
date
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/exportCarMileageInfoByMoth"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计车辆里程"
,
notes
=
"车辆统计-按照月份统计车辆里程"
)
public
void
exportCarMileageInfoByMoth
(
@RequestParam
String
date
,
HttpServletResponse
response
)
{
List
<
CarExportDto
>
list
=
this
.
iCarService
.
exportCarMileageInfoByMoth
(
date
);
String
name
=
"车辆里程月度统计表-"
+
date
;
FileHelper
.
exportExcel
(
list
,
name
,
name
,
CarExportDto
.
class
,
UUID
.
randomUUID
().
toString
()+
".xls"
,
response
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarMileageInfoByMothOFDay"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计每天的车辆里程"
,
notes
=
"车辆统计-按照月份统计每天的车辆里程"
)
public
ZZChartsDto
getCarMileageInfoByMothOFDay
(
@RequestParam
String
iotCode
)
{
return
iCarService
.
getCarMileageInfoByMothOFDay
(
iotCode
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarExcepitonTrack"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照日期范围获取异常车辆"
,
notes
=
"车辆统计-按照日期范围获取异常车辆"
)
public
Page
<
CarExceptionDto
>
getCarExcepitonTrack
(
@RequestParam
Integer
type
)
{
return
iCarService
.
getCarExcepitonTrack
(
type
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/BasicTableDataDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
BasicTableDataDto
{
// {
// "dataGridMock": {
// "current": 1,
// "total": 5,
// "pagination": false,
// "totalPage": 1,
// "dataList": [
// {
// "title2_measure": "蒋公岭风电场",
// "title1_measure": "鄂A 350L9",
// "title3_measure": "开机",
// "title4_measure": "20%",
// "_id": 1
// },
// {
// "title2_measure": "蒋公岭风电场",
// "title1_measure": "鄂A 350L8",
// "title3_measure": "开机",
// "title4_measure": "20%",
// "_id": 2
// },
// {
// "title2_measure": "蒋公岭风电场",
// "title1_measure": "鄂A 350L4",
// "title3_measure": "开机",
// "title4_measure": "20%",
// "_id": 3
// },
// {
// "title2_measure": "蒋公岭风电场",
// "title1_measure": "鄂A 350L5",
// "title3_measure": "关机",
// "title4_measure": "20%",
// "_id": 4
// },
// {
// "title2_measure": "蒋公岭风电场",
// "title1_measure": "鄂A 350L6",
// "title3_measure": "开机",
// "title4_measure": "20%",
// "_id": 5
// }
// ],
// "pageSize": 10
// },
// "colModel": [
// {
// "fid": "title1_measure",
// "dataIndex": "title1_measure",
// "name": "车牌号",
// "title": "车牌号",
// "type": "dataGrid",
// "key": "title1_measure"
// },
// {
// "fid": "title2_measure",
// "dataIndex": "title2_measure",
// "name": "所属单位",
// "title": "所属单位",
// "type": "dataGrid",
// "key": "title2_measure"
// },
// {
// "fid": "title3_measure",
// "dataIndex": "title3_measure",
// "name": "设备状态",
// "title": "设备状态",
// "type": "dataGrid",
// "key": "title3_measure"
// },
// {
// "fid": "title4_measure",
// "dataIndex": "title4_measure",
// "name": "设备电量",
// "title": "设备电量",
// "type": "dataGrid",
// "key": "title4_measure"
// }
// ]
// }
private
MypageDto
dataGridMock
;
private
List
<
ColModel
>
colModel
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/CarAreaInfoDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.Data
;
@Data
public
class
CarAreaInfoDto
{
private
Integer
no
;
private
String
name
;
private
Integer
countOfCar
=
0
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/CarExceptionDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.Data
;
@Data
public
class
CarExceptionDto
{
private
String
carNumber
;
private
String
belongStation
;
private
String
belongStation1
=
"运行轨迹"
;
private
String
carId
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/CarExportDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
lombok.Data
;
@Data
public
class
CarExportDto
{
@Excel
(
name
=
"车辆编号"
)
private
String
code
;
@Excel
(
name
=
"车牌号"
)
private
String
carNumber
;
@Excel
(
name
=
"所属单位"
)
private
String
orgName
;
@Excel
(
name
=
"车辆型号"
)
private
String
standard
;
@Excel
(
name
=
"排量(升)"
)
private
String
displacement
;
@Excel
(
name
=
"里程数(km)"
)
private
String
totalTravel
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/ChartIntegerDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.Data
;
@Data
public
class
ChartIntegerDto
{
private
Long
companyId
;
private
String
name
;
private
Integer
value
=
0
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/ColModel.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.Data
;
@Data
public
class
ColModel
{
private
String
fid
;
private
String
dataIndex
;
private
String
name
;
private
String
title
;
private
String
type
=
"dataGrid"
;
private
String
key
;
public
ColModel
(
String
fid
,
String
name
){
this
.
fid
=
fid
;
this
.
dataIndex
=
fid
;
this
.
key
=
fid
;
this
.
type
=
"dataGrid"
;
this
.
name
=
name
;
this
.
title
=
name
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/MileageDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.Data
;
@Data
public
class
MileageDto
{
private
String
carCode
;
private
String
carNum
;
private
Double
totalTravel
;
private
String
total
;
//iotCode+date
private
String
iotCode
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/MypageDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
io.swagger.models.auth.In
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
MypageDto
{
private
Integer
current
;
private
Integer
total
;
private
Boolean
pagination
;
private
Integer
totalPage
;
private
List
dataList
;
private
Integer
pageSize
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/ZZChartsDto.java
0 → 100644
View file @
9bc23146
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ZZChartsDto
{
// {
// "seriesData": [
// 2,
// 1,
// 1,
// 2,
// "1.7"
// ],
// "axisData": [
// "A",
// "B",
// "C",
// "D",
// "E"
// ]
// }
//Y轴
private
List
seriesData
;
// X轴
private
List
axisData
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/listener/CarIotNewListener.java
View file @
9bc23146
...
@@ -65,8 +65,10 @@ public class CarIotNewListener extends EmqxListener {
...
@@ -65,8 +65,10 @@ public class CarIotNewListener extends EmqxListener {
String
deviceName
=
topic
.
split
(
"/"
)[
1
];
String
deviceName
=
topic
.
split
(
"/"
)[
1
];
String
iotCode
=
measurement
+
deviceName
;
String
iotCode
=
measurement
+
deviceName
;
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
message
.
toString
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
message
.
toString
());
//通过消息存电量到扩展字段2
this
.
updateEquipBattery
(
jsonObject
,
iotCode
);
if
(
jsonObject
.
containsKey
(
"FireCar_Longitude"
))
{
if
(
jsonObject
.
containsKey
(
"FireCar_Longitude"
))
{
this
.
updateCarLocation
(
jsonObject
,
iotCode
);
this
.
updateCarLocation
(
jsonObject
,
iotCode
);
//如果map中已经存在该设备或者该设备有但是线程已经执行了
//如果map中已经存在该设备或者该设备有但是线程已经执行了
if
((!
deviceInfo
.
containsKey
(
iotCode
))
||
(
deviceInfo
.
containsKey
(
iotCode
)
&&
deviceInfo
.
get
(
iotCode
)
==
null
))
{
if
((!
deviceInfo
.
containsKey
(
iotCode
))
||
(
deviceInfo
.
containsKey
(
iotCode
)
&&
deviceInfo
.
get
(
iotCode
)
==
null
))
{
ThreadCar
threadCar
=
new
ThreadCar
(
iotCode
,
jsonObject
,
this
.
iWlCarMileageService
,
this
.
iotFeign
,
this
.
iCarService
,
this
.
emqkeeper
,
clipping_time
);
ThreadCar
threadCar
=
new
ThreadCar
(
iotCode
,
jsonObject
,
this
.
iWlCarMileageService
,
this
.
iotFeign
,
this
.
iCarService
,
this
.
emqkeeper
,
clipping_time
);
...
@@ -163,6 +165,7 @@ public class CarIotNewListener extends EmqxListener {
...
@@ -163,6 +165,7 @@ public class CarIotNewListener extends EmqxListener {
calendar
.
set
(
Calendar
.
HOUR
,
calendar
.
get
(
Calendar
.
HOUR
)
+
8
);
calendar
.
set
(
Calendar
.
HOUR
,
calendar
.
get
(
Calendar
.
HOUR
)
+
8
);
return
calendar
.
getTime
();
return
calendar
.
getTime
();
}
}
public
void
updateCarLocation
(
JSONObject
jsonObject
,
String
iotCode
)
{
public
void
updateCarLocation
(
JSONObject
jsonObject
,
String
iotCode
)
{
if
(
jsonObject
.
containsKey
(
"FireCar_Longitude"
)
&&
jsonObject
.
containsKey
(
"FireCar_Latitude"
))
{
if
(
jsonObject
.
containsKey
(
"FireCar_Longitude"
)
&&
jsonObject
.
containsKey
(
"FireCar_Latitude"
))
{
// 获取开始坐标
// 获取开始坐标
...
@@ -196,4 +199,25 @@ public class CarIotNewListener extends EmqxListener {
...
@@ -196,4 +199,25 @@ public class CarIotNewListener extends EmqxListener {
}
}
}
}
}
}
//存储设备电量到扩展字段2
public
void
updateEquipBattery
(
JSONObject
jsonObject
,
String
iotCode
)
{
Integer
power
=
0
;
if
(
jsonObject
.
containsKey
(
"additionalInformations"
)
&&
jsonObject
.
get
(
"additionalInformations"
)
!=
null
)
{
JSONObject
jsonObject1
=
JSONObject
.
parseObject
(
jsonObject
.
get
(
"additionalInformations"
).
toString
());
if
(
jsonObject1
!=
null
)
{
JSONObject
jsonObject2
=
JSONObject
.
parseObject
(
jsonObject1
.
get
(
"additionalInformations"
).
toString
());
if
(
jsonObject2
!=
null
&&
jsonObject2
.
containsKey
(
"power"
))
{
power
=
jsonObject2
.
getInteger
(
"power"
);
}
}
}
Car
car
=
iCarService
.
getOne
(
new
LambdaQueryWrapper
<
Car
>().
eq
(
Car:
:
getIotCode
,
iotCode
));
if
(
car
!=
null
&&
power
!=
0
)
{
car
.
setExtra2
(
power
.
toString
());
iCarService
.
updateById
(
car
);
System
.
out
.
println
(
"-----------更新车辆设备电池电量成功--------"
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/CarMapper.java
View file @
9bc23146
...
@@ -5,6 +5,8 @@ import com.yeejoin.equipmanage.common.datasync.entity.FireVehicle;
...
@@ -5,6 +5,8 @@ import com.yeejoin.equipmanage.common.datasync.entity.FireVehicle;
import
com.yeejoin.equipmanage.common.dto.CarFusionDto
;
import
com.yeejoin.equipmanage.common.dto.CarFusionDto
;
import
com.yeejoin.equipmanage.common.entity.Car
;
import
com.yeejoin.equipmanage.common.entity.Car
;
import
com.yeejoin.equipmanage.common.entity.dto.CarDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarEquipAlarmInfoDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarEquipStateInfoDto
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentOnCarAppVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentOnCarAppVO
;
...
@@ -82,5 +84,7 @@ public interface CarMapper extends BaseMapper<Car> {
...
@@ -82,5 +84,7 @@ public interface CarMapper extends BaseMapper<Car> {
List
<
Map
<
String
,
Object
>>
getCarState
();
List
<
Map
<
String
,
Object
>>
getCarState
();
List
<
Map
<
String
,
Object
>>
getFirePowerInfo
();
List
<
Map
<
String
,
Object
>>
getFirePowerInfo
();
Integer
getCarCategoryCountByCategoryID
(
Long
categoryID
);
List
<
CarEquipStateInfoDto
>
getCarEquipStateInfo
();
List
<
CarEquipAlarmInfoDto
>
getCarEquipAlarmInfo
(
Integer
batteryNumber
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/WlCarMileageMapper.java
View file @
9bc23146
...
@@ -20,5 +20,7 @@ public interface WlCarMileageMapper extends BaseMapper<WlCarMileage> {
...
@@ -20,5 +20,7 @@ public interface WlCarMileageMapper extends BaseMapper<WlCarMileage> {
Double
totalMileage
(
String
iotCode
);
Double
totalMileage
(
String
iotCode
);
List
<
WlCarMileage
>
list
(
@Param
(
"date"
)
String
date
);
List
<
WlCarMileage
>
list
(
@Param
(
"date"
)
String
date
);
Double
getTotalTravelByIotCodeAndDate
(
String
date
,
String
iotCode
);
Double
getTotalTravelByIotCodeAndDateProd
(
String
startDate
,
String
endDate
,
String
iotCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ICarService.java
View file @
9bc23146
...
@@ -13,10 +13,14 @@ import com.yeejoin.equipmanage.common.entity.CarInfo;
...
@@ -13,10 +13,14 @@ import com.yeejoin.equipmanage.common.entity.CarInfo;
import
com.yeejoin.equipmanage.common.entity.CarProperty
;
import
com.yeejoin.equipmanage.common.entity.CarProperty
;
import
com.yeejoin.equipmanage.common.entity.EquipmentCategory
;
import
com.yeejoin.equipmanage.common.entity.EquipmentCategory
;
import
com.yeejoin.equipmanage.common.entity.dto.CarDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarEquipAlarmInfoDto
;
import
com.yeejoin.equipmanage.common.entity.dto.CarEquipStateInfoDto
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarIndexVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.dto.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -189,4 +193,18 @@ public interface ICarService extends IService<Car> {
...
@@ -189,4 +193,18 @@ public interface ICarService extends IService<Car> {
IPage
getQRCode
(
Long
id
);
IPage
getQRCode
(
Long
id
);
List
<
Car
>
location
();
List
<
Car
>
location
();
// 获取车辆总数
Map
<
String
,
Integer
>
getCountOfCar
();
// 获取车辆归属单位总数
Map
<
String
,
Integer
>
getCountOfCarBelongCompany
();
List
<
ChartIntegerDto
>
getCarCategoryInfo
()
;
Page
<
CarEquipStateInfoDto
>
getCarEquipStateInfo
();
Page
<
CarEquipAlarmInfoDto
>
getCarEquipAlarmInfoDto
();
List
<
ChartIntegerDto
>
getCarBelongAreaInfo
()
;
Page
<
CarAreaInfoDto
>
getCarAreaInfo
(
Long
id
)
;
Page
<
MileageDto
>
getCarMileageInfoByMoth
(
String
date
);
List
<
CarExportDto
>
exportCarMileageInfoByMoth
(
String
date
);
ZZChartsDto
getCarMileageInfoByMothOFDay
(
String
iotCode
);
Page
<
CarExceptionDto
>
getCarExcepitonTrack
(
Integer
type
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IWlCarMileageService.java
View file @
9bc23146
...
@@ -33,4 +33,6 @@ public interface IWlCarMileageService extends IService<WlCarMileage> {
...
@@ -33,4 +33,6 @@ public interface IWlCarMileageService extends IService<WlCarMileage> {
//根据iot编码查询是否有未结束里程
//根据iot编码查询是否有未结束里程
Boolean
getUncompleteMileagByIotCode
(
String
iotCode
);
Boolean
getUncompleteMileagByIotCode
(
String
iotCode
);
Double
getTotalTravelByIotCodeAndDate
(
String
date
,
String
iotCode
);
Double
getTotalTravelByIotCodeAndDateProd
(
String
StartDate
,
String
endDate
,
String
iotCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
View file @
9bc23146
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/WlCarMileageServiceImpl.java
View file @
9bc23146
...
@@ -391,7 +391,6 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
...
@@ -391,7 +391,6 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
return
integer
<=
0
;
return
integer
<=
0
;
}
}
private
String
getAddress
(
double
longitude
,
double
lantitude
)
{
private
String
getAddress
(
double
longitude
,
double
lantitude
)
{
StringBuilder
api
=
new
StringBuilder
(
GUIDE_ADDRESS_URL
);
StringBuilder
api
=
new
StringBuilder
(
GUIDE_ADDRESS_URL
);
api
.
append
(
"key="
).
append
(
GUIDE_KEY
).
append
(
"&location="
).
append
(
longitude
).
append
(
","
).
append
(
lantitude
)
api
.
append
(
"key="
).
append
(
GUIDE_KEY
).
append
(
"&location="
).
append
(
longitude
).
append
(
","
).
append
(
lantitude
)
...
@@ -430,4 +429,13 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
...
@@ -430,4 +429,13 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
}
}
return
res
.
toString
();
return
res
.
toString
();
}
}
@Override
public
Double
getTotalTravelByIotCodeAndDate
(
String
date
,
String
iotCode
)
{
return
this
.
baseMapper
.
getTotalTravelByIotCodeAndDate
(
date
,
iotCode
);
}
@Override
public
Double
getTotalTravelByIotCodeAndDateProd
(
String
startDate
,
String
endDate
,
String
iotCode
)
{
return
this
.
baseMapper
.
getTotalTravelByIotCodeAndDateProd
(
startDate
,
endDate
,
iotCode
);
}
}
}
amos-boot-system-equip/src/main/resources/application-dev.properties
View file @
9bc23146
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://172.16.10.2
15:3307/dl_business_v3.0.1.3
?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://172.16.10.2
20:3306/equipment
?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.password
=
Yeejoin@2020
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
...
@@ -14,13 +14,13 @@ spring.datasource.hikari.connection-test-query= SELECT 1
...
@@ -14,13 +14,13 @@ spring.datasource.hikari.connection-test-query= SELECT 1
# \u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740
# \u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740
fileserver_domain
=
http://172.16.10.2
15
:9000/
fileserver_domain
=
http://172.16.10.2
20
:9000/
#eureka.instance.ip-address= 172.16.3.135
#eureka.instance.ip-address= 172.16.3.135
eureka.instance.hostname
=
172.16.10.2
15
eureka.instance.hostname
=
172.16.10.2
20
eureka.instance.prefer-ip-address
=
true
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@172.16.10.2
15
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@172.16.10.2
20
:10001/eureka/
spring.security.user.name
=
admin
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
spring.security.user.password
=
a1234560
security.productApp
=
STUDIO_APP_MOBILE
security.productApp
=
STUDIO_APP_MOBILE
...
@@ -35,7 +35,7 @@ amos.system.user.product=STUDIO_APP_WEB
...
@@ -35,7 +35,7 @@ amos.system.user.product=STUDIO_APP_WEB
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
172.16.10.2
15
spring.redis.host
=
172.16.10.2
20
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-active
=
200
...
@@ -47,10 +47,10 @@ spring.redis.expire.time=30000
...
@@ -47,10 +47,10 @@ spring.redis.expire.time=30000
## emqx
## emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.2
15
:1883
emqx.broker
=
tcp://172.16.10.2
20
:1883
emqx.user-name
=
admin
emqx.user-name
=
admin
emqx.password
=
public
emqx.password
=
public
mqtt.scene.host
=
mqtt://172.16.10.2
15
:8083/mqtt
mqtt.scene.host
=
mqtt://172.16.10.2
20
:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
spring.mqtt.completionTimeout
=
3000
...
@@ -136,3 +136,7 @@ mileage.parameter=0.5
...
@@ -136,3 +136,7 @@ mileage.parameter=0.5
# 江西电建-车辆里程跨天记录切分(每日0点执行)
# 江西电建-车辆里程跨天记录切分(每日0点执行)
mileage.segmentation.cron
=
0 0 0 * * ?
mileage.segmentation.cron
=
0 0 0 * * ?
mileage.clippingtime
=
600000
mileage.clippingtime
=
600000
equip.car.alarmBattery
=
10
equip.car.maxTravel
=
400
equip.risk.model.topic
=
""
#
mileage.segmentation.cron
=
0 */2 * * * ?
\ No newline at end of file
amos-boot-system-equip/src/main/resources/application.properties
View file @
9bc23146
...
@@ -80,8 +80,7 @@ equip.message.create.topic=emq.risk.created
...
@@ -80,8 +80,7 @@ equip.message.create.topic=emq.risk.created
# \u4E2D\u5FC3\u7EA7\u76D1\u542C\u4E3B\u9898
# \u4E2D\u5FC3\u7EA7\u76D1\u542C\u4E3B\u9898
equip.center.risk.topic
=
equip/risk/trigger
equip.center.risk.topic
=
equip/risk/trigger
patrol.center.risk.topic
=
patrol/risk/trigger
patrol.center.risk.topic
=
patrol/risk/trigger
# \u4E2D\u5FC3\u7EA7\u53D1\u9001\u81F3\u98CE\u9669\u670D\u52A1\u6D88\u606F\u683C\u5F0F
# \u4E2D\u5FC3\u7EA7\u53D1\u9001\u81F3\u98CE\u9669\u670D\u52A1\u6D88\u606F\u683C\u5
equip.risk.model.topic
=
equip/data/analysis
# \u63A5\u53E3\u5730\u5740
# \u63A5\u53E3\u5730\u5740
equip.scene.detail.url
=
${server.servlet.context-path}/scene/%s/detail/list
equip.scene.detail.url
=
${server.servlet.context-path}/scene/%s/detail/list
...
...
amos-boot-system-equip/src/main/resources/mapper/CarMapper.xml
View file @
9bc23146
...
@@ -561,9 +561,6 @@
...
@@ -561,9 +561,6 @@
</select>
</select>
<select
id=
"equipmentCarList"
resultType=
"com.yeejoin.equipmanage.common.entity.Car"
>
<select
id=
"equipmentCarList"
resultType=
"com.yeejoin.equipmanage.common.entity.Car"
>
select * from wl_car c LEFT JOIN wl_equipment w on c.equipment_id=w.id
select * from wl_car c LEFT JOIN wl_equipment w on c.equipment_id=w.id
where c.car_state in ('1','2')
where c.car_state in ('1','2')
...
@@ -652,25 +649,24 @@
...
@@ -652,25 +649,24 @@
</select>
</select>
<select
id=
"queryCompanyIotStaData"
resultType=
"java.util.Map"
>
<select
id=
"queryCompanyIotStaData"
resultType=
"java.util.Map"
>
--
SELECT
--
SELECT
--
s.biz_org_code as bizOrgCode,
--
s.biz_org_code as bizOrgCode,
--
c.code as categoryCode,
--
c.code as categoryCode,
--
count(1) as total
--
count(1) as total
--
FROM
--
FROM
--
`wl_car` s,
--
`wl_car` s,
--
wl_equipment e,
--
wl_equipment e,
--
wl_equipment_category c
--
wl_equipment_category c
--
where
--
where
--
e.is_iot=1
--
e.is_iot=1
-- and
s.equipment_id = e.`id`
-- and
s.equipment_id = e.`id`
--
and e.category_id = c.id
--
and e.category_id = c.id
--
and s.biz_org_code is not null
--
and s.biz_org_code is not null
--
GROUP BY s.biz_org_code ,c.code
--
GROUP BY s.biz_org_code ,c.code
--
--
--
UNION
--
UNION
SELECT
SELECT
s.biz_org_code as bizOrgCode,
s.biz_org_code as bizOrgCode,
...
@@ -702,4 +698,19 @@
...
@@ -702,4 +698,19 @@
FROM
FROM
v_duty_person
v_duty_person
</select>
</select>
<select
id=
"getCarCategoryCountByCategoryID"
resultType=
"Integer"
>
SELECT count(1) count
FROM `wl_car` LEFT JOIN wl_equipment
on wl_car.equipment_id = wl_equipment.id
WHERE wl_equipment.category_id = #{categoryID}
</select>
<select
id=
"getCarEquipStateInfo"
resultType=
"com.yeejoin.equipmanage.common.entity.dto.CarEquipStateInfoDto"
>
SELECT car_num carNum,biz_org_name bizOrgName,extra2
FROM `wl_car`
</select>
<select
id=
"getCarEquipAlarmInfo"
resultType=
"com.yeejoin.equipmanage.common.entity.dto.CarEquipAlarmInfoDto"
>
SELECT car_num carNum,extra2
FROM `wl_car`
where extra2
<
#{batteryNumber}
</select>
</mapper>
</mapper>
amos-boot-system-equip/src/main/resources/mapper/WlCarMileageMapper.xml
View file @
9bc23146
...
@@ -54,4 +54,19 @@
...
@@ -54,4 +54,19 @@
AND wcm.start_time IS NOT NULL
AND wcm.start_time IS NOT NULL
AND wcm.end_time IS NULL
AND wcm.end_time IS NULL
</select>
</select>
<select
id =
"getTotalTravelByIotCodeAndDate"
resultType=
"Double"
>
SELECT SUM(travel)
FROM wl_car_mileage
WHERE date LIKE concat('%',#{date},'%')
AND
iot_code = #{iotCode}
</select>
<select
id =
"getTotalTravelByIotCodeAndDateProd"
resultType=
"Double"
>
SELECT SUM(travel)
FROM wl_car_mileage
WHERE date
<
= #{startDate} AND date
>
= #{endDate}
AND
iot_code = #{iotCode}
</select>
</mapper>
</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