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
c8793d07
Commit
c8793d07
authored
Jul 21, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量导出监管码
parent
a2a9da81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
2 deletions
+74
-2
EquipmentCategoryMapper.java
...s/boot/module/tzs/api/mapper/EquipmentCategoryMapper.java
+3
-0
EquipmentCategoryMapper.xml
...api/src/main/resources/mapper/EquipmentCategoryMapper.xml
+40
-0
EquipmentCategoryController.java
...odule/tzs/biz/controller/EquipmentCategoryController.java
+2
-2
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+29
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/EquipmentCategoryMapper.java
View file @
c8793d07
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipExportDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.UseUnitCreditCodeCategoryDto
;
...
...
@@ -50,4 +51,6 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List
<
EquipExportVo
>
getEquipExportData
(
@Param
(
"dto"
)
EquipExportDto
dto
);
Page
<
EquipExportVo
>
exportImageZip
(
@Param
(
"page"
)
Page
<
EquipExportVo
>
page
,
@Param
(
"dto"
)
EquipExportDto
dto
);
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/EquipmentCategoryMapper.xml
View file @
c8793d07
...
...
@@ -362,4 +362,44 @@
</where>
</select>
<select
id=
"exportImageZip"
resultType=
"com.yeejoin.amos.boot.module.tzs.api.vo.EquipExportVo"
>
select ORG_BRANCH_NAME as orgBranchName,
USE_UNIT_NAME as useUnitName,
EQU_LIST as equList,
EQU_CATEGORY as equCategory,
USE_ORG_CODE as useOrgCode,
CODE96333 as code96333,
SUPERVISORY_CODE as supervisoryCode,
USE_PLACE as usePlace,
EQU_CODE as equCode,
CASE when EQU_STATE = 0 then '未登记'
when EQU_STATE = 1 then '在用'
when EQU_STATE = 2 then '停用'
when EQU_STATE = 3 then '报废'
when EQU_STATE = 4 then '注销'
ELSE EQU_STATE
END as equState
from ${dto.tableName}
<where>
<if
test=
"dto.CODE96333 != '' and dto.CODE96333 != null"
>
CODE96333 like concat('%', #{dto.CODE96333},'%')
</if>
<if
test=
"dto.EQU_CODE != '' and dto.EQU_CODE != null"
>
and EQU_CODE like concat('%', #{dto.EQU_CODE},'%')
</if>
<if
test=
"dto.SUPERVISORY_CODE != '' and dto.SUPERVISORY_CODE != null"
>
and SUPERVISORY_CODE like concat('%', #{dto.SUPERVISORY_CODE},'%')
</if>
<if
test=
"dto.USE_UNIT_NAME != '' and dto.USE_UNIT_NAME != null"
>
and USE_UNIT_NAME like concat('%', #{dto.USE_UNIT_NAME},'%')
</if>
<if
test=
"dto.USE_ORG_CODE != '' and dto.USE_ORG_CODE != null"
>
and USE_ORG_CODE like concat('%', #{dto.USE_ORG_CODE},'%')
</if>
<if
test=
"dto.EQU_LIST_CODE != '' and dto.EQU_LIST_CODE != null"
>
and EQU_LIST_CODE = #{dto.EQU_LIST_CODE}
</if>
<if
test=
"dto.EQU_STATE != '' and dto.EQU_STATE != null"
>
and EQU_STATE = #{dto.EQU_STATE}
</if>
<if
test=
"dto.ORG_BRANCH_NAME != '' and dto.ORG_BRANCH_NAME != null"
>
and ORG_BRANCH_NAME = #{dto.ORG_BRANCH_NAME}
</if>
<if
test=
"dto.USE_PLACE != '' and dto.USE_PLACE != null"
>
and USE_PLACE = #{dto.USE_PLACE}
</if>
<if
test=
"dto.STATUS != '' and dto.STATUS != null"
>
and STATUS = #{dto.STATUS}
</if>
<if
test=
"dto.EQU_CATEGORY != '' and dto.EQU_CATEGORY != null"
>
and EQU_CATEGORY = #{dto.EQU_CATEGORY}
</if>
<if
test=
"dto.USE_UNIT_CREDIT_CODE != '' and dto.USE_UNIT_CREDIT_CODE != null"
>
and USE_UNIT_CREDIT_CODE like concat('%', #{dto.USE_UNIT_CREDIT_CODE},'%')
</if>
<if
test=
"dto.ORG_BRANCH_CODE != '' and dto.ORG_BRANCH_CODE != null"
>
and ORG_BRANCH_CODE like concat('%', #{dto.ORG_BRANCH_CODE},'%')
</if>
<if
test=
'dto.ids != null'
>
and SEQUENCE_NBR in
<foreach
collection=
"dto.ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</where>
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/EquipmentCategoryController.java
View file @
c8793d07
...
...
@@ -397,11 +397,11 @@ public class EquipmentCategoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/exportImageZip"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备监管码、电梯码批量导出压缩包"
,
notes
=
"设备监管码、电梯码批量导出压缩包"
)
public
void
exportImageZip
(
HttpServletResponse
response
,
EquipExportDto
dto
,
@RequestParam
(
"type"
)
String
type
)
throws
IOException
{
public
void
exportImageZip
(
HttpServletResponse
response
,
EquipExportDto
dto
,
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"pageNum"
)
Long
pageNum
,
@RequestParam
(
"size"
)
Long
size
)
throws
IOException
{
ImageSizeEnums
imageSizeEnums
=
ImageSizeEnums
.
getEnumByCode
(
type
);
//创建list 存放图片
List
<
File
>
fileList
=
new
ArrayList
<>();
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryServiceImpl
.
getEquipExportData
(
dto
);
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryServiceImpl
.
exportImageZip
(
dto
,
pageNum
,
size
);
List
<
EquipExportVo
>
unique
=
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
getSupervisoryCode
())).
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
EquipExportVo:
:
getSupervisoryCode
))),
ArrayList:
:
new
)
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
c8793d07
...
...
@@ -799,6 +799,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return
list
;
}
public
List
<
EquipExportVo
>
exportImageZip
(
EquipExportDto
dto
,
Long
pageNum
,
Long
size
)
{
ArrayList
<
EquipExportVo
>
list
=
new
ArrayList
<>();
List
<
JSONObject
>
objectList
=
getCompanyType
();
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getEQU_STATE
()))
{
dto
.
setEQU_STATE
(
EquimentEnum
.
getCode
.
get
(
dto
.
getEQU_STATE
()).
toString
());
}
for
(
JSONObject
object
:
objectList
)
{
String
level
=
object
.
getString
(
"level"
);
String
orgCode
=
object
.
getString
(
"orgCode"
);
String
companyCode
=
object
.
getString
(
"companyCode"
);
if
(!
ValidationUtil
.
isEmpty
(
level
))
{
Page
<
EquipExportVo
>
equipExportVoPage
=
new
Page
<>(
pageNum
,
size
);
if
(
LEVEL
.
equals
(
level
))
{
//企业
dto
.
setUSE_UNIT_CREDIT_CODE
(
companyCode
);
}
else
{
//监管单位
dto
.
setORG_BRANCH_CODE
(
orgCode
);
}
Page
<
EquipExportVo
>
equipExportData
=
equipmentCategoryMapper
.
exportImageZip
(
equipExportVoPage
,
dto
);
if
(!
ObjectUtils
.
isEmpty
(
equipExportData
)
&&
!
ObjectUtils
.
isEmpty
(
equipExportData
.
getRecords
()))
{
list
.
addAll
(
equipExportData
.
getRecords
());
}
}
}
return
list
;
}
/**
* 设备字典,通过设备父类code,获得子类
*/
...
...
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