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
fd5ced35
Commit
fd5ced35
authored
Aug 29, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app离线同步装备数据开关
parent
f30baabe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
23 deletions
+34
-23
DownloadFileService.java
...yeejoin/equipmanage/service/impl/DownloadFileService.java
+29
-21
application.properties
...ot-system-equip/src/main/resources/application.properties
+5
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/DownloadFileService.java
View file @
fd5ced35
...
@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.mapper.EquipmentMapper;
...
@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.mapper.EquipmentMapper;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
@@ -24,6 +25,9 @@ import java.util.Map;
...
@@ -24,6 +25,9 @@ import java.util.Map;
@Service
@Service
public
class
DownloadFileService
implements
IDownloadFileService
{
public
class
DownloadFileService
implements
IDownloadFileService
{
@Value
(
"${auth-open-fire-equip:false}"
)
private
String
authOpen
;
@Autowired
@Autowired
@Lazy
@Lazy
private
FileUploadFactory
factory
;
private
FileUploadFactory
factory
;
...
@@ -62,40 +66,44 @@ public class DownloadFileService implements IDownloadFileService {
...
@@ -62,40 +66,44 @@ public class DownloadFileService implements IDownloadFileService {
@Override
@Override
public
AppDownloadVO
appDownloadDatas
()
{
public
AppDownloadVO
appDownloadDatas
()
{
AppDownloadVO
appDownload
=
new
AppDownloadVO
();
// 装备离线同步开关
if
(
authOpen
.
equals
(
"true"
))
{
AppDownloadVO
appDownload
=
new
AppDownloadVO
();
//建筑信息
//建筑信息
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
);
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenList
(
null
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
);
appDownload
.
setBuildTree
(
allListVo
);
appDownload
.
setBuildTree
(
allListVo
);
//车辆信息
//车辆信息
appDownload
.
setDownloadCarDatas
(
carService
.
list
());
appDownload
.
setDownloadCarDatas
(
carService
.
list
());
//装备信息
//装备信息
appDownload
.
setDownloadEquipmentDatas
(
equipmentMapper
.
getDownloadEquipmentData
());
appDownload
.
setDownloadEquipmentDatas
(
equipmentMapper
.
getDownloadEquipmentData
());
//
//
// //性能指标模板
// //性能指标模板
appDownload
.
setEquipmentIndex
(
equipmentIndexService
.
list
());
appDownload
.
setEquipmentIndex
(
equipmentIndexService
.
list
());
//
//
// //性能指标
// //性能指标
appDownload
.
setEquipmentSpecificIndexs
(
equipmentSpecificIndexSerivce
.
list
());
appDownload
.
setEquipmentSpecificIndexs
(
equipmentSpecificIndexSerivce
.
list
());
//仓库
//仓库
appDownload
.
setWarehouseStructure
(
warehouseStructureService
.
list
());
appDownload
.
setWarehouseStructure
(
warehouseStructureService
.
list
());
//车载装备
//车载装备
appDownload
.
setEquipmentOnCar
(
equipmentOnCarService
.
list
());
appDownload
.
setEquipmentOnCar
(
equipmentOnCarService
.
list
());
//车载灭火药剂
//车载灭火药剂
appDownload
.
setExtinguishantOnCar
(
extinguishantOnCarService
.
list
());
appDownload
.
setExtinguishantOnCar
(
extinguishantOnCarService
.
list
());
//报废原因
//报废原因
appDownload
.
setReason
(
systemDicService
.
list
(
new
QueryWrapper
<
SystemDic
>().
eq
(
"type"
,
"ScrapReason"
)));
appDownload
.
setReason
(
systemDicService
.
list
(
new
QueryWrapper
<
SystemDic
>().
eq
(
"type"
,
"ScrapReason"
)));
return
appDownload
;
return
appDownload
;
}
return
null
;
}
}
/**
/**
...
...
amos-boot-system-equip/src/main/resources/application.properties
View file @
fd5ced35
...
@@ -114,4 +114,7 @@ redis_equip_type_count = equipTypeAndCount
...
@@ -114,4 +114,7 @@ redis_equip_type_count = equipTypeAndCount
# 权限标识-物联装备
# 权限标识-物联装备
auth-key-fire-iot-equip
=
fire_iot-equip_info
auth-key-fire-iot-equip
=
fire_iot-equip_info
\ No newline at end of file
# app离线同步装备数据开关
auth-open-fire-equip
=
false
\ No newline at end of file
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