Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
defce221
Commit
defce221
authored
May 09, 2025
by
李松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
65b8f734
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
36 deletions
+25
-36
AdpterController.java
.../com/yeejoin/amos/adpter/controller/AdpterController.java
+1
-1
AdpterService.java
...n/java/com/yeejoin/amos/adpter/service/AdpterService.java
+1
-1
area.sql
...ls/amos-boot-utils-adpter/src/main/resources/sql/area.sql
+23
-34
No files found.
amos-boot-utils/amos-boot-utils-adpter/src/main/java/com/yeejoin/amos/adpter/controller/AdpterController.java
View file @
defce221
...
...
@@ -64,7 +64,7 @@ public class AdpterController {
adpterService
.
syncMainDeviceRelation
();
}
@ApiOperation
(
value
=
"
buildingExcel
"
)
@ApiOperation
(
value
=
"
建筑信息
"
)
@RequestMapping
(
value
=
"/buildingExcel"
,
method
=
RequestMethod
.
POST
)
public
void
systemExcel
(
HttpServletResponse
response
,
String
gatewayId
)
throws
IOException
{
adpterService
.
buildingExcel
(
response
,
gatewayId
);
...
...
amos-boot-utils/amos-boot-utils-adpter/src/main/java/com/yeejoin/amos/adpter/service/AdpterService.java
View file @
defce221
...
...
@@ -654,7 +654,7 @@ public class AdpterService {
try
(
OutputStream
outputStream
=
response
.
getOutputStream
())
{
// 创建ExcelWriter
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
outputStream
).
build
();
//
系统
信息
//
建筑
信息
WriteSheet
buildingSheet
=
EasyExcel
.
writerSheet
(
0
,
"建筑信息"
)
.
head
(
AreaExcelModel
.
class
)
.
build
();
...
...
amos-boot-utils/amos-boot-utils-adpter/src/main/resources/sql/area.sql
View file @
defce221
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
FROM
(
SELECT
t
.
id
,
t
.
`code`
code
,
t
.
`name`
name
,
t1
.
`code`
parentCode
,
CASE
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
)
a
,
wl_form_instance
i
WHERE
i
.
instance_id
=
a
.
id
group
by
a
.
id
select
temp
.
*
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
)
level
,
case
when
i
.
group_type
=
'building'
then
'建筑'
when
i
.
group_type
=
'floor'
then
'楼层'
when
i
.
group_type
=
'room'
then
'房间'
end
as
type
FROM
(
SELECT
t
.
id
,
t
.
`code`
code
,
t
.
`name`
name
,
t1
.
`code`
parentCode
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
)
temp
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment