Commit fd5ced35 authored by litengwei's avatar litengwei

app离线同步装备数据开关

parent f30baabe
...@@ -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;
} }
/** /**
......
...@@ -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
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