Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-qyxzpt-report
Overview
Overview
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
刘良浪
xzxt-qyxzpt-report
Commits
6ef1a389
Commit
6ef1a389
authored
Feb 16, 2023
by
liulianglang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
850340ca
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
173 additions
and
0 deletions
+173
-0
src/main/java/org/springblade/founder/tjfx/controller/WcnrfzTjController.java
+31
-0
src/main/java/org/springblade/founder/tjfx/entity/WcnrEntity.java
+27
-0
src/main/java/org/springblade/founder/tjfx/mapper/WcnrfzTjMapper.java
+1
-0
src/main/java/org/springblade/founder/tjfx/mapper/WcnrfzTjMapper.xml
+59
-0
src/main/java/org/springblade/founder/tjfx/service/AjlbSysDictService.java
+3
-0
src/main/java/org/springblade/founder/tjfx/service/impl/AjlbSysDictServiceImpl.java
+52
-0
No files found.
src/main/java/org/springblade/founder/tjfx/controller/WcnrfzTjController.java
View file @
6ef1a389
package
org
.
springblade
.
founder
.
tjfx
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.codec.Charsets
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
org.springblade.founder.tjfx.entity.TbXwZbfzxyr
;
import
org.springblade.founder.tjfx.entity.WcnrEntity
;
import
org.springblade.founder.tjfx.service.AjlbSysDictService
;
import
org.springblade.founder.tjfx.service.WcnrfzTjService
;
import
org.springblade.founder.utils.EasyUIPage
;
...
...
@@ -9,8 +13,14 @@ import org.springblade.founder.utils.R;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.List
;
import
java.util.Map
;
@RestController
...
...
@@ -80,5 +90,26 @@ public class WcnrfzTjController {
return
R
.
error
(
e
.
getMessage
());
}
}
@RequestMapping
(
"/ExportWcnrRyTjByPidTs"
)
@ResponseBody
public
void
ExportWcnrRyTjByPidTs
(
DwTjParam
dwTjParam
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
IOException
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
1
);
easyUIPage
.
setPageParaOracle
(
10000
);
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
dwTjParam
.
setBegin
(
begin
);
dwTjParam
.
setEnd
(
end
);
Map
<
String
,
Object
>
rtMap
=
ajlbSysDictService
.
ExportWcnrRyTjByPidTs
(
dwTjParam
);
List
<
WcnrEntity
>
list
=(
List
<
WcnrEntity
>)
rtMap
.
get
(
"rows"
);
response
.
setContentType
(
"application/vnd.ms-excel"
);
response
.
setCharacterEncoding
(
Charsets
.
UTF_8
.
name
());
String
fileName
=
URLEncoder
.
encode
(
"嫌疑人列表"
,
Charsets
.
UTF_8
.
name
());
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
fileName
+
".xlsx"
);
EasyExcel
.
write
(
response
.
getOutputStream
(),
TbXwZbfzxyr
.
class
).
sheet
(
"嫌疑人列表"
).
doWrite
(
list
);
}
}
src/main/java/org/springblade/founder/tjfx/entity/WcnrEntity.java
0 → 100644
View file @
6ef1a389
package
org
.
springblade
.
founder
.
tjfx
.
entity
;
import
com.alibaba.excel.annotation.ExcelIgnoreUnannotated
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.alibaba.excel.annotation.write.style.ContentRowHeight
;
import
com.alibaba.excel.annotation.write.style.HeadRowHeight
;
import
lombok.Data
;
@Data
@ColumnWidth
(
25
)
@HeadRowHeight
(
20
)
@ContentRowHeight
(
18
)
@ExcelIgnoreUnannotated
public
class
WcnrEntity
{
@ExcelProperty
(
value
=
{
"姓名"
},
index
=
0
)
private
String
zhfzxyrXm
=
null
;
@ExcelProperty
(
value
=
{
"证件号码"
},
index
=
1
)
private
String
zhfzxyrCyzjZjhm
=
null
;
@ExcelProperty
(
value
=
{
"性别"
},
index
=
2
)
private
String
zhfzxyrXbdm
=
null
;
@ExcelProperty
(
value
=
{
"户籍地"
},
index
=
3
)
private
String
hjdzXzqhdm
=
null
;
@ExcelProperty
(
value
=
{
"犯罪年龄"
},
index
=
4
)
private
String
fznl
;
}
src/main/java/org/springblade/founder/tjfx/mapper/WcnrfzTjMapper.java
View file @
6ef1a389
...
...
@@ -21,6 +21,7 @@ public interface WcnrfzTjMapper {
int
getAjlbTjTsCount
(
DwTjParam
dwTjParam
);
List
<
TbXwZbfzxyr
>
getRyTjTs
(
DwTjParam
dwTjParam
);
List
<
WcnrEntity
>
ExportRyTjTs
(
DwTjParam
dwTjParam
);
int
getRyTjTsCount
(
DwTjParam
dwTjParam
);
}
src/main/java/org/springblade/founder/tjfx/mapper/WcnrfzTjMapper.xml
View file @
6ef1a389
...
...
@@ -382,6 +382,65 @@
</select>
<select
id=
"ExportRyTjTs"
resultType=
"org.springblade.founder.tjfx.entity.WcnrEntity"
>
<include
refid=
"pagination-head"
/>
SELECT
xyr.ZHFZXYR_XM zhfzxyrXm,xyr.ZHFZXYR_ASJXGRYBH rybh,
(select name from sys_dictitem d where d.groupid = 'CODE_XB' and
xyr.ZHFZXYR_XBDM=d.code) zhfzxyrXbdm,
xyr.ZHFZXYR_CYZJ_ZJHM zhfzxyrCyzjZjhm,
xyr.ZHFZXYR_HJDZ_DZMC hjdzDzmc,
(select name from sys_dictitem where groupid='CODE_XZQH' and code=xyr.ZHFZXYR_HJDZ_XZQHDM) as hjdzXzqhdm,
xyr.zhfzxyr_xzz_dzmc as xzdDzmc,
xyr.ASJBH,
(select name from sys_dictitem d where d.groupid = 'CODE_DAZT' and
xyr.ZHFZXYR_FZXYRDAZTDM=d.code) zhfzxyrFzxyrdaztdm,
to_char(xyr.ZHRQ,'yyyy-mm-dd') zhrqstr,
trunc(months_between(asj.ASJFSSJ_ASJFSKSSJ,xyr.ZHFZXYR_CSRQ_RQGZXX) /12) fznl
from tb_xw_zbfzxyr xyr left join tb_st_asj ASJ on xyr.asjbh = ASJ.asjbh
where asj.xxsc_pdbz='0' and xyr.xxsc_pdbz='0'
and trunc(months_between(asj.ASJFSSJ_ASJFSKSSJ,xyr.ZHFZXYR_CSRQ_RQGZXX) /12)
<![CDATA[<]]>
18
<if
test=
"kssj != null and kssj != ''"
>
AND ASJ.ASJFSSJ_ASJFSKSSJ
<![CDATA[>=]]>
to_date(#{kssj, jdbcType=VARCHAR},'yyyy-mm-dd')
</if>
<if
test=
"jssj != null and jssj != ''"
>
AND ASJ.ASJFSSJ_ASJFSKSSJ
<![CDATA[<]]>
to_date(#{jssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if>
<if
test=
"ajzt != null and ajzt != '' and ajzt == '1'.toString() "
>
and ASJ.ZCJDDM = '0400'
</if>
<if
test=
"ajzt != null and ajzt != '' and ajzt == '2'.toString() "
>
and asj.ZCJDDM in ('0600','0700','0800')
</if>
<if
test=
"ajzt != null and ajzt != '' and ajzt == '3'.toString() "
>
and asj.ZCJDDM in ('0100','0200','0300','0301','0302','0400','0500')
</if>
<if
test=
"qryType == 'bdw'"
>
and ASJ.LADW_GAJGJGDM = #{unitcode}
</if>
<if
test=
"qryType == 'bxq'"
>
and ASJ.LADW_GAJGJGDM in (select code from sys_dictitem_xz where code_lev1 =#{unitcode} or
code_lev2 =#{unitcode} or code_lev3 =#{unitcode}
or code_lev4 =#{unitcode} or code_lev5 =#{unitcode})
</if>
<if
test=
"lbs != null and lbs.size() > 0"
>
and
asj.ajlbdm in
<foreach
collection=
"lbs"
item=
"dw"
separator=
","
open=
"("
close=
")"
>
#{dw,jdbcType=VARCHAR}
</foreach>
</if>
order by xyr.ZHRQ desc nulls last
<include
refid=
"pagination-tail"
/>
</select>
<select
id=
"getRyTjTsCount"
resultType=
"java.lang.Integer"
>
...
...
src/main/java/org/springblade/founder/tjfx/service/AjlbSysDictService.java
View file @
6ef1a389
...
...
@@ -17,4 +17,7 @@ public interface AjlbSysDictService {
Map
<
String
,
Object
>
getWcnrRyTjByPidTs
(
DwTjParam
dwTjParam
);
Map
<
String
,
Object
>
ExportWcnrRyTjByPidTs
(
DwTjParam
dwTjParam
);
}
src/main/java/org/springblade/founder/tjfx/service/impl/AjlbSysDictServiceImpl.java
View file @
6ef1a389
...
...
@@ -260,6 +260,58 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService {
}
@Override
public
Map
<
String
,
Object
>
ExportWcnrRyTjByPidTs
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
String
unitcode
=
dwTjParam
.
getUnitcode
();
if
(
StringUtils
.
isEmpty
(
unitcode
))
{
XzxtUser
xzxtUser
=
SecureUtil
.
getUserXzxt
();
unitcode
=
xzxtUser
.
getUnitcode
();
//获取对应用户的单位
}
System
.
out
.
println
(
unitcode
);
dwTjParam
.
setUnitcode
(
unitcode
);
// dwTjParam.setQryType("bxq");
List
<
String
>
lbs
=
new
ArrayList
<>();
List
<
DictitemXz
>
unitList
=
ajlbSysDictMapper
.
getAjlbByCode
(
dwTjParam
.
getAjlbdm
());
lbs
.
add
(
dwTjParam
.
getAjlbdm
());
for
(
DictitemXz
xz:
unitList
){
if
(
"yxj"
.
equals
(
xz
.
getLev
())){
List
<
DictitemXz
>
xjajlbs
=
ajlbSysDictMapper
.
getAjlbByCode
(
xz
.
getCode
());
for
(
DictitemXz
xjs:
xjajlbs
){
if
(
"yxj"
.
equals
(
xjs
.
getLev
())){
List
<
DictitemXz
>
xxjajlbs
=
ajlbSysDictMapper
.
getAjlbByCode
(
xjs
.
getCode
());
for
(
DictitemXz
xxjs:
xxjajlbs
){
lbs
.
add
(
xxjs
.
getCode
());
}
lbs
.
add
(
xjs
.
getCode
());
}
else
{
lbs
.
add
(
xjs
.
getCode
());
}
}
lbs
.
add
(
xz
.
getCode
());
}
else
{
lbs
.
add
(
xz
.
getCode
());
}
}
dwTjParam
.
setLbs
(
lbs
);
List
<
WcnrEntity
>
dalist
=
wcnrfzTjMapper
.
ExportRyTjTs
(
dwTjParam
);
rtMap
.
put
(
"rows"
,
dalist
);
return
rtMap
;
}
@Override
public
Map
<
String
,
Object
>
getWcnrAjlbTjByPid
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
...
...
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