hanyuqing 7 months ago
parent
commit
c4e1974be8
  1. 3
      gyxtp/src/view/graphPage.vue
  2. 53
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java
  3. 1
      ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml

3
gyxtp/src/view/graphPage.vue

@ -694,6 +694,7 @@ export default {
font: 'normal 70px Arial',
fontColor: 'rgb(255,255,255)',
});
});
var leve1Nodes = nodeList.filter(node => node.docLeve === '1').sort((a, b) => a.docId - b.docId);
var startX1 = -(leve1Nodes.length * 370) / 2; //
@ -939,7 +940,7 @@ export default {
links.push({
from: line.source,
to: line.target,
text: line.relate || '应用',
text: line.relate || '相关',
color: 'rgb(255,255,255)',
lineWidth:
line.num <= 5 ? 1 :

53
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java

@ -67,7 +67,7 @@ import javax.servlet.http.HttpServletResponse;
public class ZhyFileManageController extends BaseController {
static String name="联合作战气象海洋影响评估与决策支撑体系";
static String relation="应用";
static String relation="相关";
@Autowired
ZhyFileManageServiceImpl zhyFileManageService;
@Autowired
@ -429,7 +429,7 @@ public class ZhyFileManageController extends BaseController {
"实时动态数据",
"社会经济数据"
};
String[] strs4 = {
String[] strs111 = {
"演化博弈推演决策模型",
"多属性群决策模型",
"高维稀疏数据聚类与复杂目标识别模型",
@ -477,7 +477,7 @@ public class ZhyFileManageController extends BaseController {
"人口密度数据"
};
String[] strs5 = { "补给舰航行安全风险指数",
String[] strs222 = { "补给舰航行安全风险指数",
"导弹艇航行安全风险指数",
"驱逐舰航行安全风险指数",
"攻击型潜艇航行安全风险指数",
@ -506,7 +506,7 @@ public class ZhyFileManageController extends BaseController {
"岛礁空降作战环境风险指数",
"蛙人特种作战环境风险指数",
"岛礁防卫作战环境风险指数"};
String[] strs6 = { "温度", "湿度", "气压", "风", "云", "能见度", "降雨", "降雪", "路面结冰", "积雪",
String[] strs4 = { "温度", "湿度", "气压", "风", "云", "能见度", "降雨", "降雪", "路面结冰", "积雪",
"沙尘暴", "雷暴", "热带气旋", "海浪", "风浪", "涌浪", "拍岸浪", "海流", "海水温度",
"海水盐度", "海水密度", "内波", "中尺度涡", "海洋锋", "潮汐", "水色", "透明度",
"大气波导", "大气折射", "跃层", "寒潮"};
@ -593,21 +593,21 @@ public class ZhyFileManageController extends BaseController {
zhyDoc.setDocUrl( url +"\\wordSplitter" + "\\" + zhyDoc.getDocLevel()+zhyDoc.getDocTitle() + ".txt");
nodeList.add(zhyDoc);
}
for(int i=0;i<strs5.length;i++){
for(int i=0;i<strs111.length;i++){
ZhyDoc zhyDoc=new ZhyDoc();
zhyDoc.setDocTitle(strs5[i]);
zhyDoc.setDocLevel(5l);
zhyDoc.setGroupId(0l);
zhyDoc.setDocTitle(strs111[i]);
zhyDoc.setDocLevel(1l);
zhyDoc.setGroupId(2l);
zhyDoc.setFileId(zhyFileManage.getId());
zhyDoc.setDocUrl( url +"\\wordSplitter" + "\\" + zhyDoc.getDocLevel()+zhyDoc.getDocTitle() + ".txt");
nodeList.add(zhyDoc);
}
for(int i=0;i<strs6.length;i++){
for(int i=0;i<strs222.length;i++){
ZhyDoc zhyDoc=new ZhyDoc();
zhyDoc.setDocTitle(strs6[i]);
zhyDoc.setDocLevel(6l);
zhyDoc.setGroupId(0l);
zhyDoc.setDocTitle(strs222[i]);
zhyDoc.setDocLevel(2l);
zhyDoc.setGroupId(2l);
zhyDoc.setFileId(zhyFileManage.getId());
zhyDoc.setDocUrl( url +"\\wordSplitter" + "\\" + zhyDoc.getDocLevel()+zhyDoc.getDocTitle() + ".txt");
nodeList.add(zhyDoc);
@ -1229,12 +1229,14 @@ public class ZhyFileManageController extends BaseController {
rrold2.setSource(list5.get(a5).getDocParentId());
rrold2.setTarget((list5.get(a5).getId()));
List<ZhyDocRelation> rr4 = zhyDocRelationMapper.selectZhyRelationshipList(rrold2);
list5.get(a5).setRealtionName(rr4.get(0).getRelationship());
if(rr4.size()>0){
list5.get(a5).setRealtionName(rr4.get(0).getRelationship());
}
ZhyDoc pp3 = test1Mapper.selectDocByIdId(list5.get(a5).getDocParentId());
list5.get(a5).setParentName(pp3.getDocTitle());
if(pp3!=null){
list5.get(a5).setParentName(pp3.getDocTitle());
}
}
return AjaxResult.success().put("data", list5);
@ -1534,6 +1536,13 @@ public class ZhyFileManageController extends BaseController {
String imgs = requestBody.get("imgs");
String prodectName = requestBody.get("prodectName");
Long parentInd = Long.valueOf(requestBody.get("parentInd"));
ZhyDoc docParent=test1Mapper.selectDocByIdId(parentInd);
Long groupId=0l;
if(docParent!=null){
groupId=docParent.getGroupId();
}
System.out.println("ddddddddddddd");
System.out.println(groupId);
Long docLevelNew = Long.valueOf(requestBody.get("docLevel"));
String relation1 = requestBody.get("realtion");
if(relation1 == null ||relation1.equals("")){
@ -1564,6 +1573,7 @@ public class ZhyFileManageController extends BaseController {
zhyDoc.setDocVideo(videoUrl);
zhyDoc.setDocImgs(imgs);
zhyDoc.setDocParentId(parentInd);
zhyDoc.setGroupId(groupId);
zhyDoc.setDocLevel(docLevelNew);
zhyDoc.setProdectName(prodectName);
test1Mapper.updateDocById(zhyDoc);
@ -1987,6 +1997,11 @@ public class ZhyFileManageController extends BaseController {
relation1=relation;
}
Long docParentId = Long.valueOf(requestBody.get("docParentId"));
ZhyDoc docParent=test1Mapper.selectDocByIdId(docParentId);
Long groupId=0l;
if(docParent!=null){
groupId=docParent.getGroupId();
}
Long docLevel = Long.valueOf(requestBody.get("docLevel"));
ZhyFileManage zhyFileManage = test1Mapper.getFileById(fileId);
String url = zhyFileManage.getFileUrl();
@ -2006,13 +2021,9 @@ public class ZhyFileManageController extends BaseController {
zhyDoc.setDocLevel(docLevel);
zhyDoc.setCreateTime(new Date());
zhyDoc.setCreateBy(String.valueOf(getUserId()));
zhyDoc.setGroupId(docLevel);
zhyDoc.setGroupId(groupId);
test1Mapper.insertDoc(zhyDoc);
luceneUtil.createSingleIndex2(zhyDoc.getDocUrl(), zhyDoc.getId(), zhyDoc.getDocTitle());
//创建完索引
//创建图谱
String cql = "create (doc: Doc{";

1
ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml

@ -120,6 +120,7 @@ select * from zhy_doc where isgraph = 0 and file_id = #{fileId}
<if test="docParentId != null">doc_parent_id = #{docParentId},</if>
<if test="docLevel != null">doc_level = #{docLevel},</if>
<if test="prodectName != null and prodectName != ''">prodect_name = #{prodectName},</if>
<if test="groupId != null">group_id = #{groupId},</if>
update_time = sysdate()
</set>
where id = #{id}

Loading…
Cancel
Save