Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
常超
map-parent
Commits
23ddc755
Commit
23ddc755
authored
Mar 10, 2021
by
Jiabeibei_glb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同类案件查询
parent
7c217210
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
334 additions
and
3 deletions
+334
-3
common/common_utils/src/main/java/com/founder/commonutils/util/StringUtil.java
+123
-0
service/asj/src/main/java/com/founder/asj/controller/TbStAsjController.java
+11
-3
service/asj/src/main/java/com/founder/asj/mapper/TbStAsjMapper.java
+2
-0
service/asj/src/main/java/com/founder/asj/mapper/xml/TbStAsjMapper.xml
+180
-0
service/asj/src/main/java/com/founder/asj/service/TbStAsjService.java
+3
-0
service/asj/src/main/java/com/founder/asj/service/impl/TbStAsjServiceImpl.java
+15
-0
No files found.
common/common_utils/src/main/java/com/founder/commonutils/util/StringUtil.java
0 → 100644
View file @
23ddc755
package
com
.
founder
.
commonutils
.
util
;
import
java.io.UnsupportedEncodingException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
class
StringUtil
{
/**
* 判断是否为空,空返回true否则返回false。</br>
* return true if str is empty, false if str is not empty.
*
* @param str
*/
public
static
boolean
isEmpty
(
String
str
){
return
str
==
null
||
str
.
length
()
==
0
;
}
/**
*
* 函数功能说明
* <p>Description: 判断字符串str是否是以中文字符开始的</p>
* @author liulihua 2012-9-8
* @param @param str
* @param @return
* @return boolean
* @throws
*/
public
static
boolean
isStartWithCH
(
String
str
){
Pattern
p
=
Pattern
.
compile
(
"[\\u4e00-\\u9fa5|\\uf900-\\ufa2d]"
);
str
=
str
.
substring
(
0
,
1
);
Matcher
m
=
p
.
matcher
(
str
);
if
(
m
.
find
())
return
true
;
return
false
;
}
/**
*
* 函数功能说明
* <p>Description: 判断字符串是否是数字</p>
* @author liulihua 2012-9-10
* @param @param str
* @param @return
* @return boolean
* @throws
*/
public
static
boolean
isNumeric
(
String
str
)
{
Pattern
pattern
=
Pattern
.
compile
(
"[0-9]*"
);
Matcher
isNum
=
pattern
.
matcher
(
str
);
if
(!
isNum
.
matches
())
{
return
false
;
}
return
true
;
}
/**
* 函数功能说明
* <p>Description: 将字符的编码格式从ISO-8859-1转为UTF-8,写死的UTF-8,所以UnsupportedEncodingException不存在,方法自己捕获</p>
* @author liulihua 2013-1-30
* @param str
* @return String
* @throws
*/
public
static
String
encodeUTF
(
String
str
){
try
{
return
new
String
(
str
.
getBytes
(
"ISO-8859-1"
),
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
public
static
String
encodeGBK
(
String
str
){
try
{
return
new
String
(
str
.
getBytes
(
"ISO-8859-1"
),
"GB2312"
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
public
static
String
format
(
String
str
,
String
formatIn
,
String
formatOut
){
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
formatIn
);
Date
date
=
sdf
.
parse
(
str
);
sdf
=
new
SimpleDateFormat
(
formatOut
);
//获取String类型的时间
return
sdf
.
format
(
date
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
public
static
String
format2Stamp
(
String
str
,
String
formatIn
){
try
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
formatIn
);
Date
date
=
simpleDateFormat
.
parse
(
str
);
long
ts
=
date
.
getTime
();
//获取String类型的时间
return
String
.
valueOf
(
ts
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
public
static
String
stamp2Format
(
String
str
,
String
formatOut
){
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
formatOut
);
Long
lt
=
new
Long
(
str
);
Date
date
=
new
Date
(
lt
);
//获取String类型的时间
return
sdf
.
format
(
date
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
}
service/asj/src/main/java/com/founder/asj/controller/TbStAsjController.java
View file @
23ddc755
...
...
@@ -45,8 +45,8 @@ public class TbStAsjController {
@Value
(
"${ssdw}"
)
private
String
ssdw
;
//案件查询(存储reids)
@OperLog
(
message
=
"
获取同类案件信息//
案件查询"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"
获取同类案件信息//
案件查询(存储reids)"
)
@OperLog
(
message
=
"案件查询"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"案件查询(存储reids)"
)
@PostMapping
(
"/ajxx"
)
public
MapRestResult
selectAsjxx
(
@RequestBody
Receiving
receiving
)
{
receiving
.
setSsdw
(
ssdw
);
//设置所属单位,用于案件类别代码转译
...
...
@@ -55,9 +55,17 @@ public class TbStAsjController {
return
MapRestResult
.
ok
().
data
(
asjList
);
}
//案件查询(同类案件 chent20200507)
@OperLog
(
message
=
"案件查询(同类案件)"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"案件查询(同类案件)"
)
@PostMapping
(
"/tlajxx"
)
public
MapRestResult
selectTlAsjxx
(
@RequestBody
Receiving
receiving
)
{
return
tbStAsjService
.
selectTlAsjxxList
(
receiving
);
}
@OperLog
(
message
=
"按条件查询案件"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"按条件查询案件"
)
@PostMapping
(
"getAsj"
)
@PostMapping
(
"
/
getAsj"
)
public
MapRestResult
getAsj
(
@RequestBody
AsjQuery
asjQuery
)
{
QueryWrapper
<
TbStAsj
>
wrapper
=
new
QueryWrapper
<>();
String
asjbh
=
asjQuery
.
getAsjbh
();
...
...
service/asj/src/main/java/com/founder/asj/mapper/TbStAsjMapper.java
View file @
23ddc755
...
...
@@ -33,4 +33,6 @@ public interface TbStAsjMapper extends BaseMapper<TbStAsj> {
String
getNameByCode
(
Map
<
String
,
String
>
map
);
List
<
TbStAsj
>
selectAsjxxByReceivingList
(
Receiving
receiving
);
List
<
TbStAsj
>
selectTlAsjxx
(
Receiving
receiving
);
}
service/asj/src/main/java/com/founder/asj/mapper/xml/TbStAsjMapper.xml
View file @
23ddc755
...
...
@@ -262,5 +262,185 @@
</if>
</sql>
<!--同类案件-->
<select
id=
"selectTlAsjxx"
parameterType=
"com.founder.commonutils.publicEntity.Receiving"
resultType=
"com.founder.commonutils.asjEntity.TbStAsj"
>
SELECT
KYMYQZ_WPSL
,T.ASJBH
,KYZZQZ_WPSL
,KYFZQZ_WPSL
,KYQTQZ_WPSL
,SLSJ
,SLDW_GAJGJGDM
,SLDW_GAJGMC
,LARQ
,LADW_GAJGJGDM
,LADW_GAJGMC
,ZARY_RS
,SJCWJZRMBY
,ZCZJ_ZCXWYJMS
,ZCZJ_ZXSJ01
,ZCZJDW_GAJGJGDM
,ZCZJDW_GAJGMC
,YSSCQSRQ
,YSSCQSAJSCFHJDDM
,SFCXAJ_PDBZ
,CXAJYYDM
,CXAJDW_GAJGJGDM
,CXAJDW_GAJGMC
,CXAJRQ
,XSAJXSGZJGDM
,ZBR_XM
,ZBR_GMSFHM
,ZBR_LXDH
,XBR_XM
,XBR_GMSFHM
,XBR_LXDH
,XSJSFZR_XM
,XSJSFZR_GMSFHM
,XSJSFZR_LXDH
,GAJGFZR_XM
,GAJGFZR_GMSFHM
,GAJGFZR_LXDH
,T.JJBH
,XCKYBH
,ASJLYDM
,XSJQLBDM
,ZCJDDM
,XSAJLASCJGDM
,AJLBDM
,ZATZ_JYQK
,TSSDDM
,ZATZZDFL_JYQK
,ZATZBCMS_JYQK
,ZATZ_AJZATZJHBD
,AJ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ASJSSCW_JYQK
,SSJZRMBY
,KYZSQZ_WPSL
,JJSD_JJSDDM
,JSSD_JSSDDM
,ZPSD_ZPSDDM
,LKJZKJFS_LKJZKJFSDM
,ZAZBSD_ZAZBSDDM
,JRJZKJFSJSD_JRJZKJFSJSDDM
<if
test=
"ssdw != '441900000000'"
>
,(select name from sys_dictitem where groupid='CODE_AJLB' and code=T.ajlbdm) as ajlbdmStr
</if>
<if
test=
"ssdw == '441900000000'"
>
,(case
when T.ajlx_dg='01' then (select name from sys_dictitem where groupid='CODE_AJLB' and code=T.ajlbdm)
when T.ajlx_dg!='01' then (select name from sys_dictitem where groupid='CODE_DG_AJ_AB' and code=T.AB_DG)
else '' end ) as ajlbdmStr
</if>
, (select name from sys_dictitem where groupid='CODE_ZCJDDM' and code=T.ZCJDDM) as zcjddmStr
FROM tb_st_asj T
left join tb_xw_asjbz T1 on T1.asjbh=T.asjbh
WHERE 1=1 and ASJFSDD_DQJD is not null and ASJFSDD_DQWD is not null
<include
refid=
"queryWhereByTlasj"
/>
</select>
<sql
id=
"queryWhereByTlasj"
>
<if
test=
"asjfssj_asjfskssj_start!= null"
>
AND T.ASJFSSJ_ASJFSKSSJ
<![CDATA[>=]]>
to_date(#{asjfssj_asjfskssj_start},'yyyy-MM-dd hh24:mi:ss')
</if>
<if
test=
"asjfssj_asjfskssj_end!= null"
>
AND T.ASJFSSJ_ASJFSKSSJ
<![CDATA[<]]>
to_date(#{asjfssj_asjfskssj_end},'yyyy-MM-dd hh24:mi:ss')
</if>
<if
test=
"qsjd!=null and qsjd!='' and jsjd!=null and jsjd!='' and qswd!=null and qswd!='' and jswd!=null and jswd!=''"
>
AND T.ASJFSDD_DQJD
<![CDATA[>=]]>
#{qsjd,jdbcType=VARCHAR} AND T.ASJFSDD_DQJD
<![CDATA[<=]]>
#{jsjd,jdbcType=VARCHAR}
AND T.ASJFSDD_DQWD
<![CDATA[>=]]>
#{qswd,jdbcType=VARCHAR} AND T.ASJFSDD_DQWD
<![CDATA[<=]]>
#{jswd,jdbcType=VARCHAR}
</if>
<if
test=
"ajzlb!= null and ajzlb!=''"
>
AND T1.ajzlb= #{ ajzlb , jdbcType=VARCHAR }
</if>
<if
test=
"ajxzlb!= null and ajxzlb!=''"
>
AND T1.ajxzlb= #{ ajxzlb , jdbcType=VARCHAR }
</if>
<if
test=
"xalbdmbcms!= null and xalbdmbcms!=''"
>
AND T1.xalbdmbcms= #{ xalbdmbcms , jdbcType=VARCHAR }
</if>
<if
test=
"gjc!= null and gjc.length>0"
>
and(
<foreach
collection=
"gjc"
item=
"item"
index=
"index"
separator=
" or "
>
T.jyaq like '%${item}%'
</foreach>
)
</if>
<if
test=
"zcjddm!= null and zcjddm!=''"
>
and T.zcjddm in (${zcjddm})
</if>
</sql>
</mapper>
service/asj/src/main/java/com/founder/asj/service/TbStAsjService.java
View file @
23ddc755
...
...
@@ -4,6 +4,7 @@ package com.founder.asj.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.founder.commonutils.asjEntity.CbxszAndXlaj
;
import
com.founder.commonutils.asjEntity.TbStAsj
;
import
com.founder.commonutils.publicEntity.MapRestResult
;
import
com.founder.commonutils.publicEntity.Receiving
;
import
java.util.List
;
...
...
@@ -30,4 +31,6 @@ public interface TbStAsjService extends IService<TbStAsj> {
String
getNameByCode
(
Map
<
String
,
String
>
map
);
List
<
TbStAsj
>
selectAsjxxList
(
Receiving
receiving
);
MapRestResult
selectTlAsjxxList
(
Receiving
receiving
);
}
service/asj/src/main/java/com/founder/asj/service/impl/TbStAsjServiceImpl.java
View file @
23ddc755
...
...
@@ -6,7 +6,9 @@ import com.founder.asj.mapper.TbStAsjMapper;
import
com.founder.asj.service.TbStAsjService
;
import
com.founder.commonutils.asjEntity.CbxszAndXlaj
;
import
com.founder.commonutils.asjEntity.TbStAsj
;
import
com.founder.commonutils.publicEntity.MapRestResult
;
import
com.founder.commonutils.publicEntity.Receiving
;
import
com.founder.commonutils.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -56,4 +58,17 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
public
List
<
TbStAsj
>
selectAsjxxList
(
Receiving
receiving
)
{
return
tbStAsjMapper
.
selectAsjxxByReceivingList
(
receiving
);
}
//utils.StringUtil
@Override
public
MapRestResult
selectTlAsjxxList
(
Receiving
receiving
)
{
if
(
StringUtil
.
isEmpty
(
receiving
.
getQsjd
())||
StringUtil
.
isEmpty
(
receiving
.
getJsjd
())||
StringUtil
.
isEmpty
(
receiving
.
getQswd
())||
StringUtil
.
isEmpty
(
receiving
.
getJswd
())){
return
MapRestResult
.
error
().
code
(
200
).
message
(
"起始经纬度不能为空"
);
}
else
if
(
StringUtil
.
isEmpty
(
receiving
.
getAsjfssj_asjfskssj_start
())||
StringUtil
.
isEmpty
(
receiving
.
getAsjfssj_asjfskssj_end
())){
return
MapRestResult
.
error
().
code
(
200
).
message
(
"时间段不能为空"
);
}
else
if
(
StringUtil
.
isEmpty
(
receiving
.
getAjzlb
())&&
StringUtil
.
isEmpty
(
receiving
.
getAjxzlb
())&&
StringUtil
.
isEmpty
(
receiving
.
getXalbdmbcms
())){
return
MapRestResult
.
error
().
code
(
200
).
message
(
"案件标签为空,无法推算同类案件"
);
}
else
{
return
MapRestResult
.
ok
().
code
(
200
).
data
(
tbStAsjMapper
.
selectTlAsjxx
(
receiving
));
}
}
}
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