Commit c0c14e7a by 宋珺琪

串并算例接口(湖南)

parent 29bd700b
...@@ -667,19 +667,20 @@ public class KshSlServiceController { ...@@ -667,19 +667,20 @@ public class KshSlServiceController {
@OperLog(message = "多维串并串并算例", operation = OperationType.QUERY) @OperLog(message = "多维串并串并算例", operation = OperationType.QUERY)
@PostMapping("/cbsl") @PostMapping("/cbsl")
@ApiOperation(value = "多维串并串并算例") @ApiOperation(value = "多维串并串并算例")
public MapRestResult cbsl(String objectValue, String objectType) { public MapRestResult cbsl(String objectValue,String objectType){
Hnkshresult result = new Hnkshresult(); Hnkshresult result = new Hnkshresult();
kshdata kshdata = new kshdata(); kshdata kshdata = new kshdata();
dataSumup dataSumup = new dataSumup(); dataSumup dataSumup = new dataSumup();
List<String> sumup = new ArrayList<>(); List<String> sumup = new ArrayList<>();
List<HnTbStRygxDTO> nodes = new ArrayList<>(); List<HnTbStRygxDTO> nodes = new ArrayList<>();
List<kshlinks> links = new ArrayList<>(); List<kshlinks> links =new ArrayList<>();
if (objectType.equals("aj") && !StringUtil.isEmpty(objectValue)) { if (objectType.equals("aj") && !StringUtil.isEmpty(objectValue)){
QueryWrapper<TbYwXszDwcbgx> wrapper = new QueryWrapper<>(); QueryWrapper<TbYwXszDwcbgx> wrapper = new QueryWrapper<>();
wrapper.select("DISTINCT WZXX").eq("ASJBH", objectValue); wrapper.select("DISTINCT WZXX").eq("ASJBH",objectValue);
List<TbYwXszDwcbgx> tbYwXszDwcbgxes = tbYwXszDwcbgxMapper.selectList(wrapper); List<TbYwXszDwcbgx> tbYwXszDwcbgxes = tbYwXszDwcbgxMapper.selectList(wrapper);
for (TbYwXszDwcbgx tbYwXszDwcbgx : tbYwXszDwcbgxes) { for (TbYwXszDwcbgx tbYwXszDwcbgx : tbYwXszDwcbgxes) {
String wzxx = tbYwXszDwcbgx.getWZXX(); String st1 = tbYwXszDwcbgx.getWZXX();
String wzxx = st1.substring(st1.indexOf("(")+1,st1.indexOf(")"));
// nodes // nodes
HnTbStRygxDTO mergeDTOgjd = new HnTbStRygxDTO(); HnTbStRygxDTO mergeDTOgjd = new HnTbStRygxDTO();
mergeDTOgjd.setId(wzxx); mergeDTOgjd.setId(wzxx);
...@@ -687,13 +688,13 @@ public class KshSlServiceController { ...@@ -687,13 +688,13 @@ public class KshSlServiceController {
Kshpropertice kshpropertice = new Kshpropertice(); Kshpropertice kshpropertice = new Kshpropertice();
kshpropertice.setId(wzxx); kshpropertice.setId(wzxx);
kshpropertice.setLabel(wzxx); kshpropertice.setLabel(wzxx);
if (wzxx.contains("指纹")) { if (st1.contains("指纹")){
kshpropertice.setImgType("ZWWZ"); kshpropertice.setImgType("fingerprint");
} else if (wzxx.contains("DNA")) { }else if (st1.contains("DNA")){
kshpropertice.setImgType("DNAWZ"); kshpropertice.setImgType("dna");
} else if (wzxx.contains("足迹")) { }else if (st1.contains("足迹")){
kshpropertice.setImgType("ZJWZ"); kshpropertice.setImgType("other");
} else { }else {
kshpropertice.setImgType("other"); kshpropertice.setImgType("other");
} }
kshpropertice.setBoderColor(null); kshpropertice.setBoderColor(null);
...@@ -703,23 +704,26 @@ public class KshSlServiceController { ...@@ -703,23 +704,26 @@ public class KshSlServiceController {
//links //links
kshlinks kshlink = new kshlinks(); kshlinks kshlink = new kshlinks();
kshlink.setSource(objectValue); kshlink.setSource(objectValue);
kshlink.setTarget(wzxx); kshlink.setTarget(st1);
Linkspropertice linkspropertice = new Linkspropertice(); Linkspropertice linkspropertice = new Linkspropertice();
if (wzxx.contains("指纹")) { if (st1.contains("指纹")){
kshlink.setLabel("指纹物证"); kshlink.setLabel("指纹物证");
linkspropertice.setLabel("指纹物证"); linkspropertice.setLabel("指纹物证");
} else if (wzxx.contains("DNA")) { }else if (st1.contains("DNA")){
kshlink.setLabel("DNA物证"); kshlink.setLabel("DNA物证");
linkspropertice.setLabel("DNA物证"); linkspropertice.setLabel("DNA物证");
} else if (wzxx.contains("足迹")) { }else if (st1.contains("足迹")){
kshlink.setLabel("足迹物证"); kshlink.setLabel("足迹物证");
linkspropertice.setLabel("足迹物证"); linkspropertice.setLabel("足迹物证");
} else { }else {
kshpropertice.setImgType("其他物证"); kshpropertice.setImgType("其他物证");
linkspropertice.setLabel("其他物证"); linkspropertice.setLabel("其他物证");
} }
// kshlink.setLabel("ASJBH->WZXX");
linkspropertice.setTime("2022-09-16 09:59:11");
linkspropertice.setSource(objectValue); linkspropertice.setSource(objectValue);
linkspropertice.setTarget(wzxx); linkspropertice.setTarget(st1);
// linkspropertice.setLabel("ASJBH->WZXX");
kshlink.setProperties(linkspropertice); kshlink.setProperties(linkspropertice);
links.add(kshlink); links.add(kshlink);
} }
...@@ -729,13 +733,15 @@ public class KshSlServiceController { ...@@ -729,13 +733,15 @@ public class KshSlServiceController {
dataSumup.setName("串并算例"); dataSumup.setName("串并算例");
result.setKshData(kshdata); result.setKshData(kshdata);
result.setDataSumup(dataSumup); result.setDataSumup(dataSumup);
return new MapRestResult(200, "ok", result); return new MapRestResult(200,"ok",result);
} else if (objectType.equals("idcard") && !StringUtil.isEmpty(objectValue)) { }
else if (objectType.equals("idcard") && !StringUtil.isEmpty(objectValue)){
QueryWrapper<TbYwXszDwcbgx> wrapper1 = new QueryWrapper<>(); QueryWrapper<TbYwXszDwcbgx> wrapper1 = new QueryWrapper<>();
wrapper1.select("DISTINCT WZXX").like("RYXX", objectValue); wrapper1.select("DISTINCT WZXX").like("RYXX",objectValue);
List<TbYwXszDwcbgx> tbYwXszDwcbgxes = tbYwXszDwcbgxMapper.selectList(wrapper1); List<TbYwXszDwcbgx> tbYwXszDwcbgxes = tbYwXszDwcbgxMapper.selectList(wrapper1);
for (TbYwXszDwcbgx tbYwXszDwcbgx : tbYwXszDwcbgxes) { for (TbYwXszDwcbgx tbYwXszDwcbgx : tbYwXszDwcbgxes) {
String wzxx = tbYwXszDwcbgx.getWZXX(); String st1 = tbYwXszDwcbgx.getWZXX();
String wzxx = st1.substring(st1.indexOf("(")+1,st1.indexOf(")"));
// nodes // nodes
HnTbStRygxDTO mergeDTOgjd = new HnTbStRygxDTO(); HnTbStRygxDTO mergeDTOgjd = new HnTbStRygxDTO();
mergeDTOgjd.setId(wzxx); mergeDTOgjd.setId(wzxx);
...@@ -743,14 +749,14 @@ public class KshSlServiceController { ...@@ -743,14 +749,14 @@ public class KshSlServiceController {
Kshpropertice kshpropertice = new Kshpropertice(); Kshpropertice kshpropertice = new Kshpropertice();
kshpropertice.setId(wzxx); kshpropertice.setId(wzxx);
kshpropertice.setLabel(wzxx); kshpropertice.setLabel(wzxx);
if (wzxx.contains("指纹")) { if (st1.contains("指纹")){
kshpropertice.setImgType("ZWWZ"); kshpropertice.setImgType("fingerprint");
} else if (wzxx.contains("DNA")) { }else if (st1.contains("DNA")){
kshpropertice.setImgType("DNAWZ"); kshpropertice.setImgType("dna");
} else if (wzxx.contains("足迹")) { }else if (st1.contains("足迹")){
kshpropertice.setImgType("ZJWZ"); kshpropertice.setImgType("other");
} else { }else {
kshpropertice.setImgType("other"); kshpropertice.setImgType("other");
} }
kshpropertice.setBoderColor(null); kshpropertice.setBoderColor(null);
...@@ -762,21 +768,24 @@ public class KshSlServiceController { ...@@ -762,21 +768,24 @@ public class KshSlServiceController {
kshlink.setSource(objectValue); kshlink.setSource(objectValue);
kshlink.setTarget(wzxx); kshlink.setTarget(wzxx);
Linkspropertice linkspropertice = new Linkspropertice(); Linkspropertice linkspropertice = new Linkspropertice();
if (wzxx.contains("指纹")) { if (st1.contains("指纹")){
kshlink.setLabel("指纹物证"); kshlink.setLabel("指纹物证");
linkspropertice.setLabel("指纹物证"); linkspropertice.setLabel("指纹物证");
} else if (wzxx.contains("DNA")) { }else if (st1.contains("DNA")){
kshlink.setLabel("DNA物证"); kshlink.setLabel("DNA物证");
linkspropertice.setLabel("DNA物证"); linkspropertice.setLabel("DNA物证");
} else if (wzxx.contains("足迹")) { }else if (st1.contains("足迹")){
kshlink.setLabel("足迹物证"); kshlink.setLabel("足迹物证");
linkspropertice.setLabel("足迹物证"); linkspropertice.setLabel("足迹物证");
} else { }else {
kshlink.setLabel("其他物证"); kshlink.setLabel("其他物证");
linkspropertice.setLabel("其他物证"); linkspropertice.setLabel("其他物证");
} }
// kshlink.setLabel("RYXX->WZXX");
linkspropertice.setTime("2022-09-16 09:59:11");
linkspropertice.setSource(objectValue); linkspropertice.setSource(objectValue);
linkspropertice.setTarget(wzxx); linkspropertice.setTarget(wzxx);
// linkspropertice.setLabel("RYXX->WZXX");
kshlink.setProperties(linkspropertice); kshlink.setProperties(linkspropertice);
links.add(kshlink); links.add(kshlink);
} }
...@@ -786,10 +795,11 @@ public class KshSlServiceController { ...@@ -786,10 +795,11 @@ public class KshSlServiceController {
dataSumup.setName("串并算例"); dataSumup.setName("串并算例");
result.setKshData(kshdata); result.setKshData(kshdata);
result.setDataSumup(dataSumup); result.setDataSumup(dataSumup);
return new MapRestResult(200, "ok", result); return new MapRestResult(200,"ok",result);
} else if ((objectType.equals("DNAWZ") || objectType.equals("ZWWZ") || objectType.equals("ZJWZ")) && !StringUtil.isEmpty(objectValue)) { }
else if ((objectType.equals("fingerprint")||objectType.equals("dna")) && !StringUtil.isEmpty(objectValue)){
QueryWrapper<TbYwXszDwcbgx> wrapper1 = new QueryWrapper<>(); QueryWrapper<TbYwXszDwcbgx> wrapper1 = new QueryWrapper<>();
wrapper1.eq("WZXX", objectValue); wrapper1.like("WZXX",objectValue);
List<TbYwXszDwcbgx> tbYwXszDwcbgxes = tbYwXszDwcbgxMapper.selectList(wrapper1); List<TbYwXszDwcbgx> tbYwXszDwcbgxes = tbYwXszDwcbgxMapper.selectList(wrapper1);
Set ryxxAndasjbh = new HashSet(); Set ryxxAndasjbh = new HashSet();
for (TbYwXszDwcbgx tbYwXszDwcbgx : tbYwXszDwcbgxes) { for (TbYwXszDwcbgx tbYwXszDwcbgx : tbYwXszDwcbgxes) {
...@@ -797,17 +807,23 @@ public class KshSlServiceController { ...@@ -797,17 +807,23 @@ public class KshSlServiceController {
ryxxAndasjbh.add(tbYwXszDwcbgx.getASJBH()); ryxxAndasjbh.add(tbYwXszDwcbgx.getASJBH());
} }
for (Object o : ryxxAndasjbh) { for (Object o : ryxxAndasjbh) {
String s = o.toString(); String st1 = o.toString();
// nodes String s =null;
if (st1.contains("(")&&st1.contains(")")){
s = st1.substring(st1.indexOf("(")+1,st1.indexOf(")"));
}else {
s =st1;
}
// nodes
HnTbStRygxDTO mergeDTOgjd = new HnTbStRygxDTO(); HnTbStRygxDTO mergeDTOgjd = new HnTbStRygxDTO();
mergeDTOgjd.setId(s); mergeDTOgjd.setId(s);
mergeDTOgjd.setLabel(s); mergeDTOgjd.setLabel(s);
Kshpropertice kshpropertice = new Kshpropertice(); Kshpropertice kshpropertice = new Kshpropertice();
kshpropertice.setId(s); kshpropertice.setId(s);
kshpropertice.setLabel(s); kshpropertice.setLabel(s);
if (s.contains("A")) { if (s.contains("A")){
kshpropertice.setImgType("aj"); kshpropertice.setImgType("aj");
} else { }else {
kshpropertice.setImgType("idcard"); kshpropertice.setImgType("idcard");
} }
kshpropertice.setBoderColor(null); kshpropertice.setBoderColor(null);
...@@ -819,15 +835,18 @@ public class KshSlServiceController { ...@@ -819,15 +835,18 @@ public class KshSlServiceController {
kshlink.setSource(objectValue); kshlink.setSource(objectValue);
kshlink.setTarget(s); kshlink.setTarget(s);
Linkspropertice linkspropertice = new Linkspropertice(); Linkspropertice linkspropertice = new Linkspropertice();
if (s.contains("A")) { if (s.contains("A")){
kshlink.setLabel("案件编号"); kshlink.setLabel("案件编号");
linkspropertice.setLabel("案件编号"); linkspropertice.setLabel("案件编号");
} else { }else {
kshlink.setLabel("人员信息"); kshlink.setLabel("人员信息");
linkspropertice.setLabel("人员信息"); linkspropertice.setLabel("人员信息");
} }
// kshlink.setLabel("WZXX指向RYXX和ASJBH");
linkspropertice.setTime("2022-09-16 09:59:11");
linkspropertice.setSource(objectValue); linkspropertice.setSource(objectValue);
linkspropertice.setTarget(s); linkspropertice.setTarget(s);
// linkspropertice.setLabel("RYXX->WZXX");
kshlink.setProperties(linkspropertice); kshlink.setProperties(linkspropertice);
links.add(kshlink); links.add(kshlink);
} }
...@@ -837,9 +856,16 @@ public class KshSlServiceController { ...@@ -837,9 +856,16 @@ public class KshSlServiceController {
dataSumup.setName("串并算例"); dataSumup.setName("串并算例");
result.setKshData(kshdata); result.setKshData(kshdata);
result.setDataSumup(dataSumup); result.setDataSumup(dataSumup);
return new MapRestResult(200, "ok", result); return new MapRestResult(200,"ok",result);
} else { }
return new MapRestResult().error(); else {
kshdata.setNodes(nodes);
kshdata.setLinks(links);
dataSumup.setList(sumup);
dataSumup.setName("串并算例");
result.setKshData(kshdata);
result.setDataSumup(dataSumup);
return new MapRestResult(200,"ok",result);
} }
} }
......
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