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
69702d87
Commit
69702d87
authored
Dec 22, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl' into develop_dl
parents
5823adfc
de447d40
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
26 deletions
+94
-26
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+35
-23
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+56
-0
ICarService.java
...ain/java/com/yeejoin/equipmanage/service/ICarService.java
+1
-1
CarServiceImpl.java
.../com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
+2
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
69702d87
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
@@ -46,6 +47,7 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -46,6 +47,7 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
@@ -167,7 +169,7 @@ public class CarController extends AbstractBaseController {
...
@@ -167,7 +169,7 @@ public class CarController extends AbstractBaseController {
// Car carInstance = iCarService.saveCar(user, car, carInfo, carpList);
// Car carInstance = iCarService.saveCar(user, car, carInfo, carpList);
// saveFile(carInstance); 图片视频后期统一处理
// saveFile(carInstance); 图片视频后期统一处理
//
如果默认有id值则认为是更新
//
如果默认有id值则认为是更新
if
(
car
.
getId
()
!=
null
)
{
if
(
car
.
getId
()
!=
null
)
{
Car
car1
=
this
.
iCarService
.
getById
(
car
.
getId
());
Car
car1
=
this
.
iCarService
.
getById
(
car
.
getId
());
if
(
car
.
getOrgCode
()
!=
null
&&
!
car
.
getBizOrgCode
().
equals
(
car1
.
getBizOrgCode
()))
{
if
(
car
.
getOrgCode
()
!=
null
&&
!
car
.
getBizOrgCode
().
equals
(
car1
.
getBizOrgCode
()))
{
...
@@ -191,7 +193,8 @@ public class CarController extends AbstractBaseController {
...
@@ -191,7 +193,8 @@ public class CarController extends AbstractBaseController {
if
(
ar
!=
null
)
{
if
(
ar
!=
null
)
{
throw
new
BadRequest
(
"物联编码重复"
);
throw
new
BadRequest
(
"物联编码重复"
);
}
}
if
(
StringUtils
.
isNotEmpty
(
haveUsedIotPrefix
)
&&
Arrays
.
stream
(
haveUsedIotPrefix
.
split
(
","
)).
anyMatch
(
iotCode:
:
startsWith
))
{
if
(
StringUtils
.
isNotEmpty
(
haveUsedIotPrefix
)
&&
Arrays
.
stream
(
haveUsedIotPrefix
.
split
(
","
)).
anyMatch
(
iotCode:
:
startsWith
))
{
throw
new
BadRequest
(
"物联编码航班已占用"
);
throw
new
BadRequest
(
"物联编码航班已占用"
);
}
}
}
}
...
@@ -257,7 +260,6 @@ public class CarController extends AbstractBaseController {
...
@@ -257,7 +260,6 @@ public class CarController extends AbstractBaseController {
// });
// });
// }
// }
@Async
(
"equipAsyncExecutor"
)
@Async
(
"equipAsyncExecutor"
)
public
void
refreshAllCount
()
{
public
void
refreshAllCount
()
{
// 清空单位装备分类树缓存
// 清空单位装备分类树缓存
...
@@ -275,7 +277,6 @@ public class CarController extends AbstractBaseController {
...
@@ -275,7 +277,6 @@ public class CarController extends AbstractBaseController {
iSourceStatistics
.
initAllCategoryStatisticsData
(
SourceTypeEnum
.
IOT
);
iSourceStatistics
.
initAllCategoryStatisticsData
(
SourceTypeEnum
.
IOT
);
}
}
/**
/**
* 根据iotCode查询
* 根据iotCode查询
*
*
...
@@ -341,13 +342,13 @@ public class CarController extends AbstractBaseController {
...
@@ -341,13 +342,13 @@ public class CarController extends AbstractBaseController {
if
(
ar
!=
null
)
{
if
(
ar
!=
null
)
{
throw
new
BadRequest
(
"物联编码重复"
);
throw
new
BadRequest
(
"物联编码重复"
);
}
}
if
(
StringUtils
.
isNotEmpty
(
haveUsedIotPrefix
)
&&
Arrays
.
stream
(
haveUsedIotPrefix
.
split
(
","
)).
anyMatch
(
iotCode:
:
startsWith
))
{
if
(
StringUtils
.
isNotEmpty
(
haveUsedIotPrefix
)
&&
Arrays
.
stream
(
haveUsedIotPrefix
.
split
(
","
)).
anyMatch
(
iotCode:
:
startsWith
))
{
throw
new
BadRequest
(
"物联编码航班已占用"
);
throw
new
BadRequest
(
"物联编码航班已占用"
);
}
}
}
}
// 用来解绑车辆
//用来解绑车辆
if
(!
ObjectUtils
.
isEmpty
(
car
.
getTeamId
()))
{
if
(!
ObjectUtils
.
isEmpty
(
car
.
getTeamId
()))
{
jcsFeign
.
getUserCar
(
car
.
getId
(),
car
.
getTeamId
());
jcsFeign
.
getUserCar
(
car
.
getId
(),
car
.
getTeamId
());
}
}
...
@@ -988,8 +989,7 @@ public class CarController extends AbstractBaseController {
...
@@ -988,8 +989,7 @@ public class CarController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取九大类二级统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取九大类二级统计"
)
@RequestMapping
(
value
=
"/getCarList/{ercode}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/getCarList/{ercode}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
IPage
<
Car
>
getCarList
(
@PathVariable
(
value
=
"ercode"
)
String
ercode
,
String
orgcode
,
Car
car
,
String
public
IPage
<
Car
>
getCarList
(
@PathVariable
(
value
=
"ercode"
)
String
ercode
,
String
orgcode
,
Car
car
,
String
pageNum
,
pageNum
,
String
pageSize
)
{
String
pageSize
)
{
Page
<
Car
>
pageBean
;
Page
<
Car
>
pageBean
;
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
...
@@ -1316,8 +1316,8 @@ public class CarController extends AbstractBaseController {
...
@@ -1316,8 +1316,8 @@ public class CarController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取消防队伍的消防车辆"
,
notes
=
"获取消防队伍的消防车辆"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取消防队伍的消防车辆"
,
notes
=
"获取消防队伍的消防车辆"
)
public
ResponseModel
getTeamCarList
(
@RequestParam
(
required
=
false
)
Long
id
,
public
ResponseModel
getTeamCarList
(
@RequestParam
(
required
=
false
)
Long
id
,
@RequestParam
(
required
=
false
)
String
sequenceNbr
,
@RequestParam
(
required
=
false
)
String
sequenceNbr
,
@RequestParam
(
required
=
false
)
Double
longitude
,
@RequestParam
(
required
=
false
)
Double
longitude
,
@RequestParam
(
required
=
false
)
Double
latitude
)
{
@RequestParam
(
required
=
false
)
Double
latitude
)
{
return
CommonResponseUtil
.
success
(
iCarService
.
getTeamCarList
(
sequenceNbr
,
id
,
longitude
,
latitude
));
return
CommonResponseUtil
.
success
(
iCarService
.
getTeamCarList
(
sequenceNbr
,
id
,
longitude
,
latitude
));
}
}
...
@@ -1367,7 +1367,6 @@ public class CarController extends AbstractBaseController {
...
@@ -1367,7 +1367,6 @@ public class CarController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
menusList
.
getResult
());
return
ResponseHelper
.
buildResponse
(
menusList
.
getResult
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/iot/companyTreeByUserAndType"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/iot/companyTreeByUserAndType"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登录人及类型获取公司部门树"
,
notes
=
"根据登录人及类型获取公司部门树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登录人及类型获取公司部门树"
,
notes
=
"根据登录人及类型获取公司部门树"
)
...
@@ -1387,9 +1386,15 @@ public class CarController extends AbstractBaseController {
...
@@ -1387,9 +1386,15 @@ public class CarController extends AbstractBaseController {
@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
());
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
orgCode
=
null
;
if
(
reginParams
!=
null
&&
reginParams
.
getCompany
()!=
null
&&!
ObjectUtils
.
isEmpty
(
reginParams
.
getCompany
().
getOrgCode
()))
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
return
ResponseHelper
.
buildResponse
(
iCarService
.
location
(
orgCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCountOfCar"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCountOfCar"
,
method
=
RequestMethod
.
GET
)
...
@@ -1422,7 +1427,8 @@ public class CarController extends AbstractBaseController {
...
@@ -1422,7 +1427,8 @@ public class CarController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarEquipAlarmInfoDto"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCarEquipAlarmInfoDto"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取设备告警信息"
,
notes
=
"车辆统计-获取设备告警信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取设备告警信息"
,
notes
=
"车辆统计-获取设备告警信息"
)
public
Page
<
CarEquipAlarmInfoDto
>
getCarEquipAlarmInfoDto
(
@RequestParam
(
required
=
false
)
String
keyWord
,
@RequestParam
String
flag
)
{
public
Page
<
CarEquipAlarmInfoDto
>
getCarEquipAlarmInfoDto
(
@RequestParam
(
required
=
false
)
String
keyWord
,
@RequestParam
String
flag
)
{
return
iCarService
.
getCarEquipAlarmInfoDto
(
keyWord
);
return
iCarService
.
getCarEquipAlarmInfoDto
(
keyWord
);
}
}
...
@@ -1443,15 +1449,17 @@ public class CarController extends AbstractBaseController {
...
@@ -1443,15 +1449,17 @@ public class CarController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarMileageInfoByMoth"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCarMileageInfoByMoth"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计车辆里程"
,
notes
=
"车辆统计-按照月份统计车辆里程"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计车辆里程"
,
notes
=
"车辆统计-按照月份统计车辆里程"
)
public
BasicTableDataDto
getCarMileageInfoByMoth
(
@RequestParam
(
required
=
false
)
String
date
,
@RequestParam
Integer
current
,
@RequestParam
Integer
size
,
@RequestParam
(
required
=
false
)
String
keyWord
)
{
public
BasicTableDataDto
getCarMileageInfoByMoth
(
@RequestParam
(
required
=
false
)
String
date
,
@RequestParam
Integer
current
,
@RequestParam
Integer
size
,
@RequestParam
(
required
=
false
)
String
keyWord
)
{
return
iCarService
.
getCarMileageInfoByMoth
(
date
,
current
,
size
,
keyWord
);
return
iCarService
.
getCarMileageInfoByMoth
(
date
,
current
,
size
,
keyWord
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/exportCarMileageInfoByMoth"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/exportCarMileageInfoByMoth"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计导出车辆里程"
,
notes
=
"车辆统计-按照月份统计导出车辆里程"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照月份统计导出车辆里程"
,
notes
=
"车辆统计-按照月份统计导出车辆里程"
)
public
void
exportCarMileageInfoByMoth
(
@RequestParam
(
required
=
false
)
String
date
,
@RequestParam
(
required
=
false
)
String
keyWord
,
HttpServletResponse
response
)
{
public
void
exportCarMileageInfoByMoth
(
@RequestParam
(
required
=
false
)
String
date
,
List
<
CarExportDto
>
list
=
this
.
iCarService
.
exportCarMileageInfoByMoth
(
date
,
keyWord
);
@RequestParam
(
required
=
false
)
String
keyWord
,
HttpServletResponse
response
)
{
List
<
CarExportDto
>
list
=
this
.
iCarService
.
exportCarMileageInfoByMoth
(
date
,
keyWord
);
if
(
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
date
))
{
if
(
org
.
springframework
.
util
.
StringUtils
.
isEmpty
(
date
))
{
date
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
);
date
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
);
}
}
...
@@ -1469,19 +1477,23 @@ public class CarController extends AbstractBaseController {
...
@@ -1469,19 +1477,23 @@ public class CarController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarExcepitonTrack"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCarExcepitonTrack"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照日期范围获取异常车辆"
,
notes
=
"车辆统计-按照日期范围获取异常车辆"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-按照日期范围获取异常车辆"
,
notes
=
"车辆统计-按照日期范围获取异常车辆"
)
public
Page
<
CarExceptionDto
>
getCarExcepitonTrack
(
@RequestParam
Integer
type
,
@RequestParam
(
required
=
false
)
String
keyWord
)
{
public
Page
<
CarExceptionDto
>
getCarExcepitonTrack
(
@RequestParam
Integer
type
,
return
iCarService
.
getCarExcepitonTrack
(
type
,
keyWord
);
@RequestParam
(
required
=
false
)
String
keyWord
)
{
return
iCarService
.
getCarExcepitonTrack
(
type
,
keyWord
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getCarWarningRecord"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCarWarningRecord"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取超速信息"
,
notes
=
"车辆统计-获取超速信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取超速信息"
,
notes
=
"车辆统计-获取超速信息"
)
public
BasicTableDataDto
getCarWarningRecord
(
@RequestParam
(
required
=
false
)
String
keyWord
,
@RequestParam
Integer
current
,
@RequestParam
Integer
size
)
{
public
BasicTableDataDto
getCarWarningRecord
(
@RequestParam
(
required
=
false
)
String
keyWord
,
return
iCarService
.
getCarWarningRecord
(
keyWord
,
current
,
size
);
@RequestParam
Integer
current
,
@RequestParam
Integer
size
)
{
return
iCarService
.
getCarWarningRecord
(
keyWord
,
current
,
size
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@RequestMapping
(
value
=
"/getBizOrgName"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getBizOrgName"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取归属单位下拉框值"
,
notes
=
"车辆统计-获取归属单位下拉框值"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆统计-获取归属单位下拉框值"
,
notes
=
"车辆统计-获取归属单位下拉框值"
)
public
List
<
Map
<
String
,
String
>>
getBizOrgName
(
@RequestParam
(
required
=
false
)
String
keyWord
)
{
public
List
<
Map
<
String
,
String
>>
getBizOrgName
(
@RequestParam
(
required
=
false
)
String
keyWord
)
{
return
iCarService
.
getBizOrgName
();
return
iCarService
.
getBizOrgName
();
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
69702d87
...
@@ -494,6 +494,62 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -494,6 +494,62 @@ public class FireFightingSystemController extends AbstractBaseController {
}
}
@GetMapping
(
value
=
"/getEquipTypeAmountCarJxiop"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"九大类下装备,通过code截取"
,
notes
=
"九大类下装备信息列表"
)
public
IPage
<
EquipTypeImgAmountVO
>
getEquipTypeAmountCarJxiopGet
(
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
[]
result
=
hierarchy
.
split
(
","
);
Map
<
Integer
,
Integer
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
result
.
length
;
i
++)
{
map
.
put
(
i
,
Integer
.
valueOf
(
result
[
i
]));
}
log
.
info
(
"orgCode当前值为start::"
+
equipTypeAmountPage
.
getBizOrgCode
());
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
equipTypeAmountPage
.
getBizOrgCode
()))
{
if
(!
ObjectUtils
.
isEmpty
(
reginParams
.
getCompany
().
getOrgCode
()))
{
equipTypeAmountPage
.
setBizOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
}
else
{
equipTypeAmountPage
.
setBizOrgCode
(
"-1"
);
}
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
reginParams
.
getCompany
().
getOrgCode
())
&&
(
equipTypeAmountPage
.
getBizOrgCode
().
startsWith
(
reginParams
.
getCompany
().
getOrgCode
())))
{
}
else
{
equipTypeAmountPage
.
setBizOrgCode
(
reginParams
.
getCompany
().
getOrgCode
());
}
}
log
.
info
(
"orgCode当前值为::"
+
equipTypeAmountPage
.
getBizOrgCode
());
if
(
StringUtil
.
isNotEmpty
(
equipTypeAmountPage
.
getEquipmentClassificationCode
()))
{
QueryWrapper
<
EquipmentCategory
>
equipmentCategoryQueryWrapper
=
new
QueryWrapper
<>();
equipmentCategoryQueryWrapper
.
eq
(
"code"
,
equipTypeAmountPage
.
getEquipmentClassificationCode
());
equipmentCategoryQueryWrapper
.
eq
(
"industry_code"
,
equipTypeAmountPage
.
getIndustryCode
());
EquipmentCategory
equipmentCategory
=
equipmentCategoryService
.
getOne
(
equipmentCategoryQueryWrapper
);
if
(
equipmentCategory
==
null
)
{
throw
new
RuntimeException
(
"装备定义code有误"
);
}
int
inhierarchy
=
1
;
for
(
int
i
=
0
;
i
<
result
.
length
+
1
;
i
++)
{
//进来先判断是否默认就是空,如果为空第一层
if
(
equipmentCategory
.
getParentId
()
==
null
)
{
//判断是否是最下面的子节点
if
(
i
>=
4
)
{
inhierarchy
=
8
;
}
else
{
inhierarchy
=
map
.
get
(
i
);
}
break
;
}
else
{
//查找到循环几次为空
equipmentCategory
=
equipmentCategoryService
.
getById
(
equipmentCategory
.
getParentId
());
}
}
return
fireFightingSystemService
.
getColaCategoryAmountCarListJxiop
(
inhierarchy
,
equipTypeAmountPage
.
getEquipmentClassificationCode
().
substring
(
0
,
inhierarchy
),
equipTypeAmountPage
);
}
else
{
return
fireFightingSystemService
.
getColaCategoryAmountCarListJxiop
(
0
,
null
,
equipTypeAmountPage
);
}
}
@PostMapping
(
value
=
"/getEquipTypeAmountCarJxiop"
)
@PostMapping
(
value
=
"/getEquipTypeAmountCarJxiop"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"九大类下装备,通过code截取-江西电建"
,
notes
=
"九大类下装备信息列表-江西电建"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"九大类下装备,通过code截取-江西电建"
,
notes
=
"九大类下装备信息列表-江西电建"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/ICarService.java
View file @
69702d87
...
@@ -187,7 +187,7 @@ public interface ICarService extends IService<Car> {
...
@@ -187,7 +187,7 @@ public interface ICarService extends IService<Car> {
IPage
getQRCode
(
Long
id
);
IPage
getQRCode
(
Long
id
);
List
<
Car
>
location
();
List
<
Car
>
location
(
String
orgCode
);
// 获取车辆总数
// 获取车辆总数
Map
<
String
,
Integer
>
getCountOfCar
();
Map
<
String
,
Integer
>
getCountOfCar
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/CarServiceImpl.java
View file @
69702d87
...
@@ -1442,8 +1442,8 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
...
@@ -1442,8 +1442,8 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
}
}
@Override
@Override
public
List
<
Car
>
location
()
{
public
List
<
Car
>
location
(
String
orgCode
)
{
List
<
Car
>
list
=
this
.
list
();
List
<
Car
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
Car
>().
like
(
Car:
:
getBizOrgCode
,
orgCode
)
);
return
list
;
return
list
;
}
}
...
...
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