Commit 22c12877 by liulianglang

受害人

parent 5b710070
...@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel; ...@@ -4,6 +4,7 @@ import com.alibaba.excel.EasyExcel;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.Charsets; import org.apache.commons.codec.Charsets;
import org.springblade.founder.tjfx.entity.DwTjParam; import org.springblade.founder.tjfx.entity.DwTjParam;
import org.springblade.founder.tjfx.entity.TbStAsj;
import org.springblade.founder.tjfx.entity.TbXwZbfzxyr; import org.springblade.founder.tjfx.entity.TbXwZbfzxyr;
import org.springblade.founder.tjfx.entity.WcnrEntity; import org.springblade.founder.tjfx.entity.WcnrEntity;
import org.springblade.founder.tjfx.service.AjlbSysDictService; import org.springblade.founder.tjfx.service.AjlbSysDictService;
...@@ -106,10 +107,28 @@ public class WcnrfzTjController { ...@@ -106,10 +107,28 @@ public class WcnrfzTjController {
response.setCharacterEncoding(Charsets.UTF_8.name()); response.setCharacterEncoding(Charsets.UTF_8.name());
String fileName = URLEncoder.encode("嫌疑人列表", Charsets.UTF_8.name()); String fileName = URLEncoder.encode("嫌疑人列表", Charsets.UTF_8.name());
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), TbXwZbfzxyr.class).sheet("嫌疑人列表").doWrite(list); EasyExcel.write(response.getOutputStream(), WcnrEntity.class).sheet("嫌疑人列表").doWrite(list);
} }
@RequestMapping("/exportWcnrAjlbTjByPidTs")
@ResponseBody
public void exportWcnrAjlbTjByPidTs(DwTjParam dwTjParam, HttpServletResponse response, HttpServletRequest request) throws IOException {
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(1);
easyUIPage.setPageParaOracle(10000);
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
dwTjParam.setBegin(begin);
dwTjParam.setEnd(end);
Map<String, Object> rtMap = ajlbSysDictService.getWcnrAjlbTjByPidTs(dwTjParam);
List<TbStAsj> list =(List<TbStAsj>)rtMap.get("rows");
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding(Charsets.UTF_8.name());
String fileName = URLEncoder.encode("案件列表", Charsets.UTF_8.name());
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), TbStAsj.class).sheet("案件列表").doWrite(list);
}
} }
...@@ -2,6 +2,7 @@ package org.springblade.founder.tjfx.entity; ...@@ -2,6 +2,7 @@ package org.springblade.founder.tjfx.entity;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.apache.commons.lang.StringUtils;
/** /**
* 新版单位代码表 * 新版单位代码表
...@@ -22,10 +23,13 @@ public class DictitemXz { ...@@ -22,10 +23,13 @@ public class DictitemXz {
private String num; private String num;
private String rys; private String rys="0";
public int getNumberrys() { public int getNumberrys() {
if(StringUtils.isEmpty(this.rys)){
return Integer.parseInt(this.rys); return 0;
}else {
return Integer.parseInt(this.rys);
}
} }
} }
...@@ -433,7 +433,7 @@ ...@@ -433,7 +433,7 @@
</if> </if>
order by xyr.ZHRQ desc nulls last order by ASJ.larq desc
<include refid="pagination-tail" /> <include refid="pagination-tail" />
......
...@@ -19,5 +19,12 @@ public interface AjlbSysDictService { ...@@ -19,5 +19,12 @@ public interface AjlbSysDictService {
Map<String, Object> ExportWcnrRyTjByPidTs(DwTjParam dwTjParam); Map<String, Object> ExportWcnrRyTjByPidTs(DwTjParam dwTjParam);
Map<String, Object> ExportWcnrShrRyTjByPidTs(DwTjParam dwTjParam);
Map<String, Object> getWcnrAjlbShrTjByPid(DwTjParam dwTjParam);
Map<String, Object> getWcnrAjlbShrTjByPidTs(DwTjParam dwTjParam);
Map<String, Object> getWcnrRyShrTjByPidTs(DwTjParam dwTjParam);
} }
...@@ -5,9 +5,11 @@ import org.springblade.core.secure.utils.SecureUtil; ...@@ -5,9 +5,11 @@ import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.tjfx.entity.*; import org.springblade.founder.tjfx.entity.*;
import org.springblade.founder.tjfx.mapper.AjlbSysDictMapper; import org.springblade.founder.tjfx.mapper.AjlbSysDictMapper;
import org.springblade.founder.tjfx.mapper.DwAjlbTjfxMapper; import org.springblade.founder.tjfx.mapper.DwAjlbTjfxMapper;
import org.springblade.founder.tjfx.mapper.WcnrfzShrTjMapper;
import org.springblade.founder.tjfx.mapper.WcnrfzTjMapper; import org.springblade.founder.tjfx.mapper.WcnrfzTjMapper;
import org.springblade.founder.tjfx.service.AjlbSysDictService; import org.springblade.founder.tjfx.service.AjlbSysDictService;
import org.springblade.founder.tjfx.service.DwAjlbTjfxService; import org.springblade.founder.tjfx.service.DwAjlbTjfxService;
import org.springblade.founder.tjfx.service.WcnrfzShrTjService;
import org.springblade.founder.tjfx.service.WcnrfzTjService; import org.springblade.founder.tjfx.service.WcnrfzTjService;
import org.springblade.founder.utils.DwUtil; import org.springblade.founder.utils.DwUtil;
import org.springblade.modules.system.entity.XzxtUser; import org.springblade.modules.system.entity.XzxtUser;
...@@ -32,6 +34,12 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService { ...@@ -32,6 +34,12 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService {
private DwAjlbTjfxMapper dwAjlbTjfxMapper; private DwAjlbTjfxMapper dwAjlbTjfxMapper;
@Autowired @Autowired
private WcnrfzTjMapper wcnrfzTjMapper; private WcnrfzTjMapper wcnrfzTjMapper;
@Autowired
private WcnrfzShrTjService wcnrfzShrTjService;
@Autowired
private WcnrfzShrTjMapper wcnrfzShrTjMapper;
@Override @Override
public Map<String, Object> getAjlbTjByPid(DwTjParam dwTjParam) { public Map<String, Object> getAjlbTjByPid(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>(); Map<String, Object> rtMap = new HashMap<>();
...@@ -209,6 +217,57 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService { ...@@ -209,6 +217,57 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService {
@Override @Override
public Map<String, Object> getWcnrAjlbShrTjByPidTs(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>();
String unitcode=dwTjParam.getUnitcode();
if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode = xzxtUser.getUnitcode();//获取对应用户的单位
}
System.out.println(unitcode);
dwTjParam.setUnitcode(unitcode);
// dwTjParam.setQryType("bxq");
List<String> lbs=new ArrayList<>();
List<DictitemXz> unitList = ajlbSysDictMapper.getAjlbByCode(dwTjParam.getAjlbdm());
lbs.add(dwTjParam.getAjlbdm());
for(DictitemXz xz:unitList){
if("yxj".equals(xz.getLev())){
List<DictitemXz> xjajlbs = ajlbSysDictMapper.getAjlbByCode(xz.getCode());
for(DictitemXz xjs:xjajlbs){
if("yxj".equals(xjs.getLev())){
List<DictitemXz> xxjajlbs = ajlbSysDictMapper.getAjlbByCode(xjs.getCode());
for(DictitemXz xxjs:xxjajlbs){
lbs.add(xxjs.getCode());
}
lbs.add(xjs.getCode());
}else {
lbs.add(xjs.getCode());
}
}
lbs.add(xz.getCode());
}else{
lbs.add(xz.getCode());
}
}
dwTjParam.setLbs(lbs);
List<TbStAsj> dalist = wcnrfzShrTjMapper.getAjlbTjTs(dwTjParam);
int count =wcnrfzShrTjMapper.getAjlbTjTsCount(dwTjParam);
rtMap.put("rows",dalist);
rtMap.put("total",count);
return rtMap;
}
@Override
public Map<String, Object> getWcnrRyTjByPidTs(DwTjParam dwTjParam) { public Map<String, Object> getWcnrRyTjByPidTs(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>(); Map<String, Object> rtMap = new HashMap<>();
String unitcode=dwTjParam.getUnitcode(); String unitcode=dwTjParam.getUnitcode();
...@@ -260,6 +319,56 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService { ...@@ -260,6 +319,56 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService {
} }
@Override
public Map<String, Object> getWcnrRyShrTjByPidTs(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>();
String unitcode=dwTjParam.getUnitcode();
if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode = xzxtUser.getUnitcode();//获取对应用户的单位
}
System.out.println(unitcode);
dwTjParam.setUnitcode(unitcode);
// dwTjParam.setQryType("bxq");
List<String> lbs=new ArrayList<>();
List<DictitemXz> unitList = ajlbSysDictMapper.getAjlbByCode(dwTjParam.getAjlbdm());
lbs.add(dwTjParam.getAjlbdm());
for(DictitemXz xz:unitList){
if("yxj".equals(xz.getLev())){
List<DictitemXz> xjajlbs = ajlbSysDictMapper.getAjlbByCode(xz.getCode());
for(DictitemXz xjs:xjajlbs){
if("yxj".equals(xjs.getLev())){
List<DictitemXz> xxjajlbs = ajlbSysDictMapper.getAjlbByCode(xjs.getCode());
for(DictitemXz xxjs:xxjajlbs){
lbs.add(xxjs.getCode());
}
lbs.add(xjs.getCode());
}else {
lbs.add(xjs.getCode());
}
}
lbs.add(xz.getCode());
}else{
lbs.add(xz.getCode());
}
}
dwTjParam.setLbs(lbs);
List<TbXwZbfzxyr> dalist = wcnrfzShrTjMapper.getRyTjTs(dwTjParam);
int count =wcnrfzShrTjMapper.getRyTjTsCount(dwTjParam);
rtMap.put("rows",dalist);
rtMap.put("total",count);
return rtMap;
}
@Override @Override
public Map<String, Object> ExportWcnrRyTjByPidTs(DwTjParam dwTjParam) { public Map<String, Object> ExportWcnrRyTjByPidTs(DwTjParam dwTjParam) {
...@@ -312,6 +421,58 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService { ...@@ -312,6 +421,58 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService {
return rtMap; return rtMap;
} }
@Override
public Map<String, Object> ExportWcnrShrRyTjByPidTs(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>();
String unitcode=dwTjParam.getUnitcode();
if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode = xzxtUser.getUnitcode();//获取对应用户的单位
}
System.out.println(unitcode);
dwTjParam.setUnitcode(unitcode);
// dwTjParam.setQryType("bxq");
List<String> lbs=new ArrayList<>();
List<DictitemXz> unitList = ajlbSysDictMapper.getAjlbByCode(dwTjParam.getAjlbdm());
lbs.add(dwTjParam.getAjlbdm());
for(DictitemXz xz:unitList){
if("yxj".equals(xz.getLev())){
List<DictitemXz> xjajlbs = ajlbSysDictMapper.getAjlbByCode(xz.getCode());
for(DictitemXz xjs:xjajlbs){
if("yxj".equals(xjs.getLev())){
List<DictitemXz> xxjajlbs = ajlbSysDictMapper.getAjlbByCode(xjs.getCode());
for(DictitemXz xxjs:xxjajlbs){
lbs.add(xxjs.getCode());
}
lbs.add(xjs.getCode());
}else {
lbs.add(xjs.getCode());
}
}
lbs.add(xz.getCode());
}else{
lbs.add(xz.getCode());
}
}
dwTjParam.setLbs(lbs);
List<WcnrEntity> dalist = wcnrfzShrTjMapper.ExportRyTjTs(dwTjParam);
rtMap.put("rows",dalist);
return rtMap;
}
@Override @Override
public Map<String, Object> getWcnrAjlbTjByPid(DwTjParam dwTjParam) { public Map<String, Object> getWcnrAjlbTjByPid(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>(); Map<String, Object> rtMap = new HashMap<>();
...@@ -396,4 +557,89 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService { ...@@ -396,4 +557,89 @@ public class AjlbSysDictServiceImpl implements AjlbSysDictService {
return rtMap; return rtMap;
} }
@Override
public Map<String, Object> getWcnrAjlbShrTjByPid(DwTjParam dwTjParam) {
Map<String, Object> rtMap = new HashMap<>();
Map<String, Object> paramMap=new HashMap<>();
List<DwXnpgTj> dataList = new ArrayList<>();
List<DictitemXz> res = new ArrayList<>();
String unitcode=dwTjParam.getUnitcode();
String kssj=dwTjParam.getKssj();
String jssj=dwTjParam.getJssj();
String ajzt=dwTjParam.getAjzt();
String ajlbdm=dwTjParam.getAjlbdm();
String xlajlbdm=dwTjParam.getXlajlbdm();
String pid="true";
if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode = xzxtUser.getUnitcode();//获取对应用户的单位
}
System.out.println(unitcode);
dwTjParam.setUnitcode(unitcode);
if(StringUtils.isEmpty(ajlbdm)){
pid="true";
}else {
pid=ajlbdm;
}
List<DictitemXz> unitList = ajlbSysDictMapper.getAjlbByCode(pid);
Map<String, Object> results=wcnrfzShrTjService.getAjlbTj(dwTjParam);
Map<String, Object> rys=wcnrfzShrTjService.getAjlbrysTj(dwTjParam);
Map<String, String> resultMap=new HashMap<>();
Map<String, String> ryMap=new HashMap<>();
List<AjtjResult> dalist=(List<AjtjResult>)results.get("rows");
List<AjtjResult> rydatalist=(List<AjtjResult>)rys.get("rows");
if (dalist != null && dalist.size() > 0) {
// for (AjtjResult item : dalist) {
// map.put(String.valueOf(item.getMonthName()), item.getFaNum());
// }
resultMap=dalist.stream().collect(Collectors.toMap(AjtjResult::getCode, AjtjResult::getNum));
}
if (rydatalist != null && rydatalist.size() > 0) {
ryMap=rydatalist.stream().collect(Collectors.toMap(AjtjResult::getCode, AjtjResult::getNum));
}
for(DictitemXz xz:unitList){
if("yxj".equals(xz.getLev())){
int xjzs=0;
int ryxjzs=0;
List<DictitemXz> xjajlbs = ajlbSysDictMapper.getAjlbByCode(xz.getCode());
for(DictitemXz xjs:xjajlbs){
if("yxj".equals(xjs.getLev())){
List<DictitemXz> xxjajlbs = ajlbSysDictMapper.getAjlbByCode(xjs.getCode());
for(DictitemXz xxjs:xxjajlbs){
xjzs+=Integer.parseInt(resultMap.get(xxjs.getCode())!= null ?resultMap.get(xxjs.getCode()): "0");
ryxjzs+=Integer.parseInt(ryMap.get(xxjs.getCode())!= null ?ryMap.get(xxjs.getCode()): "0");
}
xjzs+=Integer.parseInt(resultMap.get(xjs.getCode())!= null ?resultMap.get(xjs.getCode()): "0");
ryxjzs+=Integer.parseInt(ryMap.get(xjs.getCode())!= null ?ryMap.get(xjs.getCode()): "0");
}else {
xjzs+=Integer.parseInt(resultMap.get(xjs.getCode())!= null ?resultMap.get(xjs.getCode()): "0");
ryxjzs+=Integer.parseInt(ryMap.get(xjs.getCode())!= null ?ryMap.get(xjs.getCode()): "0");
}
}
xjzs+=Integer.parseInt(resultMap.get(xz.getCode())!= null ?resultMap.get(xz.getCode()): "0");
ryxjzs+=Integer.parseInt(ryMap.get(xz.getCode())!= null ?ryMap.get(xz.getCode()): "0");
xz.setNum(String.valueOf(xjzs));
xz.setRys(String.valueOf(ryxjzs));
}else{
xz.setNum(resultMap.get(xz.getCode())!= null ?resultMap.get(xz.getCode()): "0");
xz.setRys(ryMap.get(xz.getCode())!= null ?ryMap.get(xz.getCode()): "0");
}
}
res = unitList.stream().sorted(Comparator.comparing(DictitemXz::getNumberrys).reversed())
.collect(Collectors.toList());
rtMap.put("rows",res);
return rtMap;
}
} }
...@@ -5,6 +5,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -5,6 +5,7 @@ import org.apache.commons.lang.StringUtils;
import org.springblade.core.secure.utils.SecureUtil; import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.tjfx.entity.*; import org.springblade.founder.tjfx.entity.*;
import org.springblade.founder.tjfx.mapper.DwTjfxMapper; import org.springblade.founder.tjfx.mapper.DwTjfxMapper;
import org.springblade.founder.tjfx.mapper.WcnrfzShrTjMapper;
import org.springblade.founder.tjfx.mapper.WcnrfzTjMapper; import org.springblade.founder.tjfx.mapper.WcnrfzTjMapper;
import org.springblade.founder.tjfx.service.WcnrfzShrTjService; import org.springblade.founder.tjfx.service.WcnrfzShrTjService;
import org.springblade.founder.tjfx.service.WcnrfzTjService; import org.springblade.founder.tjfx.service.WcnrfzTjService;
...@@ -25,7 +26,8 @@ public class WcnrfzShrTjServiceImpl implements WcnrfzShrTjService { ...@@ -25,7 +26,8 @@ public class WcnrfzShrTjServiceImpl implements WcnrfzShrTjService {
@Autowired @Autowired
private DwTjfxMapper dwTjfxMapper; private DwTjfxMapper dwTjfxMapper;
@Autowired @Autowired
private WcnrfzTjMapper wcnrfzTjMapper; private WcnrfzShrTjMapper wcnrfzTjMapper;
@Override @Override
public Map<String, Object> getWcnrTj(DwTjParam dwTjParam) { public Map<String, Object> getWcnrTj(DwTjParam dwTjParam) {
......
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