|
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.excel.EasyExcel;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
|
|
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
@@ -388,7 +387,7 @@ public class AdmSystemController {
|
|
|
fileName = URLEncoder.encode(fileName, encode);
|
|
|
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
|
|
- List<SystemPointExcel> systemPointExcels = dealEquipmentPoint(admProject.getGroupCode(),admProject.getId(),type, false, null);
|
|
|
+ List<SystemPointExcel> systemPointExcels = dealSystemPoint(admProject.getGroupCode(),admProject.getId(),type, false, null);
|
|
|
EasyExcel.write(response.getOutputStream(), SystemPointExcel.class).sheet("sheet1").doWrite(systemPointExcels);
|
|
|
}
|
|
|
}catch (Exception e){
|
|
@@ -402,7 +401,7 @@ public class AdmSystemController {
|
|
|
* @param projectId
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<SystemPointExcel> dealEquipmentPoint(String groupCode, String projectId, String type, Boolean withBuilding, String buildingId){
|
|
|
+ private List<SystemPointExcel> dealSystemPoint(String groupCode, String projectId, String type, Boolean withBuilding, String buildingId){
|
|
|
if(StrUtil.isAllNotEmpty(groupCode,projectId)){
|
|
|
// 结果封装
|
|
|
List<SystemPointExcel> excelList = new ArrayList<>();
|
|
@@ -412,10 +411,10 @@ public class AdmSystemController {
|
|
|
requestData.setGroupCode(groupCode);
|
|
|
requestData.setObjType(AdmSystem.OBJ_TYPE);
|
|
|
requestData.setObjTypes(CollUtil.newHashSet(AdmSystem.OBJ_TYPE));
|
|
|
- List<Map<String, Object>> equipTypeList = DigitalObjectSimpleFacade.queryDefineInfoByObjType(groupCode,projectId,null,null,requestData);
|
|
|
+ List<Map<String, Object>> sysTypeList = DigitalObjectSimpleFacade.queryDefineInfoByObjType(groupCode,projectId,null,null,requestData);
|
|
|
/** 统计信息不为空继续 */
|
|
|
- if (equipTypeList.size() > 0 ) {
|
|
|
- for(int i = 0; i < equipTypeList.size(); i++){
|
|
|
+ if (sysTypeList.size() > 0 ) {
|
|
|
+ for(int i = 0; i < sysTypeList.size(); i++){
|
|
|
AdmDictQueryCriteria admQueryCriteriaInfo = new AdmDictQueryCriteria();
|
|
|
/** 是否查询静态信息点 */
|
|
|
if (type.equals("static")){
|
|
@@ -424,12 +423,12 @@ public class AdmSystemController {
|
|
|
admQueryCriteriaInfo.addFilters("category != 'STATIC'");
|
|
|
}
|
|
|
admQueryCriteriaInfo.addFilters("valid = 1 ");
|
|
|
- admQueryCriteriaInfo.addFilters("classCode = '" + equipTypeList.get(i).get("code").toString() + "'");
|
|
|
+ admQueryCriteriaInfo.addFilters("classCode = '" + sysTypeList.get(i).get("code").toString() + "'");
|
|
|
|
|
|
AdmQueryCriteria admQueryCriteriaSys = new AdmQueryCriteria();
|
|
|
- admQueryCriteriaSys.addFilters("classCode = '" + equipTypeList.get(i).get("code").toString() + "'");
|
|
|
+ admQueryCriteriaSys.addFilters("classCode = '" + sysTypeList.get(i).get("code").toString() + "'");
|
|
|
admQueryCriteriaSys.addFilters("not infos isnull");
|
|
|
- admQueryCriteriaSys.setName(AdmEquipment.OBJ_TYPE);
|
|
|
+ admQueryCriteriaSys.setName(AdmSystem.OBJ_TYPE);
|
|
|
if(withBuilding){
|
|
|
if(StrUtil.isNotEmpty(buildingId)){
|
|
|
admQueryCriteriaSys.addFilters("buildingId = '"+buildingId+"'");
|
|
@@ -485,7 +484,7 @@ public class AdmSystemController {
|
|
|
/** 类型 */
|
|
|
excel.setClassCode(admSystem.getClassCode());
|
|
|
/** 类型 */
|
|
|
- excel.setClassCodeName(equipTypeList.get(i).get("name").toString());
|
|
|
+ excel.setClassCodeName(sysTypeList.get(i).get("name").toString());
|
|
|
/** 一级标签 */
|
|
|
boolean containsFirstName = mapInputFirstName.containsKey(key);
|
|
|
if (containsFirstName) {
|