Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-app-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
Administrator
xzxt-app-report
Commits
b9f2d478
Commit
b9f2d478
authored
Nov 12, 2021
by
Jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
案事件模块sql语句添加模糊查询
parent
958cd3cc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
91 deletions
+74
-91
src/main/java/org/springblade/common/config/BladeConfiguration.java
+3
-1
src/main/java/org/springblade/founder/asj/VO/AsjVO.java
+8
-1
src/main/java/org/springblade/founder/asj/controller/TbStAsjController.java
+2
-2
src/main/java/org/springblade/founder/asj/dao/TbStAsjMapper.java
+53
-61
src/main/java/org/springblade/founder/asj/dao/TbStAsjMapper.xml
+0
-0
src/main/java/org/springblade/founder/asj/service/TbStAsjService.java
+1
-9
src/main/java/org/springblade/founder/asj/service/impl/TbStAsjServiceImpl.java
+7
-17
No files found.
src/main/java/org/springblade/common/config/BladeConfiguration.java
View file @
b9f2d478
...
...
@@ -53,7 +53,9 @@ public class BladeConfiguration implements WebMvcConfigurer {
secureRegistry
.
excludePathPatterns
(
"/reloadShceDict"
);
secureRegistry
.
excludePathPatterns
(
"/xttg/**"
);
secureRegistry
.
excludePathPatterns
(
"/xgxb/**"
);
secureRegistry
.
excludePathPatterns
(
"/**"
);
secureRegistry
.
excludePathPatterns
(
"/asj/**"
);
secureRegistry
.
excludePathPatterns
(
"/ss*/**"
);
// secureRegistry.excludePathPatterns("/**");
/*secureRegistry.excludePathPatterns("/**");
secureRegistry.excludePathPatterns("/ajDetail/**");
secureRegistry.excludePathPatterns("/tbstAsj/stasj*");
...
...
src/main/java/org/springblade/founder/asj/VO/AsjVO.java
View file @
b9f2d478
...
...
@@ -22,10 +22,17 @@ public class AsjVO {
private
String
ladwGajgmc
;
//立案单位_公安机关名称
private
String
sldwGajgjgdm
;
//受理单位_公安机关机构代码
private
String
sldwGajgmc
;
//受理单位_公安机关名称
private
String
jyaq
;
//简要案情
public
AsjVO
(){}
public
AsjVO
(
TbStAsjQgccj
tbStAsjQgccj
){
BeanCopyUtil
.
copy
(
tbStAsjQgccj
,
this
,
BeanCopyUtil
.
OperationType
.
QUERY
);
if
(
tbStAsjQgccj
!=
null
){
BeanCopyUtil
.
copy
(
tbStAsjQgccj
,
this
,
BeanCopyUtil
.
OperationType
.
QUERY
);
}
else
{
tbStAsjQgccj
=
new
TbStAsjQgccj
();
BeanCopyUtil
.
copy
(
tbStAsjQgccj
,
this
,
BeanCopyUtil
.
OperationType
.
QUERY
);
}
}
}
src/main/java/org/springblade/founder/asj/controller/TbStAsjController.java
View file @
b9f2d478
...
...
@@ -52,9 +52,9 @@ public class TbStAsjController {
* @return 单条数据
*/
@PostMapping
(
"queryAll"
)
public
R
queryById
(
@RequestParam
(
required
=
false
)
String
ajmc
,
Integer
page
,
Integer
limit
)
{
public
R
queryById
(
@RequestParam
(
required
=
false
)
String
a
sjbh
,
@RequestParam
(
required
=
false
)
String
a
jmc
,
Integer
page
,
Integer
limit
)
{
try
{
Map
<
String
,
Object
>
map
=
tbStAsjService
.
queryAll
(
ajmc
,
page
,
limit
);
Map
<
String
,
Object
>
map
=
tbStAsjService
.
queryAll
(
a
sjbh
,
a
jmc
,
page
,
limit
);
return
R
.
ok
().
data
(
map
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
src/main/java/org/springblade/founder/asj/dao/TbStAsjMapper.java
View file @
b9f2d478
...
...
@@ -8,80 +8,72 @@ import org.springframework.data.domain.Pageable;
import
java.util.List
;
/**
* (TbStAsj)表数据库访问层
*
案事件基本信息
(TbStAsj)表数据库访问层
*
* @author jlt
* @since 2021-11-1
0 17:36:38
* @since 2021-11-1
2 09:37:39
*/
@Mapper
public
interface
TbStAsjMapper
{
/**
* 通过ID查询单条数据
*
* @param asjbh 主键
* @return 实例对象
*/
TbStAsjQgccj
queryById
(
String
asjbh
);
/**
* 通过ID查询单条数据
*
* @param asjbh 主键
* @return 实例对象
*/
TbStAsjQgccj
queryById
(
String
asjbh
);
/**
* 查询指定行数据
*
* @param tbStAsj 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List
<
TbStAsjQgccj
>
queryAllByLimit
(
TbStAsjQgccj
tbStAsj
,
@Param
(
"pageable"
)
Pageable
pageable
);
List
<
TbStAsjQgccj
>
queryAll
(
@Param
(
"asjbh"
)
String
asjbh
,
@Param
(
"ajmc"
)
String
ajmc
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"limit"
)
Integer
limit
);
/**
* 统计总行数
*
* @param tbStAsj 查询条件
* @return 总行数
*/
int
count
(
TbStAsjQgccj
tbStAsj
);
/**
* 统计总行数
*
* @param tbStAsj 查询条件
* @return 总行数
*/
int
count
(
TbStAsjQgccj
tbStAsj
);
/**
* 新增数据
*
* @param tbStAsj 实例对象
* @return 影响行数
*/
int
insert
(
TbStAsjQgccj
tbStAsj
);
/**
* 新增数据
*
* @param tbStAsj 实例对象
* @return 影响行数
*/
int
insert
(
TbStAsjQgccj
tbStAsj
);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TbStAsj> 实例对象列表
* @return 影响行数
*/
int
insertBatch
(
@Param
(
"entities"
)
List
<
TbStAsjQgccj
>
entities
);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TbStAsj> 实例对象列表
* @return 影响行数
*/
int
insertBatch
(
@Param
(
"entities"
)
List
<
TbStAsjQgccj
>
entities
);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
*
* @param entities List<TbStAsj> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
*/
int
insertOrUpdateBatch
(
@Param
(
"entities"
)
List
<
TbStAsjQgccj
>
entities
);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
*
* @param entities List<TbStAsj> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
*/
int
insertOrUpdateBatch
(
@Param
(
"entities"
)
List
<
TbStAsjQgccj
>
entities
);
/**
* 修改数据
*
* @param tbStAsj 实例对象
* @return 影响行数
*/
int
update
(
TbStAsjQgccj
tbStAsj
);
/**
* 修改数据
*
* @param tbStAsj 实例对象
* @return 影响行数
*/
int
update
(
TbStAsjQgccj
tbStAsj
);
/**
* 通过主键删除数据
*
* @param asjbh 主键
* @return 影响行数
*/
int
deleteById
(
String
asjbh
);
/**
* 通过主键删除数据
*
* @param asjbh 主键
* @return 影响行数
*/
int
deleteById
(
String
asjbh
);
List
<
TbStAsjQgccj
>
queryAll
(
String
ajmc
,
Integer
page
,
Integer
limit
);
}
src/main/java/org/springblade/founder/asj/dao/TbStAsjMapper.xml
View file @
b9f2d478
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/java/org/springblade/founder/asj/service/TbStAsjService.java
View file @
b9f2d478
...
...
@@ -22,14 +22,6 @@ public interface TbStAsjService {
*/
TbStAsjQgccj
queryById
(
String
asjbh
);
/**
* 分页查询
*
* @param tbStAsj 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
Page
<
TbStAsjQgccj
>
queryByPage
(
TbStAsjQgccj
tbStAsj
,
PageRequest
pageRequest
);
/**
* 新增数据
...
...
@@ -55,5 +47,5 @@ public interface TbStAsjService {
*/
boolean
deleteById
(
String
asjbh
);
Map
<
String
,
Object
>
queryAll
(
String
ajmc
,
Integer
page
,
Integer
limit
);
Map
<
String
,
Object
>
queryAll
(
String
a
sjbh
,
String
a
jmc
,
Integer
page
,
Integer
limit
);
}
src/main/java/org/springblade/founder/asj/service/impl/TbStAsjServiceImpl.java
View file @
b9f2d478
...
...
@@ -10,7 +10,6 @@ import org.springframework.data.domain.PageImpl;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -38,18 +37,7 @@ public class TbStAsjServiceImpl implements TbStAsjService {
return
this
.
tbStAsjDao
.
queryById
(
asjbh
);
}
/**
* 分页查询
*
* @param tbStAsj 筛选条件
* @param pageRequest 分页对象
* @return 查询结果
*/
@Override
public
Page
<
TbStAsjQgccj
>
queryByPage
(
TbStAsjQgccj
tbStAsj
,
PageRequest
pageRequest
)
{
long
total
=
this
.
tbStAsjDao
.
count
(
tbStAsj
);
return
new
PageImpl
<>(
this
.
tbStAsjDao
.
queryAllByLimit
(
tbStAsj
,
pageRequest
),
pageRequest
,
total
);
}
/**
* 新增数据
...
...
@@ -87,17 +75,19 @@ public class TbStAsjServiceImpl implements TbStAsjService {
}
@Override
public
Map
<
String
,
Object
>
queryAll
(
String
ajmc
,
Integer
page
,
Integer
limit
)
{
public
Map
<
String
,
Object
>
queryAll
(
String
a
sjbh
,
String
a
jmc
,
Integer
page
,
Integer
limit
)
{
page
=
(
page
-
1
)
*
limit
;
limit
=
page
+
limit
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
TbStAsjQgccj
>
tbStAsjQgccjList
=
tbStAsjDao
.
queryAll
(
ajmc
,
page
,
limit
);
TbStAsjQgccj
tbStAsjQgccj
=
new
TbStAsjQgccj
();
tbStAsjQgccj
.
setAjmc
(
ajmc
);
tbStAsjQgccj
.
setAsjbh
(
asjbh
);
List
<
TbStAsjQgccj
>
tbStAsjQgccjList
=
tbStAsjDao
.
queryAll
(
asjbh
,
ajmc
,
page
,
limit
);
List
<
AsjVO
>
asjVOS
=
new
ArrayList
<>();
for
(
TbStAsjQgccj
t
:
tbStAsjQgccjList
)
{
asjVOS
.
add
(
new
AsjVO
(
t
));
}
TbStAsjQgccj
tbStAsjQgccj
=
new
TbStAsjQgccj
();
tbStAsjQgccj
.
setAjmc
(
ajmc
);
int
count
=
tbStAsjDao
.
count
(
tbStAsjQgccj
);
map
.
put
(
"rows"
,
asjVOS
);
map
.
put
(
"total"
,
count
);
...
...
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