Commit 83b10d74 authored by 李松's avatar 李松

修改bug

parent 0d55ba14
......@@ -58,16 +58,15 @@ public class AdpterController {
adpterService.executeSqlFile(request, response, dbHost, port, dbName, userName, dbPwd, file);
}
@ApiOperation(value = "区域信息")
@RequestMapping(value = "/areaExcel", method = RequestMethod.POST)
public void export(HttpServletResponse response,
@RequestParam(value = "type", required = false) String type) throws IOException {
adpterService.areaExcel(response);
@ApiOperation(value = "主设备关联信息同步")
@RequestMapping(value = "/syncMainDeviceRelation", method = RequestMethod.POST)
public void syncMainDeviceRelation() throws IOException {
adpterService.syncMainDeviceRelation();
}
@ApiOperation(value = "设备信息信息")
@RequestMapping(value = "/deviceExcel", method = RequestMethod.POST)
public void deviceExcel(HttpServletResponse response, String gatewayId) throws IOException {
adpterService.deviceExcel(response, gatewayId);
@ApiOperation(value = "buildingExcel")
@RequestMapping(value = "/buildingExcel", method = RequestMethod.POST)
public void systemExcel(HttpServletResponse response, String gatewayId) throws IOException {
adpterService.buildingExcel(response, gatewayId);
}
}
\ No newline at end of file
package com.yeejoin.amos.adpter.model;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class SystemExcelModel {
@ExcelProperty(value = "编码", index = 0)
private String code;
@ExcelProperty(value = "上级编码", index = 1)
private String parentCode;
@ExcelProperty(value = "类型", index = 2)
private String type;
@ExcelProperty(value = "网关名称", index = 3)
private String gatewayName;
@ExcelProperty(value = "系统类型", index = 4)
private String category;
@ExcelProperty(value = "系统名称", index = 5)
private String name;
}
select temp.* from
(
SELECT '网关设备' as gatewayDevice,
wws.code as areaCode,
wes.code as deviceCode,
we.name as deviceType,
wes.name as deviceName,
wed.standard as specs,
DATE_FORMAT(wed.production_date, '%Y-%m-%d') as productionDate,
DATE_FORMAT(wed.delivery_date, '%Y-%m-%d') as useDate
FROM `wl_equipment_specific` wes
INNER JOIN wl_equipment we ON wes.equipment_code = we.code
LEFT JOIN wl_equipment_detail wed ON wes.equipment_detail_id = wed.id
LEFT JOIN wl_warehouse_structure wws ON wes.warehouse_structure_id = wws.id
WHERE we.CODE LIKE '3%')temp
\ No newline at end of file
select temp.* from (
SELECT
fe.code as deviceCode,
fe.name as deviceName,
(SELECT wws.code
from wl_warehouse_structure wws
where wws.id = fe.risk_source_id) as areaCode,
'换流变' as deviceType
FROM `f_equipment` fe
)temp
\ No newline at end of file
SELECT *
from (
SELECT fefe.id, fefe.fire_equipment_id,
(SELECT wes.code from wl_equipment_specific wes where wes.id = fefe.fire_equipment_id) as deviceCode,
fefe.equipment_id,
(SELECT fe.`code` from f_equipment fe where fefe.equipment_id = fe.id) as mainDeviceCode
from f_equipment_fire_equipment fefe
) temp
where temp.deviceCode is not null
and temp.mainDeviceCode is not null
\ No newline at end of file
select temp.* from (
SELECT sys.NAME as name,
sys.CODE as code,
dfg.group_name as category,
'系统' as type,
'网关名称' as gatewayName,
'' as parentCode
FROM `f_fire_fighting_system` sys
LEFT JOIN wl_dynamic_form_group dfg ON sys.system_type = dfg.relation_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