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
54e6f576
Commit
54e6f576
authored
Nov 01, 2024
by
hekaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增 检验检测结果列表导出接口
parent
e8ff69b4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
5 deletions
+111
-5
JyjcInspectionResultMapper.java
...ot/module/jyjc/api/mapper/JyjcInspectionResultMapper.java
+4
-0
JyjcInspectionResultVo.java
.../amos/boot/module/jyjc/api/vo/JyjcInspectionResultVo.java
+53
-0
JyjcInspectionResultMapper.xml
.../src/main/resources/mapper/JyjcInspectionResultMapper.xml
+22
-5
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+11
-0
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+21
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcInspectionResultMapper.java
View file @
54e6f576
...
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionTimelinesDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResult
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcInspectionApplicationVo
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcInspectionResultVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -23,4 +25,6 @@ public interface JyjcInspectionResultMapper extends BaseMapper<JyjcInspectionRes
Page
<
JyjcInspectionResultModel
>
selectForPage
(
@Param
(
"page"
)
Page
<
JyjcInspectionResultModel
>
page
,
@Param
(
"jyjcInspectionResultModel"
)
JyjcInspectionResultModel
jyjcInspectionResultModel
,
@Param
(
"identity"
)
String
identity
);
List
<
InspectionTimelinesDto
>
queryInspectionTimelinessTopXX
(
@Param
(
"top"
)
String
top
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
dpFilterParamDto
);
List
<
JyjcInspectionResultVo
>
queryExportInIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/vo/JyjcInspectionResultVo.java
0 → 100644
View file @
54e6f576
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
@Data
public
class
JyjcInspectionResultVo
{
@ExcelProperty
(
value
=
"报检单编号"
,
index
=
0
)
String
applicationNo
;
@ExcelProperty
(
value
=
"报检日期"
,
index
=
1
)
String
applicationDate
;
@ExcelProperty
(
value
=
"检验类型"
,
index
=
2
)
String
inspectionTypeName
;
@ExcelProperty
(
value
=
"报检单位"
,
index
=
3
)
String
applicationUnitName
;
@ExcelProperty
(
value
=
"检验检测机构"
,
index
=
4
)
String
inspectionUnitName
;
@ExcelProperty
(
value
=
"设备种类"
,
index
=
5
)
String
equListName
;
@ExcelProperty
(
value
=
"监管码"
,
index
=
6
)
String
supervisoryCode
;
@ExcelProperty
(
value
=
"设备代码"
,
index
=
7
)
String
equCode
;
@ExcelProperty
(
value
=
"使用登记证编号"
,
index
=
8
)
String
useOrgCode
;
@ExcelProperty
(
value
=
"单位内部编号"
,
index
=
9
)
String
useInnerCode
;
@ExcelProperty
(
value
=
"设备地址"
,
index
=
10
)
String
equUseAddress
;
@ExcelProperty
(
value
=
"检验结果"
,
index
=
11
)
String
resultStatus
;
public
String
getResultStatus
()
{
return
resultStatus
;
}
public
void
setResultStatus
(
String
resultStatus
)
{
this
.
resultStatus
=
resultStatus
;
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionResultMapper.xml
View file @
54e6f576
...
...
@@ -59,8 +59,7 @@
ORDER BY application_date DESC
</select>
<select
id=
"selectForPage"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel"
>
<sql
id=
"page-list"
>
SELECT
res.sequence_nbr,
res.inspection_unit_code,
...
...
@@ -103,9 +102,14 @@
concat(ibjui.province_name, ibjui.city_name,ibjui.county_name, ibjui.street_name,ibjui.ADDRESS ) as equUseAddress
FROM
tz_jyjc_inspection_result res
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.record = res.equip_unicode
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.record = ibjri.record
LEFT JOIN idx_biz_jg_other_info ot ON ot.record = ibjri.record
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.record = res.equip_unicode
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.record = ibjri.record
LEFT JOIN idx_biz_jg_other_info ot ON ot.record = ibjri.record
</sql>
<select
id=
"selectForPage"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel"
>
<include
refid=
"page-list"
/>
<where>
<if
test=
"jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null"
>
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
...
...
@@ -178,4 +182,17 @@
WHERE
a1.inspection_unit_code = b1.use_unit_code
</select>
<select
id=
"queryExportInIds"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcInspectionResultVo"
>
<include
refid=
"page-list"
/>
<where>
<if
test=
'ids != null'
>
and res.sequence_nbr in
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</where>
order by res.application_no desc
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionResultController.java
View file @
54e6f576
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.feign.systemctl.model.DictionarieModel;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -16,6 +17,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -195,4 +198,12 @@ public class JyjcInspectionResultController extends BaseController {
public
ResponseModel
<
List
<
DictionarieModel
>>
inspectTypeListByPerson
(){
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
inspectTypeListByPerson
(
getSelectedOrgInfo
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"检验检测结果列表数据导出"
,
notes
=
"检验检测结果列表数据导出"
)
public
void
Export
(
HttpServletResponse
response
,
String
ids
)
{
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
jyjcInspectionResultServiceImpl
.
Export
(
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
54e6f576
...
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -28,6 +29,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultAttachmentService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultParamService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionResultService
;
import
com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcInspectionResultVo
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionDetectionSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.UseInfoSaveToDbEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher
;
...
...
@@ -52,6 +54,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -531,4 +534,21 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
updateWrapper
.
set
(
JyjcInspectionResult:
:
getPlanCreateDate
,
new
Date
());
this
.
update
(
updateWrapper
);
}
/**
* 检验检测结果列表数据导出
* @param response
* @param ids
*/
public
void
Export
(
HttpServletResponse
response
,
List
<
String
>
ids
)
{
List
<
JyjcInspectionResultVo
>
exportData
=
this
.
baseMapper
.
queryExportInIds
(
ids
);
for
(
JyjcInspectionResultVo
vo
:
exportData
)
{
if
(
vo
.
getResultStatus
().
equals
(
"1"
))
{
vo
.
setResultStatus
(
"未出"
);
}
else
if
(
vo
.
getResultStatus
().
equals
(
"2"
))
{
vo
.
setResultStatus
(
"已出"
);
}
}
ExcelUtil
.
createTemplate
(
response
,
"检验检测结果列表数据"
,
"检验检测结果列表"
,
exportData
,
JyjcInspectionResultVo
.
class
,
null
,
false
);
}
}
\ 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