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
f640a355
Commit
f640a355
authored
Dec 31, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交类型树的添加缓存操作
parent
22759691
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
188 additions
and
142 deletions
+188
-142
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+37
-33
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+17
-0
EquipmentSpecificController.java
...n/equipmanage/controller/EquipmentSpecificController.java
+3
-7
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+127
-102
StockServiceImpl.java
...om/yeejoin/equipmanage/service/impl/StockServiceImpl.java
+4
-0
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 @
f640a355
...
@@ -21,6 +21,7 @@ import org.springframework.http.HttpHeaders;
...
@@ -21,6 +21,7 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.scheduling.annotation.Async
;
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.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -100,6 +101,7 @@ import com.yeejoin.equipmanage.service.ISyncDataService;
...
@@ -100,6 +101,7 @@ import com.yeejoin.equipmanage.service.ISyncDataService;
import
com.yeejoin.equipmanage.service.ISystemDicService
;
import
com.yeejoin.equipmanage.service.ISystemDicService
;
import
com.yeejoin.equipmanage.service.ProductionQRCode
;
import
com.yeejoin.equipmanage.service.ProductionQRCode
;
import
com.yeejoin.equipmanage.service.impl.EquipmentSpecificSerivceImpl
;
import
com.yeejoin.equipmanage.service.impl.EquipmentSpecificSerivceImpl
;
import
com.yeejoin.equipmanage.service.impl.FireFightingSystemServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -193,10 +195,14 @@ public class CarController extends AbstractBaseController {
...
@@ -193,10 +195,14 @@ public class CarController extends AbstractBaseController {
@Autowired
@Autowired
JcsFeign
jcsFeign
;
JcsFeign
jcsFeign
;
@Autowired
FireFightingSystemServiceImpl
fireFightingSystemServiceImpl
;
/**
/**
* 新增消防车信息
* 新增消防车信息
*
*
* @return
* @return
* @throws Exception
*/
*/
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -231,10 +237,21 @@ public class CarController extends AbstractBaseController {
...
@@ -231,10 +237,21 @@ public class CarController extends AbstractBaseController {
}
}
});
});
}
}
iCarService
.
refreshStaData
();
refreshCount
(
car
.
getBizOrgCode
());
return
iCarService
.
saveOne
(
car
);
return
iCarService
.
saveOne
(
car
);
}
}
@Async
public
void
refreshCount
(
String
bizOrgCode
)
{
iCarService
.
refreshStaData
();
try
{
fireFightingSystemServiceImpl
.
refreshCarTypeAndCount
(
bizOrgCode
);
}
catch
(
Exception
e
)
{
}
}
/**
/**
* 根据iotCode查询
* 根据iotCode查询
*
*
...
@@ -244,7 +261,8 @@ public class CarController extends AbstractBaseController {
...
@@ -244,7 +261,8 @@ public class CarController extends AbstractBaseController {
@RequestMapping
(
value
=
"/checkIotCode/{iotCode}/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/checkIotCode/{iotCode}/{id}"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据iotCode查询"
,
notes
=
"根据iotCode查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据iotCode查询"
,
notes
=
"根据iotCode查询"
)
public
ResponseModel
selectByIotCode
(
HttpServletRequest
request
,
@PathVariable
String
iotCode
,
@PathVariable
String
id
)
{
public
ResponseModel
selectByIotCode
(
HttpServletRequest
request
,
@PathVariable
String
iotCode
,
@PathVariable
String
id
)
{
Map
map1
=
new
HashMap
();
Map
map1
=
new
HashMap
();
map1
.
put
(
"state"
,
"FAILED"
);
map1
.
put
(
"state"
,
"FAILED"
);
map1
.
put
(
"message"
,
"若您设置物联编码,请至少输入9位字符!"
);
map1
.
put
(
"message"
,
"若您设置物联编码,请至少输入9位字符!"
);
...
@@ -292,7 +310,7 @@ public class CarController extends AbstractBaseController {
...
@@ -292,7 +310,7 @@ public class CarController extends AbstractBaseController {
// carInstance = iCarService.saveCar(getUserInfo(), carInstance, carInfo, carpList);
// carInstance = iCarService.saveCar(getUserInfo(), carInstance, carInfo, carpList);
// saveFile(carInstance);视频图片文件后期统一处理
// saveFile(carInstance);视频图片文件后期统一处理
EquipmentSpecificSerivceImpl
.
registerMqttTopic
(
car
.
getIotCode
(),
equipmentIotMqttReceiveConfig
);
EquipmentSpecificSerivceImpl
.
registerMqttTopic
(
car
.
getIotCode
(),
equipmentIotMqttReceiveConfig
);
iCarService
.
refreshStaData
(
);
refreshCount
(
car
.
getBizOrgCode
()
);
return
iCarService
.
updateOneById
(
car
);
return
iCarService
.
updateOneById
(
car
);
}
}
...
@@ -316,7 +334,8 @@ public class CarController extends AbstractBaseController {
...
@@ -316,7 +334,8 @@ public class CarController extends AbstractBaseController {
boolean
b
=
iCarService
.
removeByIds
(
idStrings
);
boolean
b
=
iCarService
.
removeByIds
(
idStrings
);
// AST数据同步
// AST数据同步
if
(
b
&&
syncSwitch
)
{
if
(
b
&&
syncSwitch
)
{
List
<
Long
>
carIds
=
idStrings
.
stream
().
map
(
id
->
Long
.
parseLong
(
id
.
trim
())).
collect
(
Collectors
.
toList
());
List
<
Long
>
carIds
=
idStrings
.
stream
().
map
(
id
->
Long
.
parseLong
(
id
.
trim
()))
.
collect
(
Collectors
.
toList
());
syncDataService
.
syncDeletedFireVehicle
(
carIds
);
syncDataService
.
syncDeletedFireVehicle
(
carIds
);
iCarService
.
dataSyncDeletedIds
(
carIds
);
iCarService
.
dataSyncDeletedIds
(
carIds
);
}
}
...
@@ -343,7 +362,6 @@ public class CarController extends AbstractBaseController {
...
@@ -343,7 +362,6 @@ public class CarController extends AbstractBaseController {
}
}
}
}
}
}
iCarService
.
refreshStaData
();
return
new
CommonResponse
(
SUCCESS
);
return
new
CommonResponse
(
SUCCESS
);
}
}
}
}
...
@@ -383,12 +401,11 @@ public class CarController extends AbstractBaseController {
...
@@ -383,12 +401,11 @@ public class CarController extends AbstractBaseController {
@RequestMapping
(
value
=
"/threeDimensional/getCarDetailById/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/threeDimensional/getCarDetailById/{id}"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据车辆id查询"
,
notes
=
"根据车辆id查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据车辆id查询"
,
notes
=
"根据车辆id查询"
)
public
CarForUE4VO
getCarDetailByCarNumToThreeDimensional
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
CarForUE4VO
getCarDetailByCarNumToThreeDimensional
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
String
orgCode
=
getOrgCode
();
String
orgCode
=
getOrgCode
();
return
iCarService
.
getCarDetailByCarNumToThreeDimensional
(
id
,
orgCode
);
return
iCarService
.
getCarDetailByCarNumToThreeDimensional
(
id
,
orgCode
);
}
}
/**
/**
* 根据车牌号查询车辆详情信息
* 根据车牌号查询车辆详情信息
*
*
...
@@ -603,7 +620,6 @@ public class CarController extends AbstractBaseController {
...
@@ -603,7 +620,6 @@ public class CarController extends AbstractBaseController {
@ApiParam
(
value
=
"车辆Id"
,
required
=
true
)
@PathVariable
(
value
=
"carId"
)
String
carId
,
@ApiParam
(
value
=
"车辆Id"
,
required
=
true
)
@PathVariable
(
value
=
"carId"
)
String
carId
,
@ApiParam
(
value
=
"灭火剂损耗请求条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
ExtinguishantLossRequest
>
requests
)
{
@ApiParam
(
value
=
"灭火剂损耗请求条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
List
<
ExtinguishantLossRequest
>
requests
)
{
try
{
try
{
iCarService
.
refreshStaData
();
return
iCarService
.
lossExtinguishants
(
Long
.
valueOf
(
carId
),
requests
);
return
iCarService
.
lossExtinguishants
(
Long
.
valueOf
(
carId
),
requests
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -679,7 +695,6 @@ public class CarController extends AbstractBaseController {
...
@@ -679,7 +695,6 @@ public class CarController extends AbstractBaseController {
return
response
;
return
response
;
}
}
private
List
<
CarProperty
>
createCarPropertyList
(
List
<
CarProperty
>
carPropertyList
)
{
private
List
<
CarProperty
>
createCarPropertyList
(
List
<
CarProperty
>
carPropertyList
)
{
List
<
CarProperty
>
carProList
=
new
ArrayList
<
CarProperty
>();
List
<
CarProperty
>
carProList
=
new
ArrayList
<
CarProperty
>();
if
(!
carPropertyList
.
isEmpty
())
{
if
(!
carPropertyList
.
isEmpty
())
{
...
@@ -1112,8 +1127,8 @@ public class CarController extends AbstractBaseController {
...
@@ -1112,8 +1127,8 @@ public class CarController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"模拟车辆历史轨迹数据(<font color='blue'>release</font>)"
,
notes
=
"模拟车辆历史轨迹数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"模拟车辆历史轨迹数据(<font color='blue'>release</font>)"
,
notes
=
"模拟车辆历史轨迹数据"
)
@RequestMapping
(
value
=
"/history/{iotCode}/{timeStart}/{timeEnd}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/history/{iotCode}/{timeStart}/{timeEnd}"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
getCarHistoryTrackAndTrendById
(
@PathVariable
(
"iotCode"
)
String
iotCode
,
@PathVariable
(
"timeStart"
)
String
timeStart
,
public
ResponseModel
getCarHistoryTrackAndTrendById
(
@PathVariable
(
"iotCode"
)
String
iotCode
,
@PathVariable
(
"timeEnd"
)
String
timeEnd
)
{
@PathVariable
(
"timeStart"
)
String
timeStart
,
@PathVariable
(
"timeEnd"
)
String
timeEnd
)
{
String
prefix
=
null
;
String
prefix
=
null
;
String
suffix
=
null
;
String
suffix
=
null
;
if
(
iotCode
.
length
()
>
8
)
{
if
(
iotCode
.
length
()
>
8
)
{
...
@@ -1133,16 +1148,16 @@ public class CarController extends AbstractBaseController {
...
@@ -1133,16 +1148,16 @@ public class CarController extends AbstractBaseController {
HttpEntity
httpEntity
=
new
HttpEntity
<>(
lonAndLatEntityVo
,
headers
);
HttpEntity
httpEntity
=
new
HttpEntity
<>(
lonAndLatEntityVo
,
headers
);
ResponseEntity
<
FeignClientResult
>
feignClientResult
=
null
;
ResponseEntity
<
FeignClientResult
>
feignClientResult
=
null
;
try
{
try
{
feignClientResult
=
restTemplate
.
exchange
(
"http://"
+
url
feignClientResult
=
restTemplate
.
exchange
(
+
"/iot/v1/livedata/list?timeStart="
+
timeStart
+
"&timeEnd="
+
timeEnd
+
"&productKey="
+
prefix
+
"&deviceName="
+
suffix
,
"http://"
+
url
+
"/iot/v1/livedata/list?timeStart="
+
timeStart
+
"&timeEnd="
+
timeEnd
+
"&productKey="
+
prefix
+
"&deviceName="
+
suffix
,
HttpMethod
.
GET
,
httpEntity
,
FeignClientResult
.
class
);
HttpMethod
.
GET
,
httpEntity
,
FeignClientResult
.
class
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(
null
!=
feignClientResult
&&
feignClientResult
.
getBody
().
getStatus
()
==
200
)
{
if
(
null
!=
feignClientResult
&&
feignClientResult
.
getBody
().
getStatus
()
==
200
)
{
return
CommonResponseUtil
.
success
(
feignClientResult
.
getBody
().
getResult
());
return
CommonResponseUtil
.
success
(
feignClientResult
.
getBody
().
getResult
());
}
}
else
{
else
{
log
.
error
(
"注:iotCode为 ("
+
iotCode
+
") 的车辆不存在于物联系统或物联系统车辆历史轨迹接口出错!"
);
log
.
error
(
"注:iotCode为 ("
+
iotCode
+
") 的车辆不存在于物联系统或物联系统车辆历史轨迹接口出错!"
);
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
...
@@ -1175,16 +1190,11 @@ public class CarController extends AbstractBaseController {
...
@@ -1175,16 +1190,11 @@ public class CarController extends AbstractBaseController {
@GetMapping
(
value
=
"/list-all"
)
@GetMapping
(
value
=
"/list-all"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
public
List
<
CarInfoDto
>
equipmentList
(
public
List
<
CarInfoDto
>
equipmentList
(
@RequestParam
(
required
=
false
)
Long
teamId
,
@RequestParam
(
required
=
false
)
Long
teamId
,
@RequestParam
(
required
=
false
)
String
name
)
{
@RequestParam
(
required
=
false
)
String
name
)
{
return
iCarService
.
carInfoList
(
teamId
,
name
);
return
iCarService
.
carInfoList
(
teamId
,
name
);
}
}
/**
/**
* 查询车辆-共共接口
* 查询车辆-共共接口
*
*
...
@@ -1195,14 +1205,10 @@ public class CarController extends AbstractBaseController {
...
@@ -1195,14 +1205,10 @@ public class CarController extends AbstractBaseController {
@GetMapping
(
value
=
"/list-allpag"
)
@GetMapping
(
value
=
"/list-allpag"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆列表"
,
notes
=
"车辆列表"
)
public
Page
<
CarInfoDto
>
equipmentCarList
(
public
Page
<
CarInfoDto
>
equipmentCarList
(
@RequestParam
(
required
=
false
)
Long
teamId
,
@RequestParam
(
required
=
false
)
Long
teamId
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
code
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
pageNum
,
@RequestParam
(
required
=
false
)
String
pageSize
,
@RequestParam
(
required
=
false
)
String
code
,
@RequestParam
(
required
=
false
)
Long
id
,
@RequestParam
(
required
=
false
)
Boolean
isNo
@RequestParam
(
required
=
false
)
String
pageNum
,
@RequestParam
(
required
=
false
)
String
pageSize
,
@RequestParam
(
required
=
false
)
Long
id
,
@RequestParam
(
required
=
false
)
Boolean
isNo
)
{
)
{
Page
<
CarInfoDto
>
pageBean
;
Page
<
CarInfoDto
>
pageBean
;
...
@@ -1212,10 +1218,9 @@ public class CarController extends AbstractBaseController {
...
@@ -1212,10 +1218,9 @@ public class CarController extends AbstractBaseController {
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
pageBean
=
new
Page
<>(
Integer
.
parseInt
(
pageNum
),
Integer
.
parseInt
(
pageSize
));
}
}
return
iCarService
.
equipmentCarList
(
pageBean
,
teamId
,
name
,
code
,
id
,
isNo
);
return
iCarService
.
equipmentCarList
(
pageBean
,
teamId
,
name
,
code
,
id
,
isNo
);
}
}
/**
/**
* 机场查询队伍与车辆数量
* 机场查询队伍与车辆数量
*
*
...
@@ -1245,8 +1250,7 @@ public class CarController extends AbstractBaseController {
...
@@ -1245,8 +1250,7 @@ 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
)
Double
longitude
,
@RequestParam
(
required
=
false
)
Double
longitude
,
@RequestParam
(
required
=
false
)
Double
latitude
)
{
@RequestParam
(
required
=
false
)
Double
latitude
)
{
return
CommonResponseUtil
.
success
(
iCarService
.
getTeamCarList
(
id
,
longitude
,
latitude
));
return
CommonResponseUtil
.
success
(
iCarService
.
getTeamCarList
(
id
,
longitude
,
latitude
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
f640a355
...
@@ -18,6 +18,7 @@ import com.yeejoin.equipmanage.mapper.EquipmentDetailMapper;
...
@@ -18,6 +18,7 @@ import com.yeejoin.equipmanage.mapper.EquipmentDetailMapper;
import
com.yeejoin.equipmanage.mapper.ManufacturerInfoMapper
;
import
com.yeejoin.equipmanage.mapper.ManufacturerInfoMapper
;
import
com.yeejoin.equipmanage.mapper.StockDetailMapper
;
import
com.yeejoin.equipmanage.mapper.StockDetailMapper
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.impl.FireFightingSystemServiceImpl
;
import
com.yeejoin.equipmanage.utils.ExcelUtil
;
import
com.yeejoin.equipmanage.utils.ExcelUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -27,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -27,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -83,6 +85,8 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -83,6 +85,8 @@ public class EquipmentDetailController extends AbstractBaseController {
@Value
(
"${systemctl.sync.switch}"
)
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
private
Boolean
syncSwitch
;
@Autowired
FireFightingSystemServiceImpl
fireFightingSystemServiceImpl
;
/**
/**
* 新增
* 新增
*
*
...
@@ -92,9 +96,18 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -92,9 +96,18 @@ public class EquipmentDetailController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
EquipmentDetail
saveEquipmentDetail
(
HttpServletRequest
request
,
@RequestBody
EquipmentDetail
equipmentDetail
)
{
public
EquipmentDetail
saveEquipmentDetail
(
HttpServletRequest
request
,
@RequestBody
EquipmentDetail
equipmentDetail
)
{
equipmentSpecificSerivce
.
refreshStaData
();
return
iEquipmentDetailService
.
saveOne
(
equipmentDetail
);
return
iEquipmentDetailService
.
saveOne
(
equipmentDetail
);
}
}
@Async
public
void
refreshCount
(
String
bizOrgCode
)
{
equipmentSpecificSerivce
.
refreshStaData
();
try
{
fireFightingSystemServiceImpl
.
refreshCarTypeAndCount
(
bizOrgCode
);
}
catch
(
Exception
e
)
{
}
}
/**
/**
* 设备新增带打码入库
* 设备新增带打码入库
***/
***/
...
@@ -102,6 +115,7 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -102,6 +115,7 @@ public class EquipmentDetailController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
EquipmentDate
saveEquipmentDetail
(
@RequestBody
EquipmentDate
equipmentDate
)
{
public
EquipmentDate
saveEquipmentDetail
(
@RequestBody
EquipmentDate
equipmentDate
)
{
equipmentSpecificSerivce
.
refreshStaData
();
if
(
equipmentDate
.
getEquipmentSpecific
().
getSingle
()
==
null
)
{
if
(
equipmentDate
.
getEquipmentSpecific
().
getSingle
()
==
null
)
{
throw
new
BadRequest
(
"管理方式未输入"
);
throw
new
BadRequest
(
"管理方式未输入"
);
}
}
...
@@ -202,6 +216,7 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -202,6 +216,7 @@ public class EquipmentDetailController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
public
EquipmentDate
updateByIdEquipmentDetail
(
HttpServletRequest
request
,
@RequestBody
EquipmentDate
equipmentDate
)
{
public
EquipmentDate
updateByIdEquipmentDetail
(
HttpServletRequest
request
,
@RequestBody
EquipmentDate
equipmentDate
)
{
equipmentSpecificSerivce
.
refreshStaData
();
EquipmentSpecific
vo
=
equipmentDate
.
getEquipmentSpecific
();
EquipmentSpecific
vo
=
equipmentDate
.
getEquipmentSpecific
();
String
sysCode
=
vo
.
getCode
();
String
sysCode
=
vo
.
getCode
();
if
(
StringUtils
.
isNotEmpty
(
sysCode
)
&&
StringUtils
.
isNotEmpty
(
sysCode
.
trim
()))
{
if
(
StringUtils
.
isNotEmpty
(
sysCode
)
&&
StringUtils
.
isNotEmpty
(
sysCode
.
trim
()))
{
...
@@ -258,6 +273,7 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -258,6 +273,7 @@ public class EquipmentDetailController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
boolean
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
equipmentSpecificSerivce
.
refreshStaData
();
return
iEquipmentDetailService
.
removeOneById
(
id
);
return
iEquipmentDetailService
.
removeOneById
(
id
);
}
}
...
@@ -265,6 +281,7 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -265,6 +281,7 @@ public class EquipmentDetailController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改"
,
notes
=
"修改"
)
public
boolean
quotaUpdate
(
HttpServletRequest
request
,
@RequestBody
List
<
EquProperty
>
e
)
{
public
boolean
quotaUpdate
(
HttpServletRequest
request
,
@RequestBody
List
<
EquProperty
>
e
)
{
equipmentSpecificSerivce
.
refreshStaData
();
return
iEquipmentDetailService
.
quotaUpdate
(
e
);
return
iEquipmentDetailService
.
quotaUpdate
(
e
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentSpecificController.java
View file @
f640a355
...
@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
...
@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
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
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -29,13 +30,13 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
...
@@ -29,13 +30,13 @@ import com.yeejoin.equipmanage.common.entity.EquipmentSpecific;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.EquipmentSpecificDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.SourceNameListDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.SourceNameListDTO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.ComplementCodeVO
;
import
com.yeejoin.equipmanage.common.entity.vo.DetailPaneVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.SourceNameByEquipSpeIdVO
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo
;
import
com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.impl.FireFightingSystemServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -71,11 +72,9 @@ public class EquipmentSpecificController extends AbstractBaseController {
...
@@ -71,11 +72,9 @@ public class EquipmentSpecificController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表分页查询"
,
notes
=
"补码列表接口,废弃未用到"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表分页查询"
,
notes
=
"补码列表接口,废弃未用到"
)
public
IPage
<
ComplementCodeVO
>
saveEquipmentPoint
(
@RequestBody
EquipmentSpecificDTO
equipmentSpecific
)
{
public
IPage
<
ComplementCodeVO
>
saveEquipmentPoint
(
@RequestBody
EquipmentSpecificDTO
equipmentSpecific
)
{
equipmentSpecificSerivce
.
refreshStaData
();
return
equipmentSpecificSerivce
.
selectEquipmentSpecific
(
equipmentSpecific
);
return
equipmentSpecificSerivce
.
selectEquipmentSpecific
(
equipmentSpecific
);
}
}
/**
/**
* 通过id获取设备区域建筑等信息
* 通过id获取设备区域建筑等信息
*
*
...
@@ -107,9 +106,8 @@ public class EquipmentSpecificController extends AbstractBaseController {
...
@@ -107,9 +106,8 @@ public class EquipmentSpecificController extends AbstractBaseController {
*/
*/
@RequestMapping
(
value
=
"/exit"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/exit"
,
method
=
RequestMethod
.
POST
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改"
,
notes
=
"修改"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改"
,
notes
=
"修改"
)
public
EquipmentSpecific
updateEquipmentSpecific
(
@RequestBody
EquipmentSpecific
equipmentSpecific
)
{
public
EquipmentSpecific
updateEquipmentSpecific
(
@RequestBody
EquipmentSpecific
equipmentSpecific
)
{
equipmentSpecificSerivce
.
refreshStaData
();
EquipmentSpecific
updateEquipmentSpecific
=
equipmentSpecificSerivce
.
updateEquipmentSpecific
(
equipmentSpecific
,
getSelectedOrgInfo
(),
getUserInfo
());
EquipmentSpecific
updateEquipmentSpecific
=
equipmentSpecificSerivce
.
updateEquipmentSpecific
(
equipmentSpecific
,
getSelectedOrgInfo
(),
getUserInfo
());
if
(
syncSwitch
)
{
if
(
syncSwitch
)
{
// TODO 后续判断成功,执行同步
// TODO 后续判断成功,执行同步
...
@@ -249,7 +247,6 @@ public class EquipmentSpecificController extends AbstractBaseController {
...
@@ -249,7 +247,6 @@ public class EquipmentSpecificController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除装备相关所有数据"
,
notes
=
"删除装备相关所有数据"
)
@ApiOperation
(
value
=
"删除装备相关所有数据"
,
notes
=
"删除装备相关所有数据"
)
public
ResponseModel
delEquipmentBySpecificId
(
@RequestParam
Long
specificId
)
{
public
ResponseModel
delEquipmentBySpecificId
(
@RequestParam
Long
specificId
)
{
equipmentSpecificSerivce
.
refreshStaData
();
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
delEquipmentBySpecificId
(
specificId
));
return
CommonResponseUtil
.
success
(
equipmentSpecificSerivce
.
delEquipmentBySpecificId
(
specificId
));
}
}
...
@@ -262,7 +259,6 @@ public class EquipmentSpecificController extends AbstractBaseController {
...
@@ -262,7 +259,6 @@ public class EquipmentSpecificController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"批量删除装备相关所有数据"
,
notes
=
"批量删除装备相关所有数据"
)
@ApiOperation
(
value
=
"批量删除装备相关所有数据"
,
notes
=
"批量删除装备相关所有数据"
)
public
ResponseModel
delEquipmentBySpecificId
(
@RequestBody
List
<
Long
>
specificIds
)
{
public
ResponseModel
delEquipmentBySpecificId
(
@RequestBody
List
<
Long
>
specificIds
)
{
equipmentSpecificSerivce
.
refreshStaData
();
if
(
ObjectUtils
.
isEmpty
(
specificIds
)){
if
(
ObjectUtils
.
isEmpty
(
specificIds
)){
return
CommonResponseUtil
.
failure
(
"参数为空"
);
return
CommonResponseUtil
.
failure
(
"参数为空"
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
f640a355
...
@@ -93,9 +93,9 @@ import com.yeejoin.equipmanage.service.ISourceStatistics;
...
@@ -93,9 +93,9 @@ import com.yeejoin.equipmanage.service.ISourceStatistics;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.MqttSendGateway
;
import
com.yeejoin.equipmanage.service.MqttSendGateway
;
@Service
@Service
public
class
FireFightingSystemServiceImpl
extends
ServiceImpl
<
FireFightingSystemMapper
,
FireFightingSystemEntity
>
implements
IFireFightingSystemService
{
public
class
FireFightingSystemServiceImpl
extends
ServiceImpl
<
FireFightingSystemMapper
,
FireFightingSystemEntity
>
implements
IFireFightingSystemService
{
@Autowired
@Autowired
FireFightingSystemMapper
fireFightingSystemMapper
;
FireFightingSystemMapper
fireFightingSystemMapper
;
...
@@ -182,15 +182,16 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -182,15 +182,16 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
this
.
baseMapper
.
getEquipCountBySystemId
(
systemId
);
return
this
.
baseMapper
.
getEquipCountBySystemId
(
systemId
);
}
}
@Override
@Override
public
List
<
EquiplistSpecificBySystemVO
>
getEquiplistBySystemId
(
Long
systemId
)
{
public
List
<
EquiplistSpecificBySystemVO
>
getEquiplistBySystemId
(
Long
systemId
)
{
return
this
.
baseMapper
.
getEquiplistBySystemId
(
systemId
);
return
this
.
baseMapper
.
getEquiplistBySystemId
(
systemId
);
}
}
@Override
@Override
public
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
)
{
public
Map
<
String
,
Object
>
queryEquipmenInfoAndCount
(
String
equimentName
,
String
equimentCode
,
String
construction
,
Map
<
String
,
Object
>
map
=
equipmentManageService
.
queryEquipmenInfoAndCount
(
equimentName
,
equimentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
);
String
maintenance
,
String
bizOrgCode
,
String
formGroupId
,
int
current
,
int
pageSize
)
{
Map
<
String
,
Object
>
map
=
equipmentManageService
.
queryEquipmenInfoAndCount
(
equimentName
,
equimentCode
,
construction
,
maintenance
,
bizOrgCode
,
formGroupId
,
current
,
pageSize
);
List
<
EquipmentManageVo
>
dataList
=
(
List
<
EquipmentManageVo
>)
map
.
get
(
"dataList"
);
List
<
EquipmentManageVo
>
dataList
=
(
List
<
EquipmentManageVo
>)
map
.
get
(
"dataList"
);
StringBuilder
stb
=
new
StringBuilder
();
StringBuilder
stb
=
new
StringBuilder
();
dataList
.
forEach
(
y
->
{
dataList
.
forEach
(
y
->
{
...
@@ -235,7 +236,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -235,7 +236,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
});
});
String
userId
=
remoteSecurityService
.
getAgencyUser
().
getUserId
();
String
userId
=
remoteSecurityService
.
getAgencyUser
().
getUserId
();
//
冗余名称,数据同步使用
//
冗余名称,数据同步使用
this
.
setChargePersonName
(
vo
);
this
.
setChargePersonName
(
vo
);
String
s
=
String
.
valueOf
(
System
.
currentTimeMillis
());
String
s
=
String
.
valueOf
(
System
.
currentTimeMillis
());
vo
.
setId
(
s
);
vo
.
setId
(
s
);
...
@@ -253,13 +254,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -253,13 +254,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
if
(
""
.
equals
(
vo
.
getFirstMaintenanceDate
()))
{
if
(
""
.
equals
(
vo
.
getFirstMaintenanceDate
()))
{
vo
.
setFirstMaintenanceDate
(
null
);
vo
.
setFirstMaintenanceDate
(
null
);
}
}
//
1.保存动态表单数据
//
1.保存动态表单数据
if
(
vo
.
getFormInstances
()
!=
null
&&
vo
.
getFormInstances
().
size
()
>
0
)
{
if
(
vo
.
getFormInstances
()
!=
null
&&
vo
.
getFormInstances
().
size
()
>
0
)
{
Long
instanceId
=
instanceService
.
saveInstanceBatch
(
vo
.
getFormInstances
());
Long
instanceId
=
instanceService
.
saveInstanceBatch
(
vo
.
getFormInstances
());
vo
.
setInstanceId
(
instanceId
);
vo
.
setInstanceId
(
instanceId
);
s
=
s
+
","
+
instanceId
;
s
=
s
+
","
+
instanceId
;
}
}
//
2.保存消防系统数据
//
2.保存消防系统数据
int
save
=
fireFightingSystemMapper
.
save
(
vo
);
int
save
=
fireFightingSystemMapper
.
save
(
vo
);
if
(
save
>
0
&&
syncSwitch
)
{
if
(
save
>
0
&&
syncSwitch
)
{
// AST数据同步
// AST数据同步
...
@@ -268,12 +269,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -268,12 +269,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
else
{
}
else
{
return
s
;
return
s
;
}
}
//
3.保存图片数据
//
3.保存图片数据
this
.
insertFiles
(
vo
);
this
.
insertFiles
(
vo
);
return
s
;
return
s
;
}
}
@Override
@Override
public
String
update
(
FireFightingSystemVo
vo
)
{
public
String
update
(
FireFightingSystemVo
vo
)
{
if
(!
systemCodeCheck
(
vo
))
{
if
(!
systemCodeCheck
(
vo
))
{
...
@@ -288,7 +288,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -288,7 +288,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
});
});
String
userId
=
remoteSecurityService
.
getAgencyUser
().
getUserId
();
String
userId
=
remoteSecurityService
.
getAgencyUser
().
getUserId
();
vo
.
setRecUserId
(
userId
);
vo
.
setRecUserId
(
userId
);
//
冗余名称,数据同步使用
//
冗余名称,数据同步使用
this
.
setChargePersonName
(
vo
);
this
.
setChargePersonName
(
vo
);
if
(
""
.
equals
(
vo
.
getInstallDate
()))
{
if
(
""
.
equals
(
vo
.
getInstallDate
()))
{
vo
.
setInstallDate
(
null
);
vo
.
setInstallDate
(
null
);
...
@@ -305,14 +305,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -305,14 +305,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
else
{
}
else
{
return
null
;
return
null
;
}
}
//
1.更新消防系统数据
//
1.更新消防系统数据
String
sequenceNbr
=
vo
.
getId
();
String
sequenceNbr
=
vo
.
getId
();
fireFightingSystemMapper
.
deleteFilre
(
sequenceNbr
);
fireFightingSystemMapper
.
deleteFilre
(
sequenceNbr
);
//
2.更新动态表单数据
//
2.更新动态表单数据
if
(
vo
.
getInstanceId
()
!=
null
&&
vo
.
getFormInstances
().
size
()
>
0
)
{
if
(
vo
.
getInstanceId
()
!=
null
&&
vo
.
getFormInstances
().
size
()
>
0
)
{
instanceService
.
updateInstanceBatch
(
vo
.
getInstanceId
(),
vo
.
getFormInstances
());
instanceService
.
updateInstanceBatch
(
vo
.
getInstanceId
(),
vo
.
getFormInstances
());
}
}
//
3.更新图片数据
//
3.更新图片数据
this
.
insertFiles
(
vo
);
this
.
insertFiles
(
vo
);
return
vo
.
getId
();
return
vo
.
getId
();
}
}
...
@@ -328,11 +328,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -328,11 +328,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
private
boolean
systemCodeCheck
(
FireFightingSystemVo
systemVo
)
{
private
boolean
systemCodeCheck
(
FireFightingSystemVo
systemVo
)
{
if
(
StringUtils
.
isEmpty
(
systemVo
.
getId
()))
{
if
(
StringUtils
.
isEmpty
(
systemVo
.
getId
()))
{
// 新建系统时
// 新建系统时
int
count
=
this
.
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
FireFightingSystemEntity
>().
eq
(
FireFightingSystemEntity:
:
getCode
,
systemVo
.
getCode
()));
int
count
=
this
.
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
FireFightingSystemEntity
>()
.
eq
(
FireFightingSystemEntity:
:
getCode
,
systemVo
.
getCode
()));
return
count
<
1
;
return
count
<
1
;
}
else
{
}
else
{
int
count
=
int
count
=
this
.
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
FireFightingSystemEntity
>()
this
.
baseMapper
.
selectCount
(
new
LambdaQueryWrapper
<
FireFightingSystemEntity
>().
eq
(
FireFightingSystemEntity:
:
getCode
,
systemVo
.
getCode
()).
ne
(
FireFightingSystemEntity:
:
getId
,
systemVo
.
getId
()));
.
eq
(
FireFightingSystemEntity:
:
getCode
,
systemVo
.
getCode
())
.
ne
(
FireFightingSystemEntity:
:
getId
,
systemVo
.
getId
()));
return
count
<
1
;
return
count
<
1
;
}
}
}
}
...
@@ -363,7 +365,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -363,7 +365,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Transactional
@Transactional
public
ResourceDTO
updateMorphic
(
ResourceDTO
resourceDTO
)
{
public
ResourceDTO
updateMorphic
(
ResourceDTO
resourceDTO
)
{
try
{
try
{
//
1.更新画布信息
//
1.更新画布信息
resourceDTO
.
setSubjectId
(
projectSeq
);
resourceDTO
.
setSubjectId
(
projectSeq
);
resourceDTO
.
setSubjectid
(
projectSeq
);
resourceDTO
.
setSubjectid
(
projectSeq
);
String
content
=
resourceDTO
.
getContent
();
String
content
=
resourceDTO
.
getContent
();
...
@@ -376,14 +378,15 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -376,14 +378,15 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
content
=
JSONObject
.
toJSONString
(
parse
);
content
=
JSONObject
.
toJSONString
(
parse
);
resourceDTO
.
setContent
(
content
);
resourceDTO
.
setContent
(
content
);
FeignUtil
.
remoteCall
(()
->
Morphic
.
morphicSubjectClient
.
update
(
resourceDTO
));
FeignUtil
.
remoteCall
(()
->
Morphic
.
morphicSubjectClient
.
update
(
resourceDTO
));
//
2.更新业务关联的画布id
//
2.更新业务关联的画布id
Long
systemId
=
Long
.
valueOf
(
resourceDTO
.
getCode
());
Long
systemId
=
Long
.
valueOf
(
resourceDTO
.
getCode
());
FireFightingSystemVo
systemVo
=
new
FireFightingSystemVo
();
FireFightingSystemVo
systemVo
=
new
FireFightingSystemVo
();
systemVo
.
setId
(
String
.
valueOf
(
systemId
));
systemVo
.
setId
(
String
.
valueOf
(
systemId
));
systemVo
.
setSceneId
(
resourceDTO
.
getId
());
systemVo
.
setSceneId
(
resourceDTO
.
getId
());
fireFightingSystemMapper
.
setSceneId
(
systemVo
);
fireFightingSystemMapper
.
setSceneId
(
systemVo
);
//3.保存场景关联信息表
// 3.保存场景关联信息表
SourceScene
sourceScene
=
sourceSceneMapper
.
selectOne
(
new
LambdaQueryWrapper
<
SourceScene
>().
eq
(
SourceScene:
:
getSceneId
,
resourceDTO
.
getId
()));
SourceScene
sourceScene
=
sourceSceneMapper
.
selectOne
(
new
LambdaQueryWrapper
<
SourceScene
>().
eq
(
SourceScene:
:
getSceneId
,
resourceDTO
.
getId
()));
if
(
sourceScene
==
null
)
{
if
(
sourceScene
==
null
)
{
sourceScene
=
new
SourceScene
();
sourceScene
=
new
SourceScene
();
sourceScene
.
setProjectId
(
String
.
valueOf
(
projectSeq
));
sourceScene
.
setProjectId
(
String
.
valueOf
(
projectSeq
));
...
@@ -391,7 +394,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -391,7 +394,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
sourceScene
.
setSourceName
(
resourceDTO
.
getName
());
sourceScene
.
setSourceName
(
resourceDTO
.
getName
());
sourceScene
.
setSceneId
(
resourceDTO
.
getId
());
sourceScene
.
setSceneId
(
resourceDTO
.
getId
());
}
}
//
TODO 获取画布下 绑定的装备点、摄像头,目前消防系统只能绑定装备,不能绑定摄像头(树未返回摄像头)
//
TODO 获取画布下 绑定的装备点、摄像头,目前消防系统只能绑定装备,不能绑定摄像头(树未返回摄像头)
List
<
Map
>
children
=
(
List
<
Map
>)
parse
.
get
(
"children"
);
List
<
Map
>
children
=
(
List
<
Map
>)
parse
.
get
(
"children"
);
String
pointInScene
=
""
;
String
pointInScene
=
""
;
String
videoInScene
=
""
;
String
videoInScene
=
""
;
...
@@ -399,10 +402,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -399,10 +402,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
for
(
Map
<
String
,
String
>
map
:
children
)
{
for
(
Map
<
String
,
String
>
map
:
children
)
{
String
key
=
map
.
get
(
"key"
);
String
key
=
map
.
get
(
"key"
);
if
(!
""
.
equals
(
key
)
&&
"equipment"
.
equals
(
key
))
{
if
(!
""
.
equals
(
key
)
&&
"equipment"
.
equals
(
key
))
{
pointInScene
=
""
.
equals
(
pointInScene
)
?
map
.
get
(
"sequenceNbr"
)
:
pointInScene
+
","
+
map
.
get
(
"sequenceNbr"
);
pointInScene
=
""
.
equals
(
pointInScene
)
?
map
.
get
(
"sequenceNbr"
)
:
pointInScene
+
","
+
map
.
get
(
"sequenceNbr"
);
}
}
if
(!
""
.
equals
(
key
)
&&
"video"
.
equals
(
key
))
{
if
(!
""
.
equals
(
key
)
&&
"video"
.
equals
(
key
))
{
videoInScene
=
""
.
equals
(
videoInScene
)
?
map
.
get
(
"sequenceNbr"
)
:
videoInScene
+
","
+
map
.
get
(
"sequenceNbr"
);
videoInScene
=
""
.
equals
(
videoInScene
)
?
map
.
get
(
"sequenceNbr"
)
:
videoInScene
+
","
+
map
.
get
(
"sequenceNbr"
);
}
}
}
}
}
}
...
@@ -515,13 +520,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -515,13 +520,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
*/
*/
public
List
<
PointTreeVo
>
transferListToPointTree
(
List
<
PointTreeVo
>
allRiskSource
,
String
id
)
{
public
List
<
PointTreeVo
>
transferListToPointTree
(
List
<
PointTreeVo
>
allRiskSource
,
String
id
)
{
List
<
PointTreeVo
>
treeList
=
new
ArrayList
<>();
List
<
PointTreeVo
>
treeList
=
new
ArrayList
<>();
//
TODO id为空,为消防建筑使用;id不为空,为点位图使用
//
TODO id为空,为消防建筑使用;id不为空,为点位图使用
List
<
PointTreeVo
>
pointData
=
fireFightingSystemMapper
.
getPointData
(
id
);
List
<
PointTreeVo
>
pointData
=
fireFightingSystemMapper
.
getPointData
(
id
);
if
(!
CollectionUtils
.
isEmpty
(
pointData
))
{
if
(!
CollectionUtils
.
isEmpty
(
pointData
))
{
List
<
Long
>
idList
=
pointData
.
stream
().
map
(
PointTreeVo:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
List
<
Long
>
idList
=
pointData
.
stream
().
map
(
PointTreeVo:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
List
<
SpeIndexVo
>
indexVoList
=
fireFightingSystemMapper
.
getSpeIndexIn
(
idList
);
List
<
SpeIndexVo
>
indexVoList
=
fireFightingSystemMapper
.
getSpeIndexIn
(
idList
);
if
(!
CollectionUtils
.
isEmpty
(
indexVoList
))
{
if
(!
CollectionUtils
.
isEmpty
(
indexVoList
))
{
Map
<
Long
,
List
<
SpeIndexVo
>>
indexMap
=
indexVoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
SpeIndexVo:
:
getEquipmentSpecificId
));
Map
<
Long
,
List
<
SpeIndexVo
>>
indexMap
=
indexVoList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
SpeIndexVo:
:
getEquipmentSpecificId
));
pointData
.
stream
().
forEach
(
p
->
{
pointData
.
stream
().
forEach
(
p
->
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"imgPath"
,
p
.
getImgPath
());
map
.
put
(
"imgPath"
,
p
.
getImgPath
());
...
@@ -582,7 +588,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -582,7 +588,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
private
static
<
T
>
void
mapToBean
(
Map
<
String
,
Object
>
map
,
T
bean
)
{
private
static
<
T
>
void
mapToBean
(
Map
<
String
,
Object
>
map
,
T
bean
)
{
try
{
try
{
BeanUtils
.
populate
(
bean
,
map
);
BeanUtils
.
populate
(
bean
,
map
);
...
@@ -593,7 +598,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -593,7 +598,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
/**
/**
* 生成 性能指标数据
* 生成 性能指标数据
*
*
...
@@ -608,10 +612,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -608,10 +612,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
SpeIndexVo
>
statusList
=
new
ArrayList
<>();
List
<
SpeIndexVo
>
statusList
=
new
ArrayList
<>();
for
(
SpeIndexVo
vo
:
list
)
{
for
(
SpeIndexVo
vo
:
list
)
{
String
k
=
vo
.
getTypeCode
();
String
k
=
vo
.
getTypeCode
();
if
(
EquipmentRiskTypeEnum
.
GZ
.
getCode
().
equals
(
k
)
||
if
(
EquipmentRiskTypeEnum
.
GZ
.
getCode
().
equals
(
k
)
||
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
k
)
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
k
)
||
||
EquipmentRiskTypeEnum
.
YXZT
.
getCode
().
equals
(
k
)
||
EquipmentRiskTypeEnum
.
PB
.
getCode
().
equals
(
k
))
{
EquipmentRiskTypeEnum
.
YXZT
.
getCode
().
equals
(
k
)
||
EquipmentRiskTypeEnum
.
PB
.
getCode
().
equals
(
k
))
{
statusList
.
add
(
vo
);
statusList
.
add
(
vo
);
}
}
newList
.
add
(
vo
);
newList
.
add
(
vo
);
...
@@ -637,16 +639,20 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -637,16 +639,20 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
*/
*/
private
String
getStatus
(
List
<
SpeIndexVo
>
statusList
)
{
private
String
getStatus
(
List
<
SpeIndexVo
>
statusList
)
{
SpeIndexVo
indexVo
=
statusList
.
get
(
0
);
SpeIndexVo
indexVo
=
statusList
.
get
(
0
);
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"报警"
;
return
"报警"
;
}
}
if
(
EquipmentRiskTypeEnum
.
GZ
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
if
(
EquipmentRiskTypeEnum
.
GZ
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"故障"
;
return
"故障"
;
}
}
if
(
EquipmentRiskTypeEnum
.
PB
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
if
(
EquipmentRiskTypeEnum
.
PB
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
real
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"屏蔽"
;
return
"屏蔽"
;
}
}
if
(
EquipmentRiskTypeEnum
.
YXZT
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
fake
.
value
.
equals
(
indexVo
.
getValue
()))
{
if
(
EquipmentRiskTypeEnum
.
YXZT
.
getCode
().
equals
(
indexVo
.
getTypeCode
())
&&
TrueOrFalseEnum
.
fake
.
value
.
equals
(
indexVo
.
getValue
()))
{
return
"停运"
;
return
"停运"
;
}
}
return
"运行"
;
return
"运行"
;
...
@@ -677,24 +683,24 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -677,24 +683,24 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
FeignUtil
.
remoteCall
(()
->
Morphic
.
morphicSubjectClient
.
delete
(
entity
.
getSceneId
()));
FeignUtil
.
remoteCall
(()
->
Morphic
.
morphicSubjectClient
.
delete
(
entity
.
getSceneId
()));
}
}
formInstanceMapper
.
clearSystemId
(
id
);
formInstanceMapper
.
clearSystemId
(
id
);
//
解除装备与消防系统关系
//
解除装备与消防系统关系
this
.
removeBondSystemId
(
id
);
this
.
removeBondSystemId
(
id
);
this
.
baseMapper
.
deleteFilre
(
String
.
valueOf
(
id
));
this
.
baseMapper
.
deleteFilre
(
String
.
valueOf
(
id
));
int
i
=
this
.
baseMapper
.
deleteById
(
id
);
int
i
=
this
.
baseMapper
.
deleteById
(
id
);
if
(
i
>
0
&&
syncSwitch
)
{
if
(
i
>
0
&&
syncSwitch
)
{
syncDataService
.
syncDeletedFireFightingSystem
(
Arrays
.
asList
(
id
));
syncDataService
.
syncDeletedFireFightingSystem
(
Arrays
.
asList
(
id
));
}
}
//
删除动态关联表单实例数据
//
删除动态关联表单实例数据
if
(
entity
.
getInstanceId
()
!=
null
)
{
if
(
entity
.
getInstanceId
()
!=
null
)
{
instanceService
.
remove
(
instanceService
.
remove
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getInstanceId
,
new
LambdaQueryWrapper
<
DynamicFormInstance
>()
entity
.
getInstanceId
()));
.
eq
(
DynamicFormInstance:
:
getInstanceId
,
entity
.
getInstanceId
()));
}
}
return
i
>
0
;
return
i
>
0
;
}
}
private
void
removeBondSystemId
(
Long
id
)
{
private
void
removeBondSystemId
(
Long
id
)
{
List
<
EquipmentSpecific
>
equipmentSpecifics
=
equipmentSpecificSerivce
.
list
(
new
LambdaQueryWrapper
<
EquipmentSpecific
>().
like
(
EquipmentSpecific:
:
getSystemId
,
id
));
List
<
EquipmentSpecific
>
equipmentSpecifics
=
equipmentSpecificSerivce
.
list
(
new
LambdaQueryWrapper
<
EquipmentSpecific
>().
like
(
EquipmentSpecific:
:
getSystemId
,
id
));
equipmentSpecifics
.
forEach
(
equipmentSpecific
->
{
equipmentSpecifics
.
forEach
(
equipmentSpecific
->
{
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
String
>
ids
=
new
ArrayList
<>();
if
(
StringUtil
.
isNotEmpty
(
equipmentSpecific
.
getSystemId
()))
{
if
(
StringUtil
.
isNotEmpty
(
equipmentSpecific
.
getSystemId
()))
{
...
@@ -711,7 +717,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -711,7 +717,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
@Override
public
Boolean
isDeleteCanvas
(
Long
id
)
{
public
Boolean
isDeleteCanvas
(
Long
id
)
{
FireFightingSystemEntity
system
=
baseMapper
.
selectOne
(
new
QueryWrapper
<
FireFightingSystemEntity
>().
eq
(
"scene_id"
,
id
));
FireFightingSystemEntity
system
=
baseMapper
.
selectOne
(
new
QueryWrapper
<
FireFightingSystemEntity
>().
eq
(
"scene_id"
,
id
));
if
(
system
!=
null
)
{
if
(
system
!=
null
)
{
return
true
;
return
true
;
}
else
{
}
else
{
...
@@ -721,13 +728,15 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -721,13 +728,15 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
@Override
@Override
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
type
=
equipTypeAmountPage
.
getType
();
String
type
=
equipTypeAmountPage
.
getType
();
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
}
}
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
list
.
getRecords
().
forEach
(
x
->
{
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
...
@@ -736,15 +745,16 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -736,15 +745,16 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
list
;
return
list
;
}
}
@Override
@Override
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountCarList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
type
=
equipTypeAmountPage
.
getType
();
String
type
=
equipTypeAmountPage
.
getType
();
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
}
}
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountCarList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountCarList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
list
.
getRecords
().
forEach
(
x
->
{
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
...
@@ -752,14 +762,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -752,14 +762,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
});
});
return
list
;
return
list
;
}
}
@Override
@Override
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
public
IPage
<
EquipTypeImgAmountVO
>
getColaCategoryAmountEquList
(
int
hierarchy
,
String
codeHead
,
EquipTypeAmountPageDTO
equipTypeAmountPage
)
{
String
type
=
equipTypeAmountPage
.
getType
();
String
type
=
equipTypeAmountPage
.
getType
();
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
if
(!
""
.
equals
(
type
)
&&
"car"
.
equals
(
type
))
{
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setSystemId
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
equipTypeAmountPage
.
setStatus
(
null
);
}
}
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountEquList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
IPage
<
EquipTypeImgAmountVO
>
list
=
fireFightingSystemMapper
.
getColaCategoryAmountEquList
(
equipTypeAmountPage
.
getPage
(),
hierarchy
,
codeHead
,
equipTypeAmountPage
);
list
.
getRecords
().
forEach
(
x
->
{
list
.
getRecords
().
forEach
(
x
->
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
if
(!
x
.
getEqtype
().
startsWith
(
"4"
)
&&
StringUtil
.
isNotEmpty
(
x
.
getAmount
()))
{
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
x
.
setAmount
(
x
.
getAmount
().
split
(
"\\."
)[
0
]);
...
@@ -768,11 +781,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -768,11 +781,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
list
;
return
list
;
}
}
@Override
@Override
public
List
<
EquipmentManageVo
>
getSystemCategory
()
{
public
List
<
EquipmentManageVo
>
getSystemCategory
()
{
return
equipmentManageMapper
.
getSystemList
();
return
equipmentManageMapper
.
getSystemList
();
...
@@ -794,11 +802,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -794,11 +802,13 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
@Override
public
List
<
FireFightingSystem3dVo
>
get3dFightingSystemList
()
{
public
List
<
FireFightingSystem3dVo
>
get3dFightingSystemList
()
{
FeignClientResult
<
List
<
DictionarieValueModel
>>
dictValues
=
Systemctl
.
dictionarieClient
.
dictValues
(
iotCoreParam
);
FeignClientResult
<
List
<
DictionarieValueModel
>>
dictValues
=
Systemctl
.
dictionarieClient
.
dictValues
(
iotCoreParam
);
Optional
.
ofNullable
(
dictValues
).
orElseThrow
(()
->
new
BadRequest
(
"查询字段数据为空"
));
Optional
.
ofNullable
(
dictValues
).
orElseThrow
(()
->
new
BadRequest
(
"查询字段数据为空"
));
List
<
DictionarieValueModel
>
values
=
dictValues
.
getResult
();
List
<
DictionarieValueModel
>
values
=
dictValues
.
getResult
();
if
(!
CollectionUtils
.
isEmpty
(
values
))
{
if
(!
CollectionUtils
.
isEmpty
(
values
))
{
List
<
String
>
collect
=
values
.
stream
().
map
(
DictionarieValueModel:
:
getDictDataKey
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
values
.
stream
().
map
(
DictionarieValueModel:
:
getDictDataKey
)
.
collect
(
Collectors
.
toList
());
List
<
FireFightingSystem3dVo
>
list
=
fireFightingSystemMapper
.
get3dFightingSystemList
(
collect
);
List
<
FireFightingSystem3dVo
>
list
=
fireFightingSystemMapper
.
get3dFightingSystemList
(
collect
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
return
list
;
return
list
;
...
@@ -824,8 +834,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -824,8 +834,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
@Override
@Override
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
,
Long
sourceId
,
Long
systemId
,
Integer
confirmType
,
String
createDate
,
String
type
)
{
public
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
getEquipmentAlarmBySystemIdOrSourceIdVO
(
return
this
.
baseMapper
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
sourceId
,
systemId
,
confirmType
,
createDate
,
type
);
IPage
<
EquipmentAlarmBySystemIdOrSourceIdVO
>
page
,
Long
sourceId
,
Long
systemId
,
Integer
confirmType
,
String
createDate
,
String
type
)
{
return
this
.
baseMapper
.
getEquipmentAlarmBySystemIdOrSourceIdVO
(
page
,
sourceId
,
systemId
,
confirmType
,
createDate
,
type
);
}
}
private
static
String
getInet4Address
()
{
private
static
String
getInet4Address
()
{
...
@@ -833,10 +846,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -833,10 +846,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
String
ip
=
null
;
String
ip
=
null
;
try
{
try
{
nis
=
NetworkInterface
.
getNetworkInterfaces
();
nis
=
NetworkInterface
.
getNetworkInterfaces
();
for
(;
nis
.
hasMoreElements
();
)
{
for
(;
nis
.
hasMoreElements
();
)
{
NetworkInterface
ni
=
nis
.
nextElement
();
NetworkInterface
ni
=
nis
.
nextElement
();
Enumeration
<
InetAddress
>
ias
=
ni
.
getInetAddresses
();
Enumeration
<
InetAddress
>
ias
=
ni
.
getInetAddresses
();
for
(;
ias
.
hasMoreElements
();
)
{
for
(;
ias
.
hasMoreElements
();
)
{
InetAddress
ia
=
ias
.
nextElement
();
InetAddress
ia
=
ias
.
nextElement
();
if
(
ia
instanceof
Inet4Address
&&
!
ia
.
getHostAddress
().
equals
(
"127.0.0.1"
))
{
if
(
ia
instanceof
Inet4Address
&&
!
ia
.
getHostAddress
().
equals
(
"127.0.0.1"
))
{
ip
=
ia
.
getHostAddress
();
ip
=
ia
.
getHostAddress
();
...
@@ -849,7 +862,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -849,7 +862,6 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
ip
;
return
ip
;
}
}
@Override
@Override
public
Map
<
String
,
Object
>
integrationPageSysData
(
String
systemCode
,
Boolean
isUpdate
)
{
public
Map
<
String
,
Object
>
integrationPageSysData
(
String
systemCode
,
Boolean
isUpdate
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
...
@@ -887,8 +899,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -887,8 +899,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
this
.
putAll
(
data
,
fireFightingSystemMapper
.
getFireOnlSystemThreeSmall
());
this
.
putAll
(
data
,
fireFightingSystemMapper
.
getFireOnlSystemThreeSmall
());
}
else
if
(
SystemTypeEnum
.
fireFoamSys
.
getCode
().
equals
(
systemCode
))
{
}
else
if
(
SystemTypeEnum
.
fireFoamSys
.
getCode
().
equals
(
systemCode
))
{
data
=
fireFightingSystemMapper
.
fireFoamSysEquipmentIndexNumber
();
data
=
fireFightingSystemMapper
.
fireFoamSysEquipmentIndexNumber
();
}
else
if
(
SystemTypeEnum
.
fireFoamMistSys
.
getCode
().
equals
(
systemCode
)
||
SystemTypeEnum
.
envMonitoringSys
.
getCode
().
equals
(
systemCode
))
{
}
else
if
(
SystemTypeEnum
.
fireFoamMistSys
.
getCode
().
equals
(
systemCode
)
//TODO 灯泡及门状态,实时数据库刷新,存放数据,套用后续逻辑进行数据的发送
||
SystemTypeEnum
.
envMonitoringSys
.
getCode
().
equals
(
systemCode
))
{
// TODO 灯泡及门状态,实时数据库刷新,存放数据,套用后续逻辑进行数据的发送
data
=
new
HashMap
<>();
data
=
new
HashMap
<>();
data
.
put
(
"waitRefresh"
,
true
);
data
.
put
(
"waitRefresh"
,
true
);
}
else
if
(
SystemTypeEnum
.
fireWaterSys
.
getCode
().
equals
(
systemCode
))
{
}
else
if
(
SystemTypeEnum
.
fireWaterSys
.
getCode
().
equals
(
systemCode
))
{
...
@@ -914,8 +927,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -914,8 +927,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public
List
<
FireFightingSystemTreeVo
>
getSystemTreeByOrgCode
(
String
bizOrgCode
)
{
public
List
<
FireFightingSystemTreeVo
>
getSystemTreeByOrgCode
(
String
bizOrgCode
)
{
// 获取公司部门list
// 获取公司部门list
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
"COMPANY,DEPARTMENT"
,
bizOrgCode
);
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
"COMPANY,DEPARTMENT"
,
bizOrgCode
);
List
<
FireFightingSystemTreeVo
>
fireFightingSystemTreeList
=
orgUsrLists
.
stream
()
List
<
FireFightingSystemTreeVo
>
fireFightingSystemTreeList
=
orgUsrLists
.
stream
().
map
(
key
->
{
.
map
(
key
->
{
FireFightingSystemTreeVo
vo
=
new
FireFightingSystemTreeVo
();
FireFightingSystemTreeVo
vo
=
new
FireFightingSystemTreeVo
();
vo
.
setId
(
String
.
valueOf
(
key
.
getSequenceNbr
()));
vo
.
setId
(
String
.
valueOf
(
key
.
getSequenceNbr
()));
vo
.
setName
(
key
.
getBizOrgName
());
vo
.
setName
(
key
.
getBizOrgName
());
...
@@ -926,12 +938,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -926,12 +938,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
// 根据bizOrgCode获取系统list
// 根据bizOrgCode获取系统list
List
<
String
>
bizOrgCodes
=
fireFightingSystemTreeList
.
stream
().
map
(
FireFightingSystemTreeVo:
:
getBizOrgCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
bizOrgCodes
=
fireFightingSystemTreeList
.
stream
().
map
(
FireFightingSystemTreeVo:
:
getBizOrgCode
)
.
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FireFightingSystemEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
FireFightingSystemEntity:
:
getBizOrgCode
,
bizOrgCodes
);
wrapper
.
in
(
FireFightingSystemEntity:
:
getBizOrgCode
,
bizOrgCodes
);
List
<
FireFightingSystemEntity
>
fireFightingSystemEntityList
=
this
.
baseMapper
.
selectList
(
wrapper
);
List
<
FireFightingSystemEntity
>
fireFightingSystemEntityList
=
this
.
baseMapper
.
selectList
(
wrapper
);
List
<
FireFightingSystemTreeVo
>
systemList
=
fireFightingSystemEntityList
.
stream
()
List
<
FireFightingSystemTreeVo
>
systemList
=
fireFightingSystemEntityList
.
stream
().
map
(
key
->
{
.
map
(
key
->
{
FireFightingSystemTreeVo
vo
=
new
FireFightingSystemTreeVo
();
FireFightingSystemTreeVo
vo
=
new
FireFightingSystemTreeVo
();
vo
.
setId
(
String
.
valueOf
(
key
.
getId
()));
vo
.
setId
(
String
.
valueOf
(
key
.
getId
()));
vo
.
setName
(
key
.
getName
());
vo
.
setName
(
key
.
getName
());
...
@@ -942,21 +954,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -942,21 +954,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// 组装公司部门树
// 组装公司部门树
fireFightingSystemTreeList
.
addAll
(
systemList
);
fireFightingSystemTreeList
.
addAll
(
systemList
);
return
fireFightingSystemTreeList
.
stream
()
return
fireFightingSystemTreeList
.
stream
().
filter
(
d
->
!
"system"
.
equals
(
d
.
getType
()))
.
filter
(
d
->
!
"system"
.
equals
(
d
.
getType
()))
.
peek
((
m
)
->
m
.
setChildren
(
getChildren
(
m
,
fireFightingSystemTreeList
))).
collect
(
Collectors
.
toList
());
.
peek
((
m
)
->
m
.
setChildren
(
getChildren
(
m
,
fireFightingSystemTreeList
)))
.
collect
(
Collectors
.
toList
());
}
}
private
List
<
FireFightingSystemTreeVo
>
getChildren
(
FireFightingSystemTreeVo
root
,
List
<
FireFightingSystemTreeVo
>
all
)
{
private
List
<
FireFightingSystemTreeVo
>
getChildren
(
FireFightingSystemTreeVo
root
,
return
all
.
stream
().
filter
(
d
->
StringUtil
.
isNotEmpty
(
d
.
getParentId
())
&&
d
.
getParentId
().
equals
(
root
.
getId
())
List
<
FireFightingSystemTreeVo
>
all
)
{
||
(
StringUtil
.
isNotEmpty
(
d
.
getBizOrgCode
())
return
all
.
stream
()
&&
d
.
getBizOrgCode
().
equals
(
root
.
getBizOrgCode
())
.
filter
(
d
->
StringUtil
.
isNotEmpty
(
d
.
getParentId
())
&&
d
.
getParentId
().
equals
(
root
.
getId
())
&&
!
"system"
.
equals
(
root
.
getType
())
||
(
StringUtil
.
isNotEmpty
(
d
.
getBizOrgCode
())
&&
d
.
getBizOrgCode
().
equals
(
root
.
getBizOrgCode
())
&&
!
d
.
getId
().
equals
(
root
.
getId
()))
&&
!
"system"
.
equals
(
root
.
getType
())
&&
!
d
.
getId
().
equals
(
root
.
getId
())))
)
.
peek
(
m
->
m
.
setChildren
(
getChildren
(
m
,
all
))).
collect
(
Collectors
.
toList
());
.
peek
(
m
->
m
.
setChildren
(
getChildren
(
m
,
all
)))
.
collect
(
Collectors
.
toList
());
}
}
@Override
@Override
...
@@ -995,34 +1003,49 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -995,34 +1003,49 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
Collections
.
singletonList
(
parentNode
);
return
Collections
.
singletonList
(
parentNode
);
}
}
public
Object
getEquipmentTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
public
Object
getEquipmentTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
List
<
EquipmentCategory
>
equipmentTypeList
=
null
;
if
(
redisUtils
.
hasKey
(
equipTypeAndCount
+
bizOrgCode
))
{
// if (redisUtils.hasKey(equipTypeAndCount)) {
List
<
EquipmentCategory
>
typeList
=
JSONArray
.
parseArray
(
// equipmentTypeList = JSONArray.parseArray(JSONArray.toJSONString(redisUtils.get(equipTypeAndCount)), EquipmentCategory.class);
JSONArray
.
toJSONString
(
redisUtils
.
get
(
equipTypeAndCount
+
bizOrgCode
)),
EquipmentCategory
.
class
);
// } else {
return
typeList
;
}
else
{
return
refreshEquipmentTypeAndCount
(
bizOrgCode
);
}
}
public
Object
refreshEquipmentTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
if
(
responseList
==
null
||
responseList
.
size
()<
1
)
{
if
(
responseList
==
null
||
responseList
.
size
()
<
1
)
{
return
null
;
return
null
;
}
}
equipmentTypeList
=
responseList
.
stream
().
filter
(
i
->!
i
.
getCode
().
startsWith
(
"2"
)
&&
"2"
.
equals
(
i
.
getIndustryCode
())).
collect
(
Collectors
.
toList
());
List
<
EquipmentCategory
>
equipmentTypeList
=
responseList
.
stream
()
// }
.
filter
(
i
->
!
i
.
getCode
().
startsWith
(
"2"
)
&&
"2"
.
equals
(
i
.
getIndustryCode
()))
return
typeListTree
(
equipmentTypeList
,
bizOrgCode
,
SourceTypeEnum
.
EQUIPMENT
);
.
collect
(
Collectors
.
toList
());
List
<
EquipmentCategory
>
list
=
typeListTree
(
equipmentTypeList
,
bizOrgCode
,
SourceTypeEnum
.
EQUIPMENT
);
redisUtils
.
set
(
equipTypeAndCount
+
bizOrgCode
,
list
);
return
list
;
}
}
public
Object
getCarTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
public
Object
getCarTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
List
<
EquipmentCategory
>
equipmentTypeList
=
null
;
if
(
redisUtils
.
hasKey
(
carTypeAndCount
+
bizOrgCode
))
{
// if (redisUtils.hasKey(carTypeAndCount)) {
List
<
EquipmentCategory
>
typeList
=
JSONArray
.
parseArray
(
// equipmentTypeList = JSONArray.parseArray(JSONArray.toJSONString(redisUtils.get(carTypeAndCount)), EquipmentCategory.class);
JSONArray
.
toJSONString
(
redisUtils
.
get
(
carTypeAndCount
+
bizOrgCode
)),
EquipmentCategory
.
class
);
// } else {
return
typeList
;
}
else
{
return
refreshCarTypeAndCount
(
bizOrgCode
);
}
}
public
Object
refreshCarTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
if
(
responseList
==
null
||
responseList
.
size
()<
1
)
{
if
(
responseList
==
null
||
responseList
.
size
()
<
1
)
{
return
null
;
return
null
;
}
}
equipmentTypeList
=
responseList
.
stream
().
filter
(
i
->
i
.
getCode
().
startsWith
(
"2"
)
&&
"2"
.
equals
(
i
.
getIndustryCode
())).
collect
(
Collectors
.
toList
());
List
<
EquipmentCategory
>
equipmentTypeList
=
responseList
.
stream
()
// }
.
filter
(
i
->
i
.
getCode
().
startsWith
(
"2"
)
&&
"2"
.
equals
(
i
.
getIndustryCode
()))
return
typeListTree
(
equipmentTypeList
,
bizOrgCode
,
SourceTypeEnum
.
CAR
);
.
collect
(
Collectors
.
toList
());
List
<
EquipmentCategory
>
list
=
typeListTree
(
equipmentTypeList
,
bizOrgCode
,
SourceTypeEnum
.
CAR
);
redisUtils
.
set
(
carTypeAndCount
+
bizOrgCode
,
list
);
return
list
;
}
}
...
@@ -1032,12 +1055,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1032,12 +1055,14 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
.
getEquipmentCategoryList
(
Integer
.
valueOf
(
equipmentCategoryLeftTypeCode
));
.
getEquipmentCategoryList
(
Integer
.
valueOf
(
equipmentCategoryLeftTypeCode
));
return
equipmentCategorys
;
return
equipmentCategorys
;
}
}
public
List
<
EquipmentCategory
>
typeListTree
(
List
<
EquipmentCategory
>
equipmentCategorys
,
String
bizOrgCode
,
SourceTypeEnum
sourceTypeEnum
)
{
public
List
<
EquipmentCategory
>
typeListTree
(
List
<
EquipmentCategory
>
equipmentCategorys
,
String
bizOrgCode
,
SourceTypeEnum
sourceTypeEnum
)
{
List
<
EquipmentCategory
>
list
=
new
ArrayList
<>();
List
<
EquipmentCategory
>
list
=
new
ArrayList
<>();
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
Map
<
String
,
List
<
EquipmentCategory
>>
tmpMap
=
new
HashMap
<
String
,
List
<
EquipmentCategory
>>();
equipmentCategorys
.
forEach
(
action
->
{
equipmentCategorys
.
forEach
(
action
->
{
int
num
=
sourceStatistics
.
equipCategoryStatistics
(
bizOrgCode
,
sourceTypeEnum
,
action
.
getCode
());
int
num
=
sourceStatistics
.
equipCategoryStatistics
(
bizOrgCode
,
sourceTypeEnum
,
action
.
getCode
());
action
.
setCount
(
Double
.
parseDouble
(
num
+
""
));
action
.
setCount
(
Double
.
parseDouble
(
num
+
""
));
if
(
action
.
getParentId
()
==
null
)
{
if
(
action
.
getParentId
()
==
null
)
{
list
.
add
(
action
);
list
.
add
(
action
);
}
else
{
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/StockServiceImpl.java
View file @
f640a355
...
@@ -59,6 +59,7 @@ import com.yeejoin.equipmanage.mapper.StockMapper;
...
@@ -59,6 +59,7 @@ import com.yeejoin.equipmanage.mapper.StockMapper;
import
com.yeejoin.equipmanage.service.EquipmentManageService
;
import
com.yeejoin.equipmanage.service.EquipmentManageService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService
;
import
com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IJournalService
;
import
com.yeejoin.equipmanage.service.IJournalService
;
...
@@ -122,6 +123,8 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -122,6 +123,8 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
@Autowired
@Autowired
private
RelationRedisUtil
relationRedisUtil
;
private
RelationRedisUtil
relationRedisUtil
;
@Autowired
IEquipmentSpecificSerivce
equipmentSpecificSerivce
;
@Override
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
StockBill
in
(
List
<
StockDetail
>
list
,
String
type
,
AgencyUserModel
agencyUserModel
)
{
public
StockBill
in
(
List
<
StockDetail
>
list
,
String
type
,
AgencyUserModel
agencyUserModel
)
{
...
@@ -284,6 +287,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
...
@@ -284,6 +287,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
EquipmentSpecific
>
uploadListByTemplate
(
List
<
EquipmentDetailDownloadTemplateDto
>
equipmentDetailDownloadVOS
,
ReginParams
reginParams
,
AgencyUserModel
agencyUserModel
)
{
public
List
<
EquipmentSpecific
>
uploadListByTemplate
(
List
<
EquipmentDetailDownloadTemplateDto
>
equipmentDetailDownloadVOS
,
ReginParams
reginParams
,
AgencyUserModel
agencyUserModel
)
{
equipmentSpecificSerivce
.
refreshStaData
();
//添加对于装备类型统计数据的刷新
StringBuffer
fireFightSysIdsBuffer
=
new
StringBuffer
();
StringBuffer
fireFightSysIdsBuffer
=
new
StringBuffer
();
SimpleDateFormat
stf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
stf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
List
<
EquipmentSpecific
>
list
=
new
ArrayList
<>();
List
<
EquipmentSpecific
>
list
=
new
ArrayList
<>();
...
...
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