Commit cfd1610d by lilei

命案发案研判报告附件一

parent 8f779f9a
......@@ -245,7 +245,26 @@ public class YpbgController {
Map<String,Object> rtMap=new HashedMap();
rtMap.put("data",listMap);
return R.ok().data(rtMap);
}
/**
* 发案情况月度通报附件1
* @param matj
* @return
*/
@PostMapping("/getYpbgFja")
@ResponseBody
public R getYpbgFja(@RequestBody Matj matj){
try {
String ypbgFja = ypbgService.getYpbgFja(matj);
return R.ok().data("ypbgFj",ypbgFja);
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
}
......@@ -51,5 +51,12 @@ public interface YpbgMapper {
*/
String getQgrkCount(String unitcode);
//查询一杀多人案信息
List<TbStAsj> getYsdraList(Matj matj);
//查询嫌疑人信息
List<TbXwZbfzxyr> getXyrList(String asjbh);
//查询被害人姓名
List<TbXwRybh> getBhrList(String asjbh);
}
......@@ -319,4 +319,40 @@
</select>
<select id="getYsdraList" parameterType="org.springblade.founder.asj.entity.Matj" resultType="org.springblade.founder.asj.entity.TbStAsj">
select
asj.asjbh as asjbh,
(select name from code_gxs where code = CONCAT(left(asj.LADW_GAJGJGDM,4),'00000000')) as ladwGajgjgdm,
(select name from sys_dictitem where groupid='CODE_ZADJ' and code=zczj_zadjdm) as zczjZadjdm,
(select name from sys_dictitem where groupid='CODE_TSSD' and code=asj.TSSDDM) as tssddm,
asj.larq as larq
from tb_st_asj asj inner join tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh
inner join tb_xw_zczj zczj on asj.asjbh=zczj.asjbh
inner join
(select asj.asjbh from tb_st_asj asj inner join tb_xw_rybh rybh on asj.asjbh=rybh.asjbh where asj.xxsc_pdbz='0' and rybh.xxsc_pdbz='0' and rybh.RSSHCDDM='1'
<if test="larqQssj!=null and larqQssj!=''">and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[>=]]>(str_to_date(#{larqQssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))</if>
<if test="larqJssj!=null and larqJssj!=''">and DATE_FORMAT(asj.larq,'%Y-%m-%d %H:%i:%S') <![CDATA[<=]]>(str_to_date(#{larqJssj, jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%S'))</if>
group by rybh.asjbh having count(*) >=3) zdsw on asj.asjbh=zdsw.asjbh
<include refid="common-condition"/>
</select>
<select id="getXyrList" parameterType="java.lang.String" resultType="org.springblade.founder.asj.entity.TbXwZbfzxyr">
select
year(asj.ASJFSSJ_ASJFSKSSJ)-year(xyr.RQGZXX_CSRQ_RQGZSX) as zhfzxyrNl,
xyr.zhfzxyr_xm as zhfzxyrXm,
(select name from sys_dictitem where groupid='CODE_XB' and code=xyr.zhfzxyr_xbdm) as xbdm
FROM tb_xw_zbfzxyr xyr left JOIN tb_st_asj asj ON xyr.asjbh=asj.asjbh
left join tb_xw_asjcz asjcz on asjcz.asjbh = asj.asjbh
WHERE xyr.asjbh = #{asjbh ,jdbcType=VARCHAR}
</select>
<select id="getBhrList" parameterType="java.lang.String" resultType="org.springblade.founder.asj.entity.TbXwRybh">
select
bhr_xm as bhrXm
FROM tb_xw_rybh
WHERE asjbh = #{asjbh ,jdbcType=VARCHAR}
</select>
</mapper>
......@@ -38,4 +38,7 @@ public interface IYpbgService {
* @return
*/
String getQgrkCount(String unitcode);
//命案发案月度报告--附件1
String getYpbgFja(Matj matj)throws Exception;
}
......@@ -2,10 +2,7 @@ package org.springblade.founder.ypbg.service.impl;
import org.omg.CORBA.OBJ_ADAPTER;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.asj.entity.MafxtjParam;
import org.springblade.founder.asj.entity.Matj;
import org.springblade.founder.asj.entity.MatjResult;
import org.springblade.founder.asj.entity.Xqfpaxx;
import org.springblade.founder.asj.entity.*;
import org.springblade.founder.asj.mapper.MaTjfxMapper;
import org.springblade.founder.asj.mapper.MatjMapper;
import org.springblade.founder.asj.service.IMaTjfxService;
......@@ -1320,5 +1317,61 @@ public class YpbgServiceImpl implements IYpbgService {
return ypbgMapper.getQgrkCount(unitcode);
}
@Override
public String getYpbgFja(Matj matj) throws Exception {
int num = 1;
String ypbgfj = "";
List<TbStAsj> ysdraList = ypbgMapper.getYsdraList(matj);
if (ysdraList!=null&&ysdraList.size()>0){
for (TbStAsj tbStAsj:ysdraList) {
String ladw = tbStAsj.getLadwGajgjgdm();//立案单位
if (!StringUtils.isEmpty(ladw)){
ladw = ladw.substring(0,ladw.length()-3);
}else {
ladw = "";
}
String asjbh = tbStAsj.getAsjbh();//案件编号
String tssddm = tbStAsj.getTssddm();//作案手段
String zadjdm = tbStAsj.getZadjdm();//作案动机
Date lasj = new SimpleDateFormat("yyyy-MM-dd").parse(tbStAsj.getLarq());
Calendar larq = Calendar.getInstance();
larq.setTime(lasj);
int month = larq.get(Calendar.MONTH) + 1;
int day = larq.get(Calendar.DAY_OF_MONTH);
List<TbXwRybh> bhrList = ypbgMapper.getBhrList(asjbh);
ypbgfj += "<p style=\"font-size: 21px;text-indent:50px; font-family: 仿宋\">"+num+"、"+ladw+"“"+month+"."+day+
"”杀害"+bhrList.size()+"人案。"+month+"月"+day+"日,犯罪嫌疑人";
List<TbXwZbfzxyr> xyrList = ypbgMapper.getXyrList(asjbh);
if (xyrList!=null&&xyrList.size()>0) {
for (TbXwZbfzxyr zbfzxyr : xyrList) {
String zhfzxyrXm = zbfzxyr.getZhfzxyrXm();//姓名
String zhfzxyrNl = zbfzxyr.getZhfzxyrNl();//年龄
String xbdm = zbfzxyr.getXbdm();//性别
ypbgfj += zhfzxyrXm+"("+xbdm+","+zhfzxyrNl+"岁)、";
}
}
if (ypbgfj.endsWith("、")){
ypbgfj = ypbgfj.substring(0,ypbgfj.length()-1);
}
if (!StringUtils.isEmpty(zadjdm)){
ypbgfj += "因"+zadjdm+",";
}
if (!StringUtils.isEmpty(tssddm)){
ypbgfj += "使用"+tssddm;
}
ypbgfj += "将";
for (TbXwRybh bhr:bhrList) {
ypbgfj += bhr.getBhrXm()+"、";
}
if (ypbgfj.endsWith("、")){
ypbgfj = ypbgfj.substring(0,ypbgfj.length()-1)+"杀害。</p>";
}
num++;
}
}
return ypbgfj;
}
}
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