Commit b5e8469d authored by 王果's avatar 王果

Merge remote-tracking branch 'origin/develop_bugfix@dl' into develop_bugfix@dl

parents b0f09e52 defce221
...@@ -64,7 +64,7 @@ public class AdpterController { ...@@ -64,7 +64,7 @@ public class AdpterController {
adpterService.syncMainDeviceRelation(); adpterService.syncMainDeviceRelation();
} }
@ApiOperation(value = "buildingExcel") @ApiOperation(value = "建筑信息")
@RequestMapping(value = "/buildingExcel", method = RequestMethod.POST) @RequestMapping(value = "/buildingExcel", method = RequestMethod.POST)
public void systemExcel(HttpServletResponse response, String gatewayId) throws IOException { public void systemExcel(HttpServletResponse response, String gatewayId) throws IOException {
adpterService.buildingExcel(response, gatewayId); adpterService.buildingExcel(response, gatewayId);
......
...@@ -666,7 +666,7 @@ public class AdpterService { ...@@ -666,7 +666,7 @@ public class AdpterService {
try (OutputStream outputStream = response.getOutputStream()) { try (OutputStream outputStream = response.getOutputStream()) {
// 创建ExcelWriter // 创建ExcelWriter
ExcelWriter excelWriter = EasyExcel.write(outputStream).build(); ExcelWriter excelWriter = EasyExcel.write(outputStream).build();
// 系统信息 // 建筑信息
WriteSheet buildingSheet = EasyExcel.writerSheet(0, "建筑信息") WriteSheet buildingSheet = EasyExcel.writerSheet(0, "建筑信息")
.head(AreaExcelModel.class) .head(AreaExcelModel.class)
.build(); .build();
......
SELECT select temp.*
a.*, from (
SELECT a.*,
MAX(CASE WHEN i.field_label like '%面积%' THEN i.field_value END) area, MAX(CASE WHEN i.field_label like '%面积%' THEN i.field_value END) area,
MAX(CASE WHEN i.field_label like '%耐火%' THEN i.field_value END) level,
MAX(CASE WHEN i.field_label like '%耐火%' THEN i.field_value END) level case
when i.group_type = 'building' then '建筑'
when i.group_type = 'floor' then '楼层'
FROM when i.group_type = 'room' then '房间'
( end as type
SELECT FROM (
t.id, SELECT t.id,
t.`code` code, t.`code` code,
t.`name` name, t.`name` name,
t1.`code` parentCode, t1.`code` parentCode
CASE FROM wl_warehouse_structure t
WHEN t.`name` LIKE '%区域%'
OR t.`name` LIKE '%场%' THEN
'区域'
WHEN t.`name` LIKE '%层%' or t.`name` like '%屋顶%' THEN
'楼层'
WHEN t.`name` LIKE '%室%'
OR t.`name` LIKE '%间%'
OR t.`name` LIKE '%房%' THEN
'房间' ELSE '建筑'
END type
FROM
wl_warehouse_structure t
LEFT JOIN wl_warehouse_structure t1 ON t.parent_id = t1.id LEFT JOIN wl_warehouse_structure t1 ON t.parent_id = t1.id
) a , ) a,
wl_form_instance i wl_form_instance i
WHERE WHERE i.instance_id = a.id
i.instance_id = a.id group by a.id
group by a.id ) temp
\ 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