Commit fd5ced35 authored by litengwei's avatar litengwei

app离线同步装备数据开关

parent f30baabe
......@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.mapper.EquipmentMapper;
import com.yeejoin.equipmanage.service.*;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean;
......@@ -24,6 +25,9 @@ import java.util.Map;
@Service
public class DownloadFileService implements IDownloadFileService {
@Value("${auth-open-fire-equip:false}")
private String authOpen;
@Autowired
@Lazy
private FileUploadFactory factory;
......@@ -62,40 +66,44 @@ public class DownloadFileService implements IDownloadFileService {
@Override
public AppDownloadVO appDownloadDatas() {
AppDownloadVO appDownload = new AppDownloadVO();
// 装备离线同步开关
if(authOpen.equals("true")) {
AppDownloadVO appDownload = new AppDownloadVO();
//建筑信息
FormGroup formGroup = iFormGroupService.getByUniqueKey(GroupCodeEnum.ALL_BUILDING.getGroupCode());
List<Map<String, Object>> allList = iFormInstanceService.getSpecialChildrenList(null);
List<BuildingTreeVo> allListVo = buildBuildingData(formGroup, allList);
appDownload.setBuildTree(allListVo);
//建筑信息
FormGroup formGroup = iFormGroupService.getByUniqueKey(GroupCodeEnum.ALL_BUILDING.getGroupCode());
List<Map<String, Object>> allList = iFormInstanceService.getSpecialChildrenList(null);
List<BuildingTreeVo> allListVo = buildBuildingData(formGroup, allList);
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;
}
/**
......
......@@ -114,4 +114,7 @@ redis_equip_type_count = equipTypeAndCount
# 权限标识-物联装备
auth-key-fire-iot-equip=fire_iot-equip_info
\ No newline at end of file
auth-key-fire-iot-equip=fire_iot-equip_info
# app离线同步装备数据开关
auth-open-fire-equip=false
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment