Commit 6c5946e8 by yanru

将部权修改中涉及的方法重新归类,并且修改大屏和首页上的方法

parent 9f9dfef0
......@@ -206,7 +206,23 @@ public class AjDetailController {
return tbStAsjFlwss;
}
/**
* 法律文书附件下载
* @param xxzjbh
* @return
*/
@RequestMapping("/flwsfjxz")
@ResponseBody
public R flwsfjxz(String xxzjbh){
try {
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
ajDetailService.flwsfjxz(xxzjbh,response);
return R.ok();
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
// 根据xxzjbh 查询被害人信息的详情
......@@ -230,6 +246,7 @@ public class AjDetailController {
/*// 非机动车的接口
@RequestMapping("/querySsddfjdc")
@ResponseBody
......@@ -337,5 +354,4 @@ public class AjDetailController {
}
......@@ -116,21 +116,5 @@ public class BqxgxxController {
}
/**
* 法律文书附件下载
* @param xxzjbh
* @return
*/
@RequestMapping("/flwsfjxz")
@ResponseBody
public R flwsfjxz(String xxzjbh){
try {
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
bqxgxxService.flwsfjxz(xxzjbh,response);
return R.ok();
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
}
......@@ -877,7 +877,7 @@ public class MatjController extends BladeController {
*/
@PostMapping("/getFzxyrTotalCount")
@ResponseBody
public R getFzxyrTotalCount(Matj matj) {
public R getFzxyrTotalCount(@RequestBody Matj matj) {
int total=matjService.getFzxyrTotalCount(matj);
Map<String, Object> rtMap=new HashedMap();
rtMap.put("data",total);
......@@ -891,7 +891,7 @@ public class MatjController extends BladeController {
*/
@PostMapping("/getBhrTotalCount")
@ResponseBody
public R getBhrTotalCount(Matj matj) {
public R getBhrTotalCount(@RequestBody Matj matj) {
int total=matjService.getBhrTotalCount(matj);
Map<String, Object> rtMap=new HashedMap();
rtMap.put("data",total);
......
......@@ -70,4 +70,7 @@ public interface AjDetailMapper {
public List<TbStAsjFlws> getFlws(String xxzjbh);
TbStAsj getAjjbxByAsjbh(String asjbh);
//根据
TbStAsjFlws getAsjFlwsByZjbh(String xxzjbh);
}
......@@ -733,4 +733,45 @@
WHERE asj.asjbh=#{asjbh,jdbcType=VARCHAR}
and asj.xxsc_pdbz='0'
</select>
<select id="getAsjFlwsByZjbh" resultType="org.springblade.founder.flwsfj.entity.TbStAsjFlws" parameterType="java.lang.String">
SELECT
XXZJBH,
ASJBH,
FLWS_GLXX_XXZJBH,
FLWS_ASJZCXWLBDM,
FLWS_ASJFLWSDM,
FLWS_BT,
FLWS_WSBH,
FLWS_DZWJBT,
FLWS_DZWJGS,
FLWS_DZWJNR,
FLWS_DZWJDX,
FLWS_DZWJWZ,
FLWS_JLSJ,
ASJXGRYBH,
XXDJRY_XM,
XXCZRY_GMSFHM,
XXDJRY_GMSFHM,
XXCZRY_XM,
XXCZDW_GAJGJGDM,
XXCZDW_GAJGMC,
XXDJRY_LXDH,
XXDJDW_GAJGMC,
XXLYMS,
XXSC_PDBZ,
XXDJDW_GAJGJGDM,
DJSJ,
GXSJ,
GABXF,
JZRYBH,
XXRBKSJ,
XXRSK_PDBZ,
XXRBK_PDBZ,
XXRSKSJ
FROM TB_ST_ASJ_FLWS
WHERE XXSC_PDBZ = '0' AND XXZJBH = #{xxzjbh,jdbcType=VARCHAR}
</select>
</mapper>
......@@ -24,8 +24,7 @@ public interface BqxgxxMapper {
//根据
TbStAsjFlws getAsjFlwsByZjbh(String xxzjbh);
TbYwMaglBqxgsq getBqxgsqxxByAsjbh(String asjbh);
......
......@@ -1674,7 +1674,7 @@
<include refid="common-condition"/>
AND zbfzxyr.XXSC_PDBZ='0'
<!-- 男性 1 女性2 1其他999-->
<if test ="(type =='' or type == null) or (type!='zhfzxyrXl' and type!='zhfzxyrZy') ">
<if test ="(type =='' or type == null) or (type!='zhfzxyrXl' and type!='zhfzxyrZy' and type!='zhfzxyrTz') ">
<if test="code != null and code !=''">
<if test="code == '999'"><!--未知-->
and (zbfzxyr.ZHFZXYR_XBDM IS NULL OR zbfzxyr.ZHFZXYR_XBDM ='' OR zbfzxyr.ZHFZXYR_XBDM ='9' OR zbfzxyr.ZHFZXYR_XBDM='0')
......@@ -1729,14 +1729,14 @@
</if>
<!--抓捕犯罪嫌疑人特征 1抓获、2 在逃、3 死亡、4精神病人、5 未满十四周岁-->
<if test="type=='zhfzxyrTz'">
<if test="code == '1' or code == '2' or code == '3'"><!--在逃-->
<if test="code == 1 or code == 2 or code == 3"><!--在逃-->
AND zbfzxyr.zhfzxyr_fzxyrdaztdm =#{code, jdbcType=VARCHAR}
</if>
<if test="code == '4'">
<if test="code == 4">
AND zbfzxyr.zhfzxyr_sfjsbr_pdbz = '1'
</if>
<if test="code == '5'">
<if test="code == 5">
AND year(asj.ASJFSSJ_ASJFSKSSJ)-year(zbfzxyr.RQGZXX_CSRQ_RQGZSX)<![CDATA[<]]>14
</if>
......
......@@ -111,48 +111,6 @@
WHERE XXZJBH = #{xxzjbh,jdbcType=VARCHAR}
</update>
<select id="getAsjFlwsByZjbh" resultType="org.springblade.founder.flwsfj.entity.TbStAsjFlws" parameterType="java.lang.String">
SELECT
XXZJBH,
ASJBH,
FLWS_GLXX_XXZJBH,
FLWS_ASJZCXWLBDM,
FLWS_ASJFLWSDM,
FLWS_BT,
FLWS_WSBH,
FLWS_DZWJBT,
FLWS_DZWJGS,
FLWS_DZWJNR,
FLWS_DZWJDX,
FLWS_DZWJWZ,
FLWS_JLSJ,
ASJXGRYBH,
XXDJRY_XM,
XXCZRY_GMSFHM,
XXDJRY_GMSFHM,
XXCZRY_XM,
XXCZDW_GAJGJGDM,
XXCZDW_GAJGMC,
XXDJRY_LXDH,
XXDJDW_GAJGMC,
XXLYMS,
XXSC_PDBZ,
XXDJDW_GAJGJGDM,
DJSJ,
GXSJ,
GABXF,
JZRYBH,
XXRBKSJ,
XXRSK_PDBZ,
XXRBK_PDBZ,
XXRSKSJ
FROM TB_ST_ASJ_FLWS
WHERE XXSC_PDBZ = '0' AND XXZJBH = #{xxzjbh,jdbcType=VARCHAR}
</select>
<!--修改案件的部权撤销相关字段 -->
<update id="doUpdateAsjBqcx" parameterType="org.springblade.founder.asj.entity.TbStAsj">
update TB_ST_ASJ SET
......
......@@ -4,6 +4,7 @@ import org.springblade.founder.asj.entity.*;
import org.springblade.founder.asjcz.entity.TbXwAsjcz;
import org.springblade.founder.flwsfj.entity.TbStAsjFlws;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
......@@ -61,5 +62,8 @@ public interface IAjDetailService {
public Map<String,Object> getXyrxxByxxzjbh(String xxzjbh);
TbStAsj getAjjbxByAsjbh(String asjbh);
//法律文书附件下载
void flwsfjxz(String xxzjbh, HttpServletResponse response) throws Exception;
}
......@@ -20,8 +20,7 @@ public interface IBqxgxxService {
//采集
void addTbMaglBqxgsq(TbYwMaglBqxgsq tbYwMaglBqxgsq, MultipartFile[] fileList)throws Exception;
//法律文书附件下载
void flwsfjxz(String xxzjbh, HttpServletResponse response) throws Exception;
TbYwMaglBqxgsq getBqcxDetail(String xxzjbh);
......
......@@ -2,6 +2,7 @@ package org.springblade.founder.asj.service.impl;
import org.apache.commons.collections.map.HashedMap;
import org.apache.poi.util.IOUtils;
import org.springblade.founder.asj.entity.*;
import org.springblade.founder.asj.mapper.AjDetailMapper;
import org.springblade.founder.asj.service.IAjDetailService;
......@@ -11,6 +12,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -88,6 +94,25 @@ public class AjDetailServiceImpl implements IAjDetailService {
public Integer getTbYwBlgcByAsjbhTotalCount(TbYwBlgc tbYwBlgc) {
return ajDetailDao.getTbYwBlgcByAsjbhTotalCount(tbYwBlgc);
}*/
@Override
public void flwsfjxz(String xxzjbh, HttpServletResponse response) throws Exception {
TbStAsjFlws asjFlwsByZjbh = ajDetailDao.getAsjFlwsByZjbh(xxzjbh);
// System.out.println(asjFlwsByZjbh.getXxzjbh());
byte[] flwsDzwjnr = asjFlwsByZjbh.getFlwsDzwjnr();
InputStream inputStream = new ByteArrayInputStream(flwsDzwjnr);
//附件下载
response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(asjFlwsByZjbh.getFlwsDzwjbt(),"UTF-8"));
ServletOutputStream outputStream = response.getOutputStream();
IOUtils.copy(inputStream, outputStream);
IOUtils.closeQuietly(inputStream);
IOUtils.closeQuietly(outputStream);
}
@Override
public List<TbXwBa> toQueryBaxxByAsjbh(String asjbh, Integer page, Integer rows) {
......
......@@ -181,25 +181,7 @@ public class BqxgxxServiceImpl implements IBqxgxxService {
}
@Override
public void flwsfjxz(String xxzjbh, HttpServletResponse response) throws Exception {
TbStAsjFlws asjFlwsByZjbh = bqxgxxMapper.getAsjFlwsByZjbh(xxzjbh);
// System.out.println(asjFlwsByZjbh.getXxzjbh());
byte[] flwsDzwjnr = asjFlwsByZjbh.getFlwsDzwjnr();
InputStream inputStream = new ByteArrayInputStream(flwsDzwjnr);
//附件下载
response.setHeader("Content-Disposition","attachment;filename="+ URLEncoder.encode(asjFlwsByZjbh.getFlwsDzwjbt(),"UTF-8"));
ServletOutputStream outputStream = response.getOutputStream();
IOUtils.copy(inputStream, outputStream);
IOUtils.closeQuietly(inputStream);
IOUtils.closeQuietly(outputStream);
}
@Override
public TbYwMaglBqxgsq getBqcxDetail(String xxzjbh) {
......
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