Commit 42cd994b authored by 高建强's avatar 高建强

item:解决移动端巡检离线模式问题appDownloadDatas

parent 28decfa2
...@@ -4,6 +4,7 @@ import com.yeejoin.equipmanage.common.entity.*; ...@@ -4,6 +4,7 @@ import com.yeejoin.equipmanage.common.entity.*;
import com.yeejoin.equipmanage.common.vo.BuildingTreeVo; import com.yeejoin.equipmanage.common.vo.BuildingTreeVo;
import lombok.Data; import lombok.Data;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -18,47 +19,47 @@ public class AppDownloadVO { ...@@ -18,47 +19,47 @@ public class AppDownloadVO {
/** /**
* 装备 * 装备
*/ */
private List<DownloadEquipmentDataVO> downloadEquipmentDatas; private List<DownloadEquipmentDataVO> downloadEquipmentDatas = new ArrayList<>();
/** /**
* 车辆 * 车辆
*/ */
private List<Car> downloadCarDatas; private List<Car> downloadCarDatas = new ArrayList<>();
/** /**
* 建筑 * 建筑
*/ */
private List<BuildingTreeVo> buildTree; private List<BuildingTreeVo> buildTree = new ArrayList<>();
/** /**
*设备对应性能指标 *设备对应性能指标
*/ */
private List<EquipmentSpecificIndex> equipmentSpecificIndexs; private List<EquipmentSpecificIndex> equipmentSpecificIndexs = new ArrayList<>();
/** /**
*性能指标模板 *性能指标模板
*/ */
private List<EquipmentIndex> equipmentIndex; private List<EquipmentIndex> equipmentIndex = new ArrayList<>();
/** /**
*货位 *货位
*/ */
private List<WarehouseStructure> warehouseStructure; private List<WarehouseStructure> warehouseStructure = new ArrayList<>();
/** /**
* 车载装备 * 车载装备
*/ */
private List<EquipmentOnCar> equipmentOnCar; private List<EquipmentOnCar> equipmentOnCar = new ArrayList<>();
/** /**
* 车载灭火药剂 * 车载灭火药剂
*/ */
private List<ExtinguishantOnCar> extinguishantOnCar; private List<ExtinguishantOnCar> extinguishantOnCar = new ArrayList<>();
/** /**
*报废原因 *报废原因
*/ */
private List<SystemDic> reason; private List<SystemDic> reason = new ArrayList<>();
} }
package com.yeejoin.equipmanage.service.impl; package com.yeejoin.equipmanage.service.impl;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.equipmanage.common.entity.FormGroup; import com.yeejoin.equipmanage.common.entity.FormGroup;
import com.yeejoin.equipmanage.common.entity.SystemDic; import com.yeejoin.equipmanage.common.entity.SystemDic;
import com.yeejoin.equipmanage.common.entity.vo.AppDownloadVO; import com.yeejoin.equipmanage.common.entity.vo.AppDownloadVO;
import com.yeejoin.equipmanage.common.enums.GroupCodeEnum; import com.yeejoin.equipmanage.common.enums.GroupCodeEnum;
import com.yeejoin.equipmanage.common.utils.FileUploadFactory;
import com.yeejoin.equipmanage.common.utils.FileUploadTypeEnum;
import com.yeejoin.equipmanage.common.utils.ImportFile;
import com.yeejoin.equipmanage.common.vo.BuildingTreeVo; import com.yeejoin.equipmanage.common.vo.BuildingTreeVo;
import com.yeejoin.equipmanage.mapper.EquipmentMapper; import com.yeejoin.equipmanage.mapper.EquipmentMapper;
import com.yeejoin.equipmanage.mapper.ExtinguishantOnCarMapper;
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.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yeejoin.equipmanage.common.utils.FileUploadFactory;
import com.yeejoin.equipmanage.common.utils.FileUploadTypeEnum;
import com.yeejoin.equipmanage.common.utils.ImportFile;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -55,10 +52,11 @@ public class DownloadFileService implements IDownloadFileService { ...@@ -55,10 +52,11 @@ public class DownloadFileService implements IDownloadFileService {
public void setFactory(FileUploadFactory factory) { public void setFactory(FileUploadFactory factory) {
this.factory = factory; this.factory = factory;
} }
@Override @Override
public HSSFWorkbook DownloadFile(String type) { public HSSFWorkbook DownloadFile(String type) {
ImportFile up = factory.create(FileUploadTypeEnum.getEnum(type)); ImportFile up = factory.create(FileUploadTypeEnum.getEnum(type));
HSSFWorkbook workbook =(HSSFWorkbook) up.downloadImportFile(); HSSFWorkbook workbook = (HSSFWorkbook) up.downloadImportFile();
return workbook; return workbook;
} }
...@@ -76,13 +74,14 @@ public class DownloadFileService implements IDownloadFileService { ...@@ -76,13 +74,14 @@ public class DownloadFileService implements IDownloadFileService {
appDownload.setDownloadCarDatas(carService.list()); appDownload.setDownloadCarDatas(carService.list());
//装备信息 //装备信息
appDownload.setDownloadEquipmentDatas(equipmentMapper.getDownloadEquipmentData());
//性能指标模板
appDownload.setEquipmentIndex(equipmentIndexService.list());
//性能指标 // appDownload.setDownloadEquipmentDatas(equipmentMapper.getDownloadEquipmentData());
appDownload.setEquipmentSpecificIndexs(equipmentSpecificIndexSerivce.list()); //
// //性能指标模板
// appDownload.setEquipmentIndex(equipmentIndexService.list(queryWrapper1));
//
// //性能指标
// appDownload.setEquipmentSpecificIndexs(equipmentSpecificIndexSerivce.list(queryWrapper));
//仓库 //仓库
appDownload.setWarehouseStructure(warehouseStructureService.list()); appDownload.setWarehouseStructure(warehouseStructureService.list());
...@@ -101,6 +100,7 @@ public class DownloadFileService implements IDownloadFileService { ...@@ -101,6 +100,7 @@ public class DownloadFileService implements IDownloadFileService {
/** /**
* 建筑树数据处理 * 建筑树数据处理
*
* @param formGroup * @param formGroup
* @param allList * @param allList
* @return * @return
......
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