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 (
MAX(CASE WHEN i.field_label like '%面积%' THEN i.field_value END) area, 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) level MAX(CASE WHEN i.field_label like '%耐火%' THEN i.field_value END) level,
case
when i.group_type = 'building' then '建筑'
FROM when i.group_type = 'floor' then '楼层'
( when i.group_type = 'room' then '房间'
SELECT end as type
t.id, FROM (
t.`code` code, SELECT t.id,
t.`name` name, t.`code` code,
t1.`code` parentCode, t.`name` name,
CASE t1.`code` parentCode
FROM wl_warehouse_structure t
WHEN t.`name` LIKE '%区域%' LEFT JOIN wl_warehouse_structure t1 ON t.parent_id = t1.id
OR t.`name` LIKE '%场%' THEN ) a,
'区域' wl_form_instance i
WHEN t.`name` LIKE '%层%' or t.`name` like '%屋顶%' THEN WHERE i.instance_id = a.id
'楼层' group by a.id
WHEN t.`name` LIKE '%室%' ) temp
OR t.`name` LIKE '%间%' \ No newline at end of file
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
) a ,
wl_form_instance i
WHERE
i.instance_id = a.id
group by a.id
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