Commit c0c14e7a by 宋珺琪

串并算例接口(湖南)

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