Commit 89111d86 by YANGYANG

时空热力图 案件分页查询提交

parent adb49128
...@@ -55,6 +55,9 @@ public class TbStAsj implements Serializable { ...@@ -55,6 +55,9 @@ public class TbStAsj implements Serializable {
@TableField("ZCJDDM") @TableField("ZCJDDM")
private String zcjddm; private String zcjddm;
@ApiModelProperty(value = "侦查阶段代码名称")
private String zcjddmMc;
@ApiModelProperty(value = "刑事案件立案审查结果代码") @ApiModelProperty(value = "刑事案件立案审查结果代码")
@TableField("XSAJLASCJGDM") @TableField("XSAJLASCJGDM")
private String xsajlascjgdm; private String xsajlascjgdm;
...@@ -67,6 +70,12 @@ public class TbStAsj implements Serializable { ...@@ -67,6 +70,12 @@ public class TbStAsj implements Serializable {
@TableField("ZATZ_JYQK") @TableField("ZATZ_JYQK")
private String zatzJyqk; private String zatzJyqk;
@ApiModelProperty(value = "作案特征_简要情况名称")
private String zatzJyqkMc;
@ApiModelProperty(value = "案件细类别名称")
private String ajxlbMc;
@ApiModelProperty(value = "特殊手段代码") @ApiModelProperty(value = "特殊手段代码")
@TableField("TSSDDM") @TableField("TSSDDM")
private String tssddm; private String tssddm;
...@@ -123,6 +132,9 @@ public class TbStAsj implements Serializable { ...@@ -123,6 +132,9 @@ public class TbStAsj implements Serializable {
@TableField("ASJFSDD_XZQHDM") @TableField("ASJFSDD_XZQHDM")
private String asjfsddXzqhdm; private String asjfsddXzqhdm;
@ApiModelProperty(value = "案事件发生地点_行政区划代码名称")
private String asjfsddXzqhdmMc;
@ApiModelProperty(value = "案事件发生地点_地址名称") @ApiModelProperty(value = "案事件发生地点_地址名称")
@TableField("ASJFSDD_DZMC") @TableField("ASJFSDD_DZMC")
private String asjfsddDzmc; private String asjfsddDzmc;
......
...@@ -49,7 +49,7 @@ public class TbStAsjController { ...@@ -49,7 +49,7 @@ public class TbStAsjController {
@Value("${ssdw}") @Value("${ssdw}")
private String ssdw; private String ssdw;
//案件查询(存储reids)
@OperLog(message = "案件查询",operation = OperationType.QUERY) @OperLog(message = "案件查询",operation = OperationType.QUERY)
@ApiOperation(value = "案件查询(存储redis)") @ApiOperation(value = "案件查询(存储redis)")
@PostMapping("/ajxx") @PostMapping("/ajxx")
...@@ -60,6 +60,18 @@ public class TbStAsjController { ...@@ -60,6 +60,18 @@ public class TbStAsjController {
return MapRestResult.ok(asjList); return MapRestResult.ok(asjList);
} }
@OperLog(message = "案件查询(热力图)",operation = OperationType.QUERY)
@ApiOperation(value = "案件查询(热力图)")
@PostMapping("/ajxxRlt")
public MapRestResult selectAsjxxRlt(@RequestBody Receiving receiving) {
List<TbStAsj> asjList = tbStAsjService.selectAsjxxRltList(receiving);
Integer total = 0;
if(asjList.size()>0){
total = tbStAsjService.selectAsjxxRltListCount(receiving);
}
return MapRestResult.build(200,"成功获取案件信息",total,asjList);
}
//案件查询(同类案件 chent20200507) //案件查询(同类案件 chent20200507)
@OperLog(message = "案件查询(同类案件)",operation = OperationType.QUERY) @OperLog(message = "案件查询(同类案件)",operation = OperationType.QUERY)
@ApiOperation(value = "案件查询(同类案件)") @ApiOperation(value = "案件查询(同类案件)")
......
...@@ -36,6 +36,10 @@ public interface TbStAsjMapper extends BaseMapper<TbStAsj> { ...@@ -36,6 +36,10 @@ public interface TbStAsjMapper extends BaseMapper<TbStAsj> {
List<TbStAsj> selectAsjxxByReceivingList(Receiving receiving); List<TbStAsj> selectAsjxxByReceivingList(Receiving receiving);
List<TbStAsj> selectAsjxxRltByReceivingList(Receiving receiving);
Integer selectAsjxxRltByReceivingListCount(Receiving receiving);
List<TbStAsj> selectTlAsjxx(Receiving receiving); List<TbStAsj> selectTlAsjxx(Receiving receiving);
List<Map<String,Object>> getAsjxxByZjhm(@Param(value = "zjhm")String zjhm); List<Map<String,Object>> getAsjxxByZjhm(@Param(value = "zjhm")String zjhm);
......
...@@ -207,58 +207,130 @@ ...@@ -207,58 +207,130 @@
<include refid="queryWhereByReceiving"/> <include refid="queryWhereByReceiving"/>
</select> </select>
<select id="selectAsjxxRltByReceivingList" parameterType="com.founder.commonutils.publicEntity.Receiving" resultType="com.founder.commonutils.asjEntity.TbStAsj">
select t2.* from(
select t1.*,rownum as rn from
(
SELECT
T.ASJBH
,T.SLSJ
,T.SLDW_GAJGJGDM
,T.SLDW_GAJGMC
,T.LARQ
,T.LADW_GAJGJGDM
,T.LADW_GAJGMC
,T.ZARY_RS
,T.SJCWJZRMBY
,T.JJBH
,T.XCKYBH
,T.ASJLYDM
,T.ZCJDDM
,(select name from sys_dictitem where groupid='CODE_ZCJDDM' and code=T.ZCJDDM) as zcjddmMc
,T.XSAJLASCJGDM
,T.AJLBDM
,T.ZATZ_JYQK
,T.AJMC
,T.FXASJDD_XZQHDM
,T.FXASJDD_DZMC
,T.ASJFSSJ_ASJFSKSSJ
,T.ASJFSSJ_ASJFSJSSJ
,T.ASJFSSJ_RSDDM
,T.ASJFSSJ_ZASJ_ZASJLBDM
,T.ASJFSSJ_ZASJ_DMBCMS
,T.ASJFSDD_XZQHDM
,(select name from sys_dictitem where groupid='CODE_XZQH' and code=T.ASJFSDD_XZQHDM) as asjfsddXzqhdmMc
,T.ASJFSDD_DZMC
,T.ASJFSDD_DQJD as x
,T.ASJFSDD_DQWD as y
,T.JYAQ
,T.ASJFSSJFX_ASJFSKSSJ
,T.ASJFSSJFX_ASJFSJSSJ
,T.SSJZRMBY
,(select CODE_LEV3 from sys_dictitem_xz where code=T.ladw_gajgjgdm) as fjdm
,(select CODE_LEV4 from sys_dictitem_xz where code=T.ladw_gajgjgdm) as pcsdm
,(select name from sys_dictitem where groupid='CODE_AJLB' and code=T.ajlbdm) as ajlbdmStr
,(select name from SYS_DICTITEM where groupid='CODE_AJXZ' AND code = T.zatz_Jyqk) AS zatzJyqkMc
,(select name from SYS_DICTITEM where groupid='CODE_AJXLB' AND code = ASJBZ.ajxlb) AS ajxlbMc
FROM tb_st_asj T left join tb_st_asj_asjbz asjbz on T.asjbh = asjbz.asjbh
WHERE 1=1
<include refid="queryWhereByReceiving"/>
) t1
<where>
rownum<![CDATA[ <= ]]> #{ end , jdbcType=VARCHAR }
</where>
)t2
<where>
rn<![CDATA[ > ]]> #{ begin, jdbcType=VARCHAR }
</where>
</select>
<select id="selectAsjxxRltByReceivingListCount" parameterType="com.founder.commonutils.publicEntity.Receiving" resultType="java.lang.Integer">
SELECT
count(*)
FROM tb_st_asj T left join tb_st_asj_asjbz asjbz on T.asjbh = asjbz.asjbh
WHERE 1=1
<include refid="queryWhereByReceiving"/>
</select>
<sql id="queryWhereByReceiving"> <sql id="queryWhereByReceiving">
<if test="asjbh!= null"> <if test="asjbh!= null and asjbh!=''">
AND T.ASJBH= #{ asjbh , jdbcType=VARCHAR } AND T.ASJBH= #{ asjbh , jdbcType=VARCHAR }
</if> </if>
<if test="ajlbdm!= null"> <if test="ajmc!= null and ajmc!=''">
AND T.AJLBDM= #{ ajlbdm , jdbcType=VARCHAR } AND T.AJMC= #{ ajmc , jdbcType=VARCHAR }
</if>
<if test="ajlbdm!= null and ajlbdm!=''">
AND T.AJLBDM like #{ajlbdm , jdbcType=VARCHAR } || '%'
</if>
<if test="zatzJyqk!= null and zatzJyqk!=''">
AND T.ZATZ_JYQK = #{zatzJyqk , jdbcType=VARCHAR }
</if> </if>
<if test="jyaq!= null"> <if test="ajxlb!= null and ajxlb!=''">
AND asjbz.ajxlb = #{ajxlb , jdbcType=VARCHAR }
</if>
<if test="jyaq!= null and jyaq!=''">
AND T.JYAQ LIKE '%' || #{jyaq , jdbcType=VARCHAR } || '%' AND T.JYAQ LIKE '%' || #{jyaq , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="asjfssj_asjfskssj_start!= null"> <if test="asjfssj_asjfskssj_start!= null and asjfssj_asjfskssj_start!=''">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[>=]]> to_date(#{asjfssj_asjfskssj_start},'yyyy-MM-dd hh24:mi:ss') AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[>=]]> to_date(#{asjfssj_asjfskssj_start},'yyyy-MM-dd hh24:mi:ss')
</if> </if>
<if test="asjfssj_asjfskssj_end!= null"> <if test="asjfssj_asjfskssj_end!= null and asjfssj_asjfskssj_end!=''">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[<]]> to_date(#{asjfssj_asjfskssj_end},'yyyy-MM-dd hh24:mi:ss') AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[<]]> to_date(#{asjfssj_asjfskssj_end},'yyyy-MM-dd hh24:mi:ss')
</if> </if>
<if test="ajslsj_start!= null"> <if test="ajslsj_start!= null and ajslsj_start!=''">
AND T.SLSJ <![CDATA[>=]]> to_date(#{ajslsj_start},'yyyy-MM-dd hh24:mi:ss') AND T.SLSJ <![CDATA[>=]]> to_date(#{ajslsj_start},'yyyy-MM-dd hh24:mi:ss')
</if> </if>
<if test="ajslsj_end!= null"> <if test="ajslsj_end!= null and ajslsj_end!=''">
AND T.SLSJ <![CDATA[<]]> to_date(#{ajslsj_end},'yyyy-MM-dd hh24:mi:ss') AND T.SLSJ <![CDATA[<]]> to_date(#{ajslsj_end},'yyyy-MM-dd hh24:mi:ss')
</if> </if>
<if test="larq_start!= null and larq_start!=''">
<if test="larq_start!= null">
AND T.LARQ <![CDATA[>=]]> to_date(#{larq_start},'yyyy-MM-dd hh24:mi:ss') AND T.LARQ <![CDATA[>=]]> to_date(#{larq_start},'yyyy-MM-dd hh24:mi:ss')
</if> </if>
<if test="larq_end!= null"> <if test="larq_end!= null and larq_end!=''">
AND T.LARQ <![CDATA[<]]> to_date(#{larq_end},'yyyy-MM-dd hh24:mi:ss') AND T.LARQ <![CDATA[<]]> to_date(#{larq_end},'yyyy-MM-dd hh24:mi:ss')
</if> </if>
<if test="ladw_gajgjgdm!= null"> <if test="ladw_gajgjgdm!= null and ladw_gajgjgdm!=''">
AND T.LADW_GAJGJGDM= #{ ladw_gajgjgdm , jdbcType=VARCHAR } AND T.LADW_GAJGJGDM= #{ ladw_gajgjgdm , jdbcType=VARCHAR }
</if> </if>
<if test="afdxzqhdm!= null"> <if test="afdxzqhdm!= null and afdxzqhdm!=''">
AND T.ASJFSDD_XZQHDM= #{ afdxzqhdm , jdbcType=VARCHAR } AND T.ASJFSDD_XZQHDM like #{afdxzqhdm , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="asjfsd_dzmc!= null"> <if test="asjfsd_dzmc!= null and asjfsd_dzmc!=''">
AND T.ASJFSDD_DZMC LIKE '%' || #{asjfsd_dzmc , jdbcType=VARCHAR } || '%' AND T.ASJFSDD_DZMC LIKE '%' || #{asjfsd_dzmc , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="x!= null and x!=0.0"> <if test="x!= null and x!=0.0 and x!=''">
AND T.ASJFSDD_DQJD= #{ x , jdbcType=DOUBLE } AND T.ASJFSDD_DQJD= #{ x , jdbcType=DOUBLE }
</if> </if>
<if test="y!= null and y!=0.0"> <if test="y!= null and y!=0.0 and y!=''">
AND T.ASJFSDD_DQWD= #{ y , jdbcType=DOUBLE } AND T.ASJFSDD_DQWD= #{ y , jdbcType=DOUBLE }
</if> </if>
<if test="zcjddm!= null"> <if test="zcjddm!= null and zcjddm!=''">
AND T.ZCJDDM= #{ zcjddm , jdbcType=VARCHAR } AND T.ZCJDDM= #{ zcjddm , jdbcType=VARCHAR }
</if> </if>
<if test="xckybh!= null"> <if test="xckybh!= null and xckybh!=''">
AND T.XCKYBH= #{ xckybh , jdbcType=VARCHAR } AND T.XCKYBH= #{ xckybh , jdbcType=VARCHAR }
</if> </if>
</sql> </sql>
<!--同类案件--> <!--同类案件-->
<select id="selectTlAsjxx" parameterType="com.founder.commonutils.publicEntity.Receiving" resultType="com.founder.commonutils.asjEntity.TbStAsj"> <select id="selectTlAsjxx" parameterType="com.founder.commonutils.publicEntity.Receiving" resultType="com.founder.commonutils.asjEntity.TbStAsj">
SELECT SELECT
......
...@@ -35,6 +35,10 @@ public interface TbStAsjService extends IService<TbStAsj> { ...@@ -35,6 +35,10 @@ public interface TbStAsjService extends IService<TbStAsj> {
List<TbStAsj> selectAsjxxList(Receiving receiving); List<TbStAsj> selectAsjxxList(Receiving receiving);
List<TbStAsj> selectAsjxxRltList(Receiving receiving);
Integer selectAsjxxRltListCount(Receiving receiving);
MapRestResult selectTlAsjxxList(Receiving receiving); MapRestResult selectTlAsjxxList(Receiving receiving);
List<Map<String,Object>> getAsjxxByZjhm(String zjhm); List<Map<String,Object>> getAsjxxByZjhm(String zjhm);
......
...@@ -12,6 +12,7 @@ import com.founder.commonutils.asjEntity.TbXwAsjbz; ...@@ -12,6 +12,7 @@ import com.founder.commonutils.asjEntity.TbXwAsjbz;
import com.founder.commonutils.publicEntity.MapRestResult; import com.founder.commonutils.publicEntity.MapRestResult;
import com.founder.commonutils.publicEntity.Receiving; import com.founder.commonutils.publicEntity.Receiving;
import com.founder.commonutils.util.StringUtil; import com.founder.commonutils.util.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -65,6 +66,48 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl ...@@ -65,6 +66,48 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
public List<TbStAsj> selectAsjxxList(Receiving receiving) { public List<TbStAsj> selectAsjxxList(Receiving receiving) {
return tbStAsjMapper.selectAsjxxByReceivingList(receiving); return tbStAsjMapper.selectAsjxxByReceivingList(receiving);
} }
@Override
public List<TbStAsj> selectAsjxxRltList(Receiving receiving) {
// 分页处理
receiving.setPagePara(receiving.getLimit());
// 案件类别代码模糊查询
if (StringUtils.isNotEmpty(receiving.getAjlbdm())) {
// 根据规则截取前三位
String ajlbdm = "";
if (receiving.getAjlbdm().endsWith("000")) {
ajlbdm = receiving.getAjlbdm().substring(0, 3) + "*";
} else {
ajlbdm = receiving.getAjlbdm();
}
receiving.setAjlbdm(ajlbdm);
}
// 案件类别代码模糊查询
if (StringUtils.isNotEmpty(receiving.getAfdxzqhdm())) {
// 根据规则截取前两位
String xzqh = "";
if(receiving.getAfdxzqhdm().endsWith("0000")){
xzqh = receiving.getAfdxzqhdm().substring(0,2);
}else if(receiving.getAfdxzqhdm().endsWith("00")){
xzqh = receiving.getAfdxzqhdm().substring(0,4);
}else{
xzqh = receiving.getAfdxzqhdm();
}
receiving.setAfdxzqhdm(xzqh);
}
return tbStAsjMapper.selectAsjxxRltByReceivingList(receiving);
}
@Override
public Integer selectAsjxxRltListCount(Receiving receiving) {
return tbStAsjMapper.selectAsjxxRltByReceivingListCount(receiving);
}
//utils.StringUtil //utils.StringUtil
@Override @Override
public MapRestResult selectTlAsjxxList(Receiving receiving) { public MapRestResult selectTlAsjxxList(Receiving receiving) {
......
...@@ -7,6 +7,8 @@ spring.jackson.time-zone=GMT+8 ...@@ -7,6 +7,8 @@ spring.jackson.time-zone=GMT+8
#设置日志级别 #设置日志级别
logging.level.root=INFO logging.level.root=INFO
#设置sql输出
logging.level.com.founder.asj.mapper=debug
#刑专库 #刑专库
spring.datasource.xzxtdb.driver-class-name=oracle.jdbc.driver.OracleDriver spring.datasource.xzxtdb.driver-class-name=oracle.jdbc.driver.OracleDriver
...@@ -21,7 +23,7 @@ spring.datasource.qgdb.username=XZXT ...@@ -21,7 +23,7 @@ spring.datasource.qgdb.username=XZXT
spring.datasource.qgdb.password=XzPwd#11022 spring.datasource.qgdb.password=XzPwd#11022
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
#sql日志 #mybatisc-plus sql日志
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#es健康检查关闭 #es健康检查关闭
management.health.elasticsearch.enabled=false management.health.elasticsearch.enabled=false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment