diff --git a/gyxtp/src/view/graphPage.vue b/gyxtp/src/view/graphPage.vue index 8a3c20b..aaf6548 100644 --- a/gyxtp/src/view/graphPage.vue +++ b/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 : diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java index 0549d4b..ae6b2f7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java +++ b/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 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{"; diff --git a/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml b/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml index 85041d2..6cc76aa 100644 --- a/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml @@ -120,6 +120,7 @@ select * from zhy_doc where isgraph = 0 and file_id = #{fileId} doc_parent_id = #{docParentId}, doc_level = #{docLevel}, prodect_name = #{prodectName}, + group_id = #{groupId}, update_time = sysdate() where id = #{id}