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
e84087ea
Commit
e84087ea
authored
Feb 08, 2023
by
liulianglang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
案件类别统计报表
parent
c7fcb177
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
703 additions
and
19 deletions
+703
-19
src/main/java/org/springblade/founder/tjfx/controller/DwAjlbTjfxController.java
+78
-4
src/main/java/org/springblade/founder/tjfx/controller/DwTjfxController.java
+96
-0
src/main/java/org/springblade/founder/tjfx/entity/AjtjParam.java
+1
-0
src/main/java/org/springblade/founder/tjfx/entity/AjtjResult.java
+2
-0
src/main/java/org/springblade/founder/tjfx/entity/DwDaztTj.java
+13
-0
src/main/java/org/springblade/founder/tjfx/entity/DwTjParam.java
+2
-0
src/main/java/org/springblade/founder/tjfx/mapper/AjlbSysDictMapper.java
+13
-0
src/main/java/org/springblade/founder/tjfx/mapper/AjlbSysDictMapper.xml
+20
-0
src/main/java/org/springblade/founder/tjfx/mapper/DwAjlbTjfxMapper.java
+8
-3
src/main/java/org/springblade/founder/tjfx/mapper/DwAjlbTjfxMapper.xml
+101
-5
src/main/java/org/springblade/founder/tjfx/service/AjlbSysDictService.java
+10
-0
src/main/java/org/springblade/founder/tjfx/service/DwAjlbTjfxService.java
+7
-0
src/main/java/org/springblade/founder/tjfx/service/impl/AjlbSysDictServiceImpl.java
+162
-0
src/main/java/org/springblade/founder/tjfx/service/impl/DwAjlbTjfxServiceImpl.java
+190
-7
No files found.
src/main/java/org/springblade/founder/tjfx/controller/DwAjlbTjfxController.java
View file @
e84087ea
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.service.DwAjlbTjfxService
;
import
org.springblade.founder.utils.EasyUIPage
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
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
...
...
@@ -29,6 +35,18 @@ public class DwAjlbTjfxController {
return
R
.
error
(
e
.
getMessage
());
}
}
// @PostMapping("/getAjlbTjByPid")
// @ApiOperation(value = "单位案件类别统计")
// public R getAjlbTjByPid(DwTjParam dwTjParam){
// try {
// Map<String, Object> rtMap = dwTjfxService.getDwTj(unitcode, kssj, jssj,ajzt,ajlbdm,xlajlbdm);
// return R.ok().data(rtMap);
// } catch (Exception e) {
// e.printStackTrace();
// return R.error(e.getMessage());
// }
// }
@PostMapping
(
"/getXlAjlbTj"
)
@ApiOperation
(
value
=
"单位小类案件类别统计"
)
...
...
@@ -46,6 +64,13 @@ public class DwAjlbTjfxController {
@ApiOperation
(
value
=
"单位小类案件类别统计透视"
)
public
R
getXlAjlbTjTs
(
DwTjParam
dwTjParam
){
try
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
dwTjParam
.
getPage
());
easyUIPage
.
setPageParaOracle
(
dwTjParam
.
getLimit
());
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
dwTjParam
.
setBegin
(
begin
);
dwTjParam
.
setEnd
(
end
);
Map
<
String
,
Object
>
rtMap
=
dwAjlbTjfxService
.
getXlAjlbTjTs
(
dwTjParam
);
return
R
.
ok
().
data
(
rtMap
);
}
catch
(
Exception
e
)
{
...
...
@@ -54,6 +79,55 @@ public class DwAjlbTjfxController {
}
}
@PostMapping
(
"/getDwXyrDaztTj"
)
@ApiOperation
(
value
=
"嫌疑人单位统计"
)
public
R
getDwXyrDaztTj
(
DwTjParam
dwTjParam
){
try
{
Map
<
String
,
Object
>
rtMap
=
dwAjlbTjfxService
.
getDwXyrDaztTj
(
dwTjParam
);
return
R
.
ok
().
data
(
rtMap
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
R
.
error
(
e
.
getMessage
());
}
}
@PostMapping
(
"/getDwXyrDaztTjTs"
)
@ApiOperation
(
value
=
"嫌疑人单位透视"
)
public
R
getDwXyrDaztTjTs
(
DwTjParam
dwTjParam
){
try
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
dwTjParam
.
getPage
());
easyUIPage
.
setPageParaOracle
(
dwTjParam
.
getLimit
());
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
dwTjParam
.
setBegin
(
begin
);
dwTjParam
.
setEnd
(
end
);
Map
<
String
,
Object
>
rtMap
=
dwAjlbTjfxService
.
getDwXyrDaztTjTs
(
dwTjParam
);
return
R
.
ok
().
data
(
rtMap
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
R
.
error
(
e
.
getMessage
());
}
}
@RequestMapping
(
"/exportDwXyrDaztTjTs"
)
@ResponseBody
public
void
exportDwXyrDaztTjTs
(
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
=
dwAjlbTjfxService
.
getDwXyrDaztTjTs
(
dwTjParam
);
List
<
TbXwZbfzxyr
>
list
=(
List
<
TbXwZbfzxyr
>)
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/controller/DwTjfxController.java
View file @
e84087ea
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.AjtjParam
;
import
org.springblade.founder.tjfx.entity.TbStAsj
;
import
org.springblade.founder.tjfx.entity.TbXwRybh
;
import
org.springblade.founder.tjfx.entity.TbXwZbfzxyr
;
import
org.springblade.founder.tjfx.service.DwTjfxService
;
import
org.springblade.founder.utils.EasyUIPage
;
import
org.springblade.founder.utils.R
;
import
org.springblade.founder.utils.Utils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
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
...
...
@@ -57,6 +69,35 @@ public class DwTjfxController {
}
}
@RequestMapping
(
"/exportgetDwTjTs"
)
@ResponseBody
public
void
exportgetDwTjTs
(
@RequestParam
(
value
=
"unitcode"
,
defaultValue
=
""
)
String
unitcode
,
@RequestParam
(
value
=
"kssj"
,
defaultValue
=
""
)
String
kssj
,
@RequestParam
(
value
=
"jssj"
,
defaultValue
=
""
)
String
jssj
,
@RequestParam
(
value
=
"ajzt"
,
defaultValue
=
""
)
String
ajzt
,
@RequestParam
(
value
=
"tjlb"
,
defaultValue
=
""
)
String
tjlb
,
@RequestParam
(
value
=
"ajlbdm"
,
defaultValue
=
""
)
String
ajlbdm
,
@RequestParam
(
value
=
"xlajlbdm"
,
defaultValue
=
""
)
String
xlajlbdm
,
@RequestParam
(
value
=
"qryType"
,
defaultValue
=
""
)
String
qryType
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"0"
)
int
limit
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
IOException
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
1
);
easyUIPage
.
setPageParaOracle
(
10000
);
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
Map
<
String
,
Object
>
rtMap
=
dwTjfxService
.
getDwTjTs
(
unitcode
,
kssj
,
jssj
,
ajzt
,
tjlb
,
ajlbdm
,
xlajlbdm
,
qryType
,
begin
,
end
);
List
<
TbStAsj
>
list
=(
List
<
TbStAsj
>)
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
(),
TbStAsj
.
class
).
sheet
(
"案件列表"
).
doWrite
(
list
);
}
@PostMapping
(
"/getSswpslflTs"
)
@ApiOperation
(
value
=
"损失物品单位统计透视"
)
public
R
getSswpslflTs
(
@RequestParam
(
value
=
"unitcode"
,
defaultValue
=
""
)
String
unitcode
,
...
...
@@ -211,6 +252,35 @@ public class DwTjfxController {
}
}
@RequestMapping
(
"/exportXyrHjorNlTjTs"
)
@ResponseBody
public
void
exportXyrHjorNlTjTs
(
@RequestParam
(
value
=
"unitcode"
,
defaultValue
=
""
)
String
unitcode
,
@RequestParam
(
value
=
"kssj"
,
defaultValue
=
""
)
String
kssj
,
@RequestParam
(
value
=
"jssj"
,
defaultValue
=
""
)
String
jssj
,
@RequestParam
(
value
=
"ajzt"
,
defaultValue
=
""
)
String
ajzt
,
@RequestParam
(
value
=
"tjlb"
,
defaultValue
=
""
)
String
tjlb
,
@RequestParam
(
value
=
"ajlbdm"
,
defaultValue
=
""
)
String
ajlbdm
,
@RequestParam
(
value
=
"xlajlbdm"
,
defaultValue
=
""
)
String
xlajlbdm
,
@RequestParam
(
value
=
"xzqhdm"
,
defaultValue
=
""
)
String
xzqhdm
,
@RequestParam
(
value
=
"qryType"
,
defaultValue
=
""
)
String
qryType
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"0"
)
int
limit
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
IOException
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
1
);
easyUIPage
.
setPageParaOracle
(
10000
);
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
Map
<
String
,
Object
>
rtMap
=
dwTjfxService
.
getXyrHjorNlTjTs
(
unitcode
,
kssj
,
jssj
,
ajzt
,
tjlb
,
ajlbdm
,
xlajlbdm
,
xzqhdm
,
qryType
,
begin
,
end
);
List
<
TbXwZbfzxyr
>
list
=(
List
<
TbXwZbfzxyr
>)
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
);
}
@PostMapping
(
"/getShrHjorNlTjTs"
)
@ApiOperation
(
value
=
"嫌疑人户籍or年龄单位统计透视"
)
public
R
getShrHjorNlTjTs
(
@RequestParam
(
value
=
"unitcode"
,
defaultValue
=
""
)
String
unitcode
,
...
...
@@ -237,7 +307,33 @@ public class DwTjfxController {
return
R
.
error
(
e
.
getMessage
());
}
}
@RequestMapping
(
"/exportShrHjorNlTjTs"
)
@ResponseBody
public
void
exportShrHjorNlTjTs
(
@RequestParam
(
value
=
"unitcode"
,
defaultValue
=
""
)
String
unitcode
,
@RequestParam
(
value
=
"kssj"
,
defaultValue
=
""
)
String
kssj
,
@RequestParam
(
value
=
"jssj"
,
defaultValue
=
""
)
String
jssj
,
@RequestParam
(
value
=
"ajzt"
,
defaultValue
=
""
)
String
ajzt
,
@RequestParam
(
value
=
"tjlb"
,
defaultValue
=
""
)
String
tjlb
,
@RequestParam
(
value
=
"ajlbdm"
,
defaultValue
=
""
)
String
ajlbdm
,
@RequestParam
(
value
=
"xlajlbdm"
,
defaultValue
=
""
)
String
xlajlbdm
,
@RequestParam
(
value
=
"xzqhdm"
,
defaultValue
=
""
)
String
xzqhdm
,
@RequestParam
(
value
=
"qryType"
,
defaultValue
=
""
)
String
qryType
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"0"
)
int
limit
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
IOException
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
1
);
easyUIPage
.
setPageParaOracle
(
10000
);
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
Map
<
String
,
Object
>
rtMap
=
dwTjfxService
.
getShrHjorNlTjTs
(
unitcode
,
kssj
,
jssj
,
ajzt
,
tjlb
,
ajlbdm
,
xlajlbdm
,
xzqhdm
,
qryType
,
begin
,
end
);
List
<
TbXwRybh
>
list
=(
List
<
TbXwRybh
>)
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
(),
TbXwRybh
.
class
).
sheet
(
"受害人列表"
).
doWrite
(
list
);
}
...
...
src/main/java/org/springblade/founder/tjfx/entity/AjtjParam.java
View file @
e84087ea
...
...
@@ -76,6 +76,7 @@ public class AjtjParam extends BaseModel {
private
String
ajlbsql
;
private
String
xyrlx
;
@ApiModelProperty
(
value
=
"行政区划列表"
)
private
List
<
String
>
xzqhList
;
...
...
src/main/java/org/springblade/founder/tjfx/entity/AjtjResult.java
View file @
e84087ea
...
...
@@ -24,4 +24,6 @@ public class AjtjResult {
private
String
num
;
private
String
hb
;
private
String
tb
;
private
String
sjcode
;
}
src/main/java/org/springblade/founder/tjfx/entity/DwDaztTj.java
0 → 100644
View file @
e84087ea
package
org
.
springblade
.
founder
.
tjfx
.
entity
;
import
lombok.Data
;
@Data
public
class
DwDaztTj
{
private
String
dwdm
;
private
String
dwmc
;
private
int
daztda
;
//案件总量
private
int
daztsw
;
//案件总量
private
int
daztzt
;
//案件总量
private
String
qryType
;
}
src/main/java/org/springblade/founder/tjfx/entity/DwTjParam.java
View file @
e84087ea
...
...
@@ -14,4 +14,6 @@ public class DwTjParam {
private
String
qryType
;
private
int
page
;
private
int
limit
;
private
int
end
;
private
int
begin
;
}
src/main/java/org/springblade/founder/tjfx/mapper/AjlbSysDictMapper.java
0 → 100644
View file @
e84087ea
package
org
.
springblade
.
founder
.
tjfx
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springblade.founder.tjfx.entity.DictitemXz
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
@Mapper
public
interface
AjlbSysDictMapper
{
List
<
DictitemXz
>
getAjlbByCode
(
String
pid
);
}
src/main/java/org/springblade/founder/tjfx/mapper/AjlbSysDictMapper.xml
0 → 100644
View file @
e84087ea
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"org.springblade.founder.tjfx.mapper.AjlbSysDictMapper"
>
<select
id=
"getAjlbByCode"
resultType=
"org.springblade.founder.tjfx.entity.DictitemXz"
>
select dict.name as name, dict.code as code,
(case when (select count(1) from sys_dictitem s where s.pid=dict.code and s.scbz='0')>0 then 'yxj' else 'mxj' end) lev
from sys_dictitem dict
where dict.scbz='0' and groupid='CODE_AJLB'
<if
test=
"pid != null and pid != '' and pid == 'true'.toString() "
>
and pid is null
</if>
<if
test=
"pid != null and pid != '' and pid != 'true'.toString() "
>
and pid =#{pid}
</if>
order by dict.code
</select>
</mapper>
src/main/java/org/springblade/founder/tjfx/mapper/DwAjlbTjfxMapper.java
View file @
e84087ea
package
org
.
springblade
.
founder
.
tjfx
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springblade.founder.tjfx.entity.AjtjResult
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
org.springblade.founder.tjfx.entity.TbStAsj
;
import
org.springblade.founder.tjfx.entity.*
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.Map
;
@Component
@Mapper
...
...
@@ -18,4 +17,10 @@ public interface DwAjlbTjfxMapper {
List
<
TbStAsj
>
getXlAjlbTjTs
(
DwTjParam
dwTjParam
);
int
getXlAjlbTjTsCount
(
DwTjParam
dwTjParam
);
DwDaztTj
getDwXyrDaztTj
(
Map
<
String
,
Object
>
paramMap
);
List
<
TbXwZbfzxyr
>
getDwXyrDaztTjTs
(
Map
<
String
,
Object
>
paramMap
);
int
getDwXyrDaztTjTsCount
(
Map
<
String
,
Object
>
paramMap
);
}
src/main/java/org/springblade/founder/tjfx/mapper/DwAjlbTjfxMapper.xml
View file @
e84087ea
...
...
@@ -3,24 +3,28 @@
<mapper
namespace=
"org.springblade.founder.tjfx.mapper.DwAjlbTjfxMapper"
>
<select
id=
"getAjlbTj"
resultType=
"org.springblade.founder.tjfx.entity.AjtjResult"
>
select
asj.ajlbdm
code,
select
(case when asj.ajlbdm is null then '未知' else asj.ajlbdm end)
code,
(SELECT name FROM sys_dictitem WHERE groupid = 'CODE_AJLB' AND code = asj.ajlbdm) as name,
count(1) as num
from TB_ST_ASJ asj
where asj.xxsc_pdbz='0'
<include
refid=
"asjQry-where"
/>
group by asj.ajlbdm
order by asj.ajlbdm
</select>
<select
id=
"getXlAjlbTj"
resultType=
"org.springblade.founder.tjfx.entity.AjtjResult"
>
select asj.zatz_jyqk code,
select (case when asj.zatz_jyqk is null then '未知' else asj.zatz_jyqk end) code,
(SELECT name FROM sys_dictitem WHERE groupid = 'CODE_AJXZ' AND code = asj.zatz_jyqk) as name,
count(1) as num
count(1) as num
,'2' as lev,#{ajlbdm , jdbcType=VARCHAR} as sjcode
from TB_ST_ASJ asj
where asj.xxsc_pdbz='0'
<include
refid=
"asjQry-where"
/>
group by asj.zatz_jyqk
order by asj.zatz_jyqk
</select>
<select
id=
"getXlAjlbTjTs"
resultType=
"org.springblade.founder.tjfx.entity.TbStAsj"
>
...
...
@@ -42,6 +46,90 @@
where asj.xxsc_pdbz='0'
<include
refid=
"asjQry-where"
/>
</select>
<select
id=
"getDwXyrDaztTj"
resultType=
"org.springblade.founder.tjfx.entity.DwDaztTj"
>
select (select count(1)
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 xyr.ZHFZXYR_FZXYRDAZTDM = '1'
<include
refid=
"asjQry-where"
/>
) daztda,
(select count(1)
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 xyr.ZHFZXYR_FZXYRDAZTDM = '2'
<include
refid=
"asjQry-where"
/>
) daztzt,
(select count(1)
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 xyr.ZHFZXYR_FZXYRDAZTDM = '3'
<include
refid=
"asjQry-where"
/>
) daztsw
from dual
</select>
<select
id=
"getDwXyrDaztTjTs"
resultType=
"org.springblade.founder.tjfx.entity.TbXwZbfzxyr"
>
<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
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'
<if
test=
"tjlb != null and tjlb != '' and tjlb == 'daztda'.toString() "
>
and xyr.ZHFZXYR_FZXYRDAZTDM = '1'
</if>
<if
test=
"tjlb != null and tjlb != '' and tjlb == 'daztzt'.toString() "
>
and xyr.ZHFZXYR_FZXYRDAZTDM = '2'
</if>
<if
test=
"tjlb != null and tjlb != '' and tjlb == 'daztsw'.toString() "
>
and xyr.ZHFZXYR_FZXYRDAZTDM = '3'
</if>
<include
refid=
"asjQry-where"
/>
order by xyr.ZHRQ desc nulls last
<include
refid=
"pagination-tail"
/>
</select>
<select
id=
"getDwXyrDaztTjTsCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
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'
<if
test=
"tjlb != null and tjlb != '' and tjlb == 'daztda'.toString() "
>
and xyr.ZHFZXYR_FZXYRDAZTDM = '1'
</if>
<if
test=
"tjlb != null and tjlb != '' and tjlb == 'daztzt'.toString() "
>
and xyr.ZHFZXYR_FZXYRDAZTDM = '2'
</if>
<if
test=
"tjlb != null and tjlb != '' and tjlb == 'daztsw'.toString() "
>
and xyr.ZHFZXYR_FZXYRDAZTDM = '3'
</if>
<include
refid=
"asjQry-where"
/>
</select>
<sql
id=
"asjQry-where"
>
<if
test=
"kssj != null and kssj != ''"
>
AND ASJ.LARQ
<![CDATA[>=]]>
to_date(#{kssj, jdbcType=VARCHAR},'yyyy-mm-dd')
...
...
@@ -59,12 +147,20 @@
<if
test=
"ajzt != null and ajzt != '' and ajzt == '3'.toString() "
>
and asj.ZCJDDM in ('0100','0200','0300','0301','0302','0400','0500')
</if>
<if
test=
"ajlbdm != null and ajlbdm != '' "
>
<if
test=
"ajlbdm != null and ajlbdm != ''
and ajlbdm != '未知'.toString()
"
>
and ASJ.ajlbdm = #{ajlbdm}
</if>
<if
test=
"xlajlbdm != null and xlajlbdm != '' "
>
<if
test=
"ajlbdm != null and ajlbdm != '' and ajlbdm == '未知'.toString() "
>
and ASJ.ajlbdm is null
</if>
<if
test=
"xlajlbdm != null and xlajlbdm != '' and xlajlbdm != '未知'.toString() "
>
and ASJ.zatz_jyqk = #{xlajlbdm}
</if>
<if
test=
"xlajlbdm != null and xlajlbdm != '' and xlajlbdm == '未知'.toString() "
>
and ASJ.zatz_jyqk is null
</if>
<if
test=
"qryType == 'bdw'"
>
and ASJ.LADW_GAJGJGDM = #{unitcode}
</if>
...
...
src/main/java/org/springblade/founder/tjfx/service/AjlbSysDictService.java
0 → 100644
View file @
e84087ea
package
org
.
springblade
.
founder
.
tjfx
.
service
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
java.util.Map
;
public
interface
AjlbSysDictService
{
Map
<
String
,
Object
>
getAjlbTjByPid
(
DwTjParam
dwTjParam
);
}
src/main/java/org/springblade/founder/tjfx/service/DwAjlbTjfxService.java
View file @
e84087ea
...
...
@@ -7,7 +7,14 @@ import java.util.Map;
public
interface
DwAjlbTjfxService
{
Map
<
String
,
Object
>
getAjlbTj
(
DwTjParam
dwTjParam
);
Map
<
String
,
Object
>
getXlAjlbTj
(
DwTjParam
dwTjParam
);
Map
<
String
,
Object
>
getXlAjlbTjTs
(
DwTjParam
dwTjParam
);
Map
<
String
,
Object
>
getDwXyrDaztTj
(
DwTjParam
dwTjParam
);
Map
<
String
,
Object
>
getDwXyrDaztTjTs
(
DwTjParam
dwTjParam
);
}
src/main/java/org/springblade/founder/tjfx/service/impl/AjlbSysDictServiceImpl.java
0 → 100644
View file @
e84087ea
package
org
.
springblade
.
founder
.
tjfx
.
service
.
impl
;
import
org.apache.commons.lang.StringUtils
;
import
org.springblade.core.secure.utils.SecureUtil
;
import
org.springblade.founder.tjfx.entity.DictitemXz
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
org.springblade.founder.tjfx.entity.DwXnpgTj
;
import
org.springblade.founder.tjfx.mapper.AjlbSysDictMapper
;
import
org.springblade.founder.tjfx.service.AjlbSysDictService
;
import
org.springblade.modules.system.entity.XzxtUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.concurrent.locks.Lock
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.stream.Collectors
;
@Service
public
class
AjlbSysDictServiceImpl
implements
AjlbSysDictService
{
@Autowired
private
AjlbSysDictMapper
ajlbSysDictMapper
;
@Override
public
Map
<
String
,
Object
>
getAjlbTjByPid
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
List
<
DwXnpgTj
>
dataList
=
new
ArrayList
<>();
List
<
DwXnpgTj
>
res
=
new
ArrayList
<>();
String
unitcode
=
dwTjParam
.
getUnitcode
();
String
kssj
=
dwTjParam
.
getKssj
();
String
jssj
=
dwTjParam
.
getJssj
();
String
ajzt
=
dwTjParam
.
getAjzt
();
String
ajlbdm
=
dwTjParam
.
getAjlbdm
();
String
xlajlbdm
=
dwTjParam
.
getXlajlbdm
();
String
pid
=
"true"
;
if
(
StringUtils
.
isEmpty
(
unitcode
))
{
XzxtUser
xzxtUser
=
SecureUtil
.
getUserXzxt
();
unitcode
=
xzxtUser
.
getUnitcode
();
//获取对应用户的单位
}
System
.
out
.
println
(
unitcode
);
paramMap
.
put
(
"unitcode"
,
unitcode
);
paramMap
.
put
(
"kssj"
,
kssj
);
paramMap
.
put
(
"jssj"
,
jssj
);
paramMap
.
put
(
"ajzt"
,
ajzt
);
paramMap
.
put
(
"ajlbdm"
,
ajlbdm
);
paramMap
.
put
(
"xlajlbdm"
,
xlajlbdm
);
if
(
StringUtils
.
isEmpty
(
ajlbdm
)){
pid
=
"true"
;
}
else
{
pid
=
ajlbdm
;
}
List
<
DictitemXz
>
unitList
=
ajlbSysDictMapper
.
getAjlbByCode
(
pid
);
List
<
DictitemXz
>
unit1
=
new
ArrayList
<>();
List
<
DictitemXz
>
unit2
=
new
ArrayList
<>();
int
ajts
=
0
;
//案件总量
int
cjsswpajs
=
0
;
//采集损失物品案件量
int
wcjsswpajs
=
0
;
//未采集损失物品案件量
int
cssswpsl
=
0
;
//采集损失物品数量
int
cjxyrajl
=
0
;
//采集嫌疑人案件量
int
wcjxyrajl
=
0
;
//未采集嫌疑人案件量
int
cjxyrsl
=
0
;
//采集嫌疑人数量
int
cjshrajl
=
0
;
//采集受害人案件量
int
wcjshrajl
=
0
;
//未采集受害人案件量
int
cjshrsl
=
0
;
//采集受害人数量
Lock
lock
=
new
ReentrantLock
();
// if(unitList!=null && unitList.size()>0){
// if(unitList.size()<2){
// unit1=unitList.subList(0,1);
// unit1.stream().parallel().forEach(item -> {
//
// String dwdm = item.getCode();
// String dwmc = item.getName();
// String dwtype="";
// paramMap.put("unitcode", dwdm);
// paramMap.put("qryType", "bdw");
// dwtype= "bdw";
//
// DwXnpgTj dwXnpgTj = dwTjfxMapper.getDwTjFx(paramMap);
//
// dwXnpgTj.setDwdm(dwdm);
// dwXnpgTj.setDwmc(dwmc);
// dwXnpgTj.setQryType(dwtype);
// lock.lock();
// try {
// dataList.add(dwXnpgTj);
// }finally {
// lock.unlock();
// }
//
// });
// }else {
// unit1=unitList.subList(0,1);
// unit2=unitList.subList(1,unitList.size());
// unit1.stream().parallel().forEach(item -> {
// Map<String, Object> paramet=new HashMap<>();
// String dwdm = item.getCode();
// String dwmc = item.getName();
// String dwtype="";
// paramet.putAll(paramMap);
// paramet.put("unitcode", dwdm);
// paramet.put("qryType", "bdw");
// dwtype= "bdw";
//
// DwXnpgTj dwXnpgTj = dwTjfxMapper.getDwTjFx(paramet);
//
// dwXnpgTj.setDwdm(dwdm);
// dwXnpgTj.setDwmc(dwmc);
// dwXnpgTj.setQryType(dwtype);
// lock.lock();
// try {
// dataList.add(dwXnpgTj);
// }finally {
// lock.unlock();
// }
//
// });
// unit2.stream().parallel().forEach(item -> {
//
//
// Map<String, Object> paramet=new HashMap<>();
// String dwdm = item.getCode();
// String dwmc = item.getName();
// String dwtype="";
// paramet.putAll(paramMap);
// paramet.put("unitcode", dwdm);
// paramet.put("qryType", "bxq");
// dwtype= "bxq";
//
// DwXnpgTj dwXnpgTj = dwTjfxMapper.getDwTjFx(paramet);
//
// dwXnpgTj.setDwdm(dwdm);
// dwXnpgTj.setDwmc(dwmc);
// dwXnpgTj.setQryType(dwtype);
// lock.lock();
// try {
// dataList.add(dwXnpgTj);
// }finally {
// lock.unlock();
// }
//
// });
//
//
// }
//
// }
res
=
dataList
.
stream
().
sorted
(
Comparator
.
comparing
(
DwXnpgTj:
:
getDwdm
))
.
collect
(
Collectors
.
toList
());
rtMap
.
put
(
"rows"
,
res
);
return
rtMap
;
}
}
src/main/java/org/springblade/founder/tjfx/service/impl/DwAjlbTjfxServiceImpl.java
View file @
e84087ea
...
...
@@ -3,25 +3,30 @@ package org.springblade.founder.tjfx.service.impl;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
org.apache.commons.lang.StringUtils
;
import
org.springblade.founder.tjfx.entity.AjtjResult
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
org.springblade.founder.tjfx.entity.TbStAsj
;
import
org.springblade.core.secure.utils.SecureUtil
;
import
org.springblade.founder.tjfx.entity.*
;
import
org.springblade.founder.tjfx.mapper.DwAjlbTjfxMapper
;
import
org.springblade.founder.tjfx.mapper.DwTjfxMapper
;
import
org.springblade.founder.tjfx.service.DwAjlbTjfxService
;
import
org.springblade.founder.utils.DwUtil
;
import
org.springblade.modules.system.entity.XzxtUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.
ArrayList
;
import
java.util.
HashMap
;
import
java.util.
List
;
import
java.util.
Map
;
import
java.util.
*
;
import
java.util.
concurrent.locks.Lock
;
import
java.util.
concurrent.locks.ReentrantLock
;
import
java.util.
stream.Collectors
;
@Service
@DS
(
"xzxt"
)
public
class
DwAjlbTjfxServiceImpl
implements
DwAjlbTjfxService
{
@Resource
private
DwAjlbTjfxMapper
dwAjlbTjfxMapper
;
@Autowired
private
DwTjfxMapper
dwTjfxMapper
;
@Override
public
Map
<
String
,
Object
>
getAjlbTj
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
...
...
@@ -37,6 +42,11 @@ public class DwAjlbTjfxServiceImpl implements DwAjlbTjfxService {
return
rtMap
;
}
@Override
public
Map
<
String
,
Object
>
getXlAjlbTj
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
...
...
@@ -70,4 +80,177 @@ public class DwAjlbTjfxServiceImpl implements DwAjlbTjfxService {
return
rtMap
;
}
@Override
public
Map
<
String
,
Object
>
getDwXyrDaztTj
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
List
<
DwDaztTj
>
dataList
=
new
ArrayList
<>();
List
<
DwDaztTj
>
res
=
new
ArrayList
<>();
String
unitcode
=
dwTjParam
.
getUnitcode
();
String
kssj
=
dwTjParam
.
getKssj
();
String
jssj
=
dwTjParam
.
getJssj
();
String
ajzt
=
dwTjParam
.
getAjzt
();
String
ajlbdm
=
dwTjParam
.
getAjlbdm
();
String
xlajlbdm
=
dwTjParam
.
getXlajlbdm
();
if
(
StringUtils
.
isEmpty
(
unitcode
))
{
XzxtUser
xzxtUser
=
SecureUtil
.
getUserXzxt
();
unitcode
=
xzxtUser
.
getUnitcode
()
;
//获取对应用户的单位
}
//获取本单位信息
DictitemXz
bdwxx
=
dwTjfxMapper
.
getDwxxByDwdm
(
unitcode
);
//设置单位查询参数
Map
<
String
,
Object
>
dwLevMap
=
DwUtil
.
getDwLevCode
(
unitcode
,
bdwxx
.
getLev
());
paramMap
.
putAll
(
dwLevMap
);
paramMap
.
put
(
"unitcode"
,
unitcode
);
paramMap
.
put
(
"kssj"
,
kssj
);
paramMap
.
put
(
"jssj"
,
jssj
);
paramMap
.
put
(
"ajzt"
,
ajzt
);
paramMap
.
put
(
"ajlbdm"
,
ajlbdm
);
paramMap
.
put
(
"xlajlbdm"
,
xlajlbdm
);
dwLevMap
.
put
(
"includeBdw"
,
"true"
);
List
<
DictitemXz
>
unitList
=
dwTjfxMapper
.
getXqdwList
(
dwLevMap
);
List
<
DictitemXz
>
unit1
=
new
ArrayList
<>();
List
<
DictitemXz
>
unit2
=
new
ArrayList
<>();
Lock
lock
=
new
ReentrantLock
();
if
(
unitList
!=
null
&&
unitList
.
size
()>
0
){
if
(
unitList
.
size
()<
2
){
unit1
=
unitList
.
subList
(
0
,
1
);
unit1
.
stream
().
parallel
().
forEach
(
item
->
{
String
dwdm
=
item
.
getCode
();
String
dwmc
=
item
.
getName
();
String
dwtype
=
""
;
paramMap
.
put
(
"unitcode"
,
dwdm
);
paramMap
.
put
(
"qryType"
,
"bdw"
);
dwtype
=
"bdw"
;
DwDaztTj
dwXnpgTj
=
dwAjlbTjfxMapper
.
getDwXyrDaztTj
(
paramMap
);
dwXnpgTj
.
setDwdm
(
dwdm
);
dwXnpgTj
.
setDwmc
(
dwmc
);
dwXnpgTj
.
setQryType
(
dwtype
);
lock
.
lock
();
try
{
dataList
.
add
(
dwXnpgTj
);
}
finally
{
lock
.
unlock
();
}
});
}
else
{
unit1
=
unitList
.
subList
(
0
,
1
);
unit2
=
unitList
.
subList
(
1
,
unitList
.
size
());
unit1
.
stream
().
parallel
().
forEach
(
item
->
{
Map
<
String
,
Object
>
paramet
=
new
HashMap
<>();
String
dwdm
=
item
.
getCode
();
String
dwmc
=
item
.
getName
();
String
dwtype
=
""
;
paramet
.
putAll
(
paramMap
);
paramet
.
put
(
"unitcode"
,
dwdm
);
paramet
.
put
(
"qryType"
,
"bdw"
);
dwtype
=
"bdw"
;
DwDaztTj
dwXnpgTj
=
dwAjlbTjfxMapper
.
getDwXyrDaztTj
(
paramMap
);
dwXnpgTj
.
setDwdm
(
dwdm
);
dwXnpgTj
.
setDwmc
(
dwmc
);
dwXnpgTj
.
setQryType
(
dwtype
);
lock
.
lock
();
try
{
dataList
.
add
(
dwXnpgTj
);
}
finally
{
lock
.
unlock
();
}
});
unit2
.
stream
().
parallel
().
forEach
(
item
->
{
Map
<
String
,
Object
>
paramet
=
new
HashMap
<>();
String
dwdm
=
item
.
getCode
();
String
dwmc
=
item
.
getName
();
String
dwtype
=
""
;
paramet
.
putAll
(
paramMap
);
paramet
.
put
(
"unitcode"
,
dwdm
);
paramet
.
put
(
"qryType"
,
"bxq"
);
dwtype
=
"bxq"
;
DwDaztTj
dwXnpgTj
=
dwAjlbTjfxMapper
.
getDwXyrDaztTj
(
paramMap
);
dwXnpgTj
.
setDwdm
(
dwdm
);
dwXnpgTj
.
setDwmc
(
dwmc
);
dwXnpgTj
.
setQryType
(
dwtype
);
lock
.
lock
();
try
{
dataList
.
add
(
dwXnpgTj
);
}
finally
{
lock
.
unlock
();
}
});
}
}
res
=
dataList
.
stream
().
sorted
(
Comparator
.
comparing
(
DwDaztTj:
:
getDwdm
))
.
collect
(
Collectors
.
toList
());
rtMap
.
put
(
"rows"
,
res
);
return
rtMap
;
}
@Override
public
Map
<
String
,
Object
>
getDwXyrDaztTjTs
(
DwTjParam
dwTjParam
)
{
Map
<
String
,
Object
>
rtMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
List
<
TbXwZbfzxyr
>
dataList
=
new
ArrayList
<>();
String
unitcode
=
dwTjParam
.
getUnitcode
();
String
kssj
=
dwTjParam
.
getKssj
();
String
jssj
=
dwTjParam
.
getJssj
();
String
ajzt
=
dwTjParam
.
getAjzt
();
String
ajlbdm
=
dwTjParam
.
getAjlbdm
();
String
xlajlbdm
=
dwTjParam
.
getXlajlbdm
();
String
qryType
=
dwTjParam
.
getQryType
();
String
tjlb
=
dwTjParam
.
getTjlb
();
if
(
StringUtils
.
isEmpty
(
unitcode
))
{
XzxtUser
xzxtUser
=
SecureUtil
.
getUserXzxt
();
unitcode
=
xzxtUser
.
getUnitcode
();
//获取对应用户的单位
}
paramMap
.
put
(
"unitcode"
,
unitcode
);
paramMap
.
put
(
"kssj"
,
kssj
);
paramMap
.
put
(
"jssj"
,
jssj
);
paramMap
.
put
(
"ajzt"
,
ajzt
);
paramMap
.
put
(
"tjlb"
,
tjlb
);
paramMap
.
put
(
"begin"
,
dwTjParam
.
getBegin
());
paramMap
.
put
(
"end"
,
dwTjParam
.
getEnd
());
paramMap
.
put
(
"ajlbdm"
,
ajlbdm
);
paramMap
.
put
(
"xlajlbdm"
,
xlajlbdm
);
paramMap
.
put
(
"qryType"
,
qryType
);
dataList
=
dwAjlbTjfxMapper
.
getDwXyrDaztTjTs
(
paramMap
);
int
count
=
dwAjlbTjfxMapper
.
getDwXyrDaztTjTsCount
(
paramMap
);
rtMap
.
put
(
"rows"
,
dataList
);
rtMap
.
put
(
"total"
,
count
);
return
rtMap
;
}
}
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