知识图谱功能完成

master
wish 1 year ago
parent fbf97c8711
commit 82f4d9f92a
  1. 2
      ant-design-vue-jeecg/src/config/router.config.js
  2. 145
      ant-design-vue-jeecg/src/views/projectx/ProjectxList.vue
  3. 80
      ant-design-vue-jeecg/src/views/xmtp/SeKnowAtlasList.vue
  4. 244
      ant-design-vue-jeecg/src/views/xmtp/XmtpList.vue
  5. 165
      ant-design-vue-jeecg/src/views/xmtp/atlas/components/erwei.vue
  6. 72
      ant-design-vue-jeecg/src/views/xmtp/atlas/components/grade.vue
  7. 72
      ant-design-vue-jeecg/src/views/xmtp/atlas/components/kaoqin.vue
  8. 64
      ant-design-vue-jeecg/src/views/xmtp/atlas/components/son.vue
  9. 65
      ant-design-vue-jeecg/src/views/xmtp/atlas/components/son1.vue
  10. 64
      ant-design-vue-jeecg/src/views/xmtp/atlas/components/son2.vue
  11. 105
      ant-design-vue-jeecg/src/views/xmtp/atlas/js/bg.js
  12. 394
      ant-design-vue-jeecg/src/views/xmtp/atlas/js/main.js
  13. 275
      ant-design-vue-jeecg/src/views/xmtp/atlas/js/main1.js
  14. 5
      ant-design-vue-jeecg/src/views/xmtp/atlas/js/vendor.js
  15. 5
      ant-design-vue-jeecg/src/views/xmtp/atlas/js/vendor1.js
  16. 2
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  17. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/IFunctionxService.java
  18. 272
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/functionx/service/impl/FunctionxServiceImpl.java
  19. 319
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/gxlx/controller/GxlxController.java
  20. 446
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mkgx/controller/MkgxController.java
  21. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mkgx/service/IMkgxService.java
  22. 21
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mkgx/service/impl/MkgxServiceImpl.java
  23. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/IRulexService.java
  24. 54
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/rulex/service/impl/RulexServiceImpl.java
  25. 324
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/tppronext/controller/TppronextController.java
  26. 113
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/controller/CreateTP.java
  27. 345
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/controller/XmtpController.java
  28. 117
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/entity/Gxlx.java
  29. 125
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/entity/SkillType.java
  30. 117
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/entity/TaskSkill.java
  31. 165
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/entity/Tppronext.java
  32. 112
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/entity/Xmtp.java
  33. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/mapper/YGxlxMapper.java
  34. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/mapper/YSkillTypeMapper.java
  35. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/mapper/YTaskSkillMapper.java
  36. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/mapper/YTppronextMapper.java
  37. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/IXmtpService.java
  38. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/TaskSkillService.java
  39. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/YGxlxService.java
  40. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/YSkillTypeService.java
  41. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/YTppronextService.java
  42. 360
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/impl/XmtpServiceImpl.java
  43. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/impl/YGxlxServiceImpl.java
  44. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/impl/YSkillTypeServiceImpl.java
  45. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/impl/YTaskSkillServiceImpl.java
  46. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/xmtp/service/impl/YTppronextServiceImpl.java
  47. 30
      jeecg-boot/jeecg-boot-module-system/src/main/resources/mapper/SkillPointsMapper.xml
  48. 23
      jeecg-boot/jeecg-boot-module-system/src/main/resources/mapper/YGxlxMapper.xml
  49. 24
      jeecg-boot/jeecg-boot-module-system/src/main/resources/mapper/YSkillTypeMapper.xml
  50. 23
      jeecg-boot/jeecg-boot-module-system/src/main/resources/mapper/YTaskSkillMapper.xml
  51. 31
      jeecg-boot/jeecg-boot-module-system/src/main/resources/mapper/YTppronextMapper.xml

@ -550,7 +550,7 @@ export const constantRouterMap = [
{
path: '/atlas',
// component: () => import(/* webpackChunkName: "fail" */ '@/views/seknowgroup/SeKnowAtlasList'),
component: () => import(/* webpackChunkName: "fail" */ '@/views/xmtp/SeKnowAtlasList'),
},
//cms首页,免登录,单独访问页面

@ -7,7 +7,8 @@
<a-col :md="6" :sm="12">
<a-form-item label="项目名称">
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
<j-input placeholder="" v-model="queryParam.projectName"></j-input>
<j-input placeholder=""
v-model="queryParam.projectName"></j-input>
</a-form-item>
</a-col>
@ -23,9 +24,12 @@
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<span style="float: left;overflow: hidden;"
class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery"
icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload"
style="margin-left: 8px">重置</a-button>
</span>
</a-col>
@ -37,25 +41,25 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('项目管理 管理项目基本信息')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>-->
<!-- 删除-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作-->
<!-- <a-icon type="down"/>-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('项目管理 管理项目基本信息')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>-->
<!-- 删除-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> 批量操作-->
<!-- <a-icon type="down"/>-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
@ -97,13 +101,15 @@
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-popconfirm title="确定删除吗?"
@confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a-popconfirm title="首次生产图谱需要较长时间" @confirm="() => maketupu(record.id)">
<a-popconfirm title="首次生产图谱需要较长时间"
@confirm="() => maketupu(record)">
<a>生成图谱</a>
</a-popconfirm>
@ -123,6 +129,7 @@ import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ProjectxModal from './modules/ProjectxModal'
import JEllipsis from '@/components/jeecg/JEllipsis'
import {postAction} from "@api/manage";
export default {
name: 'ProjectxList', //
@ -244,6 +251,7 @@ export default {
],
url: {
list: "/projectx/projectx/list",
add: "/xmtp/xmtp/add",
delete: "/projectx/projectx/delete",
deleteBatch: "/projectx/projectx/deleteBatch",
exportXlsUrl: "/projectx/projectx/exportXls",
@ -263,6 +271,16 @@ export default {
},
},
methods: {
//
maketupu(record) {
postAction(this.url.add, record).then((res) => {
console.log(res)
if (res.success)
this.$message.success(res.result)
else
this.$message.error(res.message)
});
},
rolemanage() {
this.$router.push({
path: '/src/views/projectUserRole/ProjectUserRoleList',
@ -279,19 +297,74 @@ export default {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'projectName', text: '项目中文名称', dictCode: ''})
fieldList.push({type: 'string', value: 'projectEnName', text: '项目英文名称', dictCode: ''})
fieldList.push({type: 'string', value: 'projectCode', text: '项目编码', dictCode: ''})
fieldList.push({type: 'string', value: 'pmDescribe', text: '项目描述', dictCode: ''})
fieldList.push({type: 'string', value: 'projectPic', text: '项目图片', dictCode: ''})
fieldList.push({type: 'string', value: 'projectUrl', text: '项目网址', dictCode: ''})
fieldList.push({type: 'string', value: 'projectCodeUrl', text: '源码地址', dictCode: ''})
fieldList.push({type: 'string', value: 'projectDbName', text: '数据库名', dictCode: ''})
fieldList.push({type: 'string', value: 'projectDbUrl', text: '数据地址', dictCode: ''})
fieldList.push({
type: 'string',
value: 'projectName',
text: '项目中文名称',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectEnName',
text: '项目英文名称',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectCode',
text: '项目编码',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'pmDescribe',
text: '项目描述',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectPic',
text: '项目图片',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectUrl',
text: '项目网址',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectCodeUrl',
text: '源码地址',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectDbName',
text: '数据库名',
dictCode: ''
})
fieldList.push({
type: 'string',
value: 'projectDbUrl',
text: '数据地址',
dictCode: ''
})
fieldList.push({type: 'date', value: 'startTime', text: '开始时间'})
fieldList.push({type: 'date', value: 'completeTime', text: '完成时间'})
fieldList.push({type: 'string', value: 'sourceProjectId', text: '复制来源', dictCode: ''})
fieldList.push({type: 'int', value: 'projectStatus', text: '项目状态', dictCode: ''})
fieldList.push({
type: 'string',
value: 'sourceProjectId',
text: '复制来源',
dictCode: ''
})
fieldList.push({
type: 'int',
value: 'projectStatus',
text: '项目状态',
dictCode: ''
})
this.superFieldList = fieldList
}
}

@ -0,0 +1,80 @@
<template>
</template>
<script>
import { threeMainFunction } from "./atlas/js/main1.js";
import { threeVendorFunction } from "./atlas/js/vendor1.js";
export default {
name: 'SeKnowGroupList',
mixins:[ ],
components: {
threeMainFunction,
threeVendorFunction
},
mounted() {
threeVendorFunction;
threeMainFunction;
},
data () {
return {
description: '知识图谱表管理页面',
dictOptions:{},
loadRouteType:false,
parameterId:"",
}
},
created() {
this.loadParameter();
this.initLoad();
// console.log(document.getElementById('app').style.height)
},
computed: {
},
methods: {
initDictConfig(){
},
initLoad(){
let that = this;
this.timer = setInterval(function () {
that.newDate = new Date().toLocaleString();
});
let canvas = document.body.querySelector("canvas");
canvas.style.position = "absolute";
canvas.style.top = "0";
},
//
loadParameter() {
if(this.loadRouteType==false)
{
// this.id = this.$route.query.name
// console.log(id);
this.loadRouteType=true;
}
},
}
}
</script>
<style scoped>
html,
body,
#app {
height: 0px;
margin: 0px;
padding: 0px;
}
</style>

@ -6,18 +6,24 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="图谱名称">
<a-input placeholder="请输入图谱名称" v-model="queryParam.tpname"></a-input>
<a-input placeholder="请输入图谱名称"
v-model="queryParam.tpname"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="中心知识点">
<j-search-select-tag placeholder="请选择中心知识点" v-model="queryParam.zxpoint" dict="projectx,project_name,id"/>
<j-search-select-tag placeholder="请选择中心知识点"
v-model="queryParam.zxpoint"
dict="projectx,project_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<span style="float: left;overflow: hidden;"
class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery"
icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload"
style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
@ -32,24 +38,35 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('项目图谱')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="download"
@click="handleExportXls('项目图谱')">导出
</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false"
:headers="tokenHeader" :action="importExcelUrl"
@change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
@ -71,11 +88,14 @@
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<span v-if="!text"
style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<span v-if="!text"
style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
@ -90,15 +110,19 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="zsAtlsa(record)">知识图谱</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-popconfirm title="确定删除吗?"
@confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
@ -115,85 +139,129 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import XmtpModal from './modules/XmtpModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import XmtpModal from './modules/XmtpModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'XmtpList',
mixins:[JeecgListMixin, mixinDevice],
components: {
XmtpModal
},
data () {
return {
description: '项目图谱管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'图谱名称',
align:"center",
dataIndex: 'tpname'
},
{
title:'中心知识点',
align:"center",
dataIndex: 'zxpoint_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'XmtpList',
mixins: [JeecgListMixin, mixinDevice],
components: {
XmtpModal
},
data() {
return {
description: '项目图谱管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
],
url: {
list: "/xmtp/xmtp/list",
delete: "/xmtp/xmtp/delete",
deleteBatch: "/xmtp/xmtp/deleteBatch",
exportXlsUrl: "/xmtp/xmtp/exportXls",
importExcelUrl: "xmtp/xmtp/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
{
title: '图谱名称',
align: "center",
dataIndex: 'tpname'
},
{
title: '中心知识点',
align: "center",
dataIndex: 'zxpoint_dictText'
}, {
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/xmtp/xmtp/list",
delete: "/xmtp/xmtp/delete",
deleteBatch: "/xmtp/xmtp/deleteBatch",
exportXlsUrl: "/xmtp/xmtp/exportXls",
importExcelUrl: "xmtp/xmtp/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
zsAtlsa(record) {
// getAction('/seknowgroup/seKnowGroup/zzzztp', {id: record.id}).then((res) => {
// if (res.success) {
// //
// e.exports.nodes=[{name:""},{name:""}]
// e.exports.links=[{source:"",target:"",value:.75}]
// console.log("=================================================")
// console.log(e.exports.nodes)
// console.log("=================================================")
// } else {
// this.$message.warning(res.message);
// }
// })
// let routeData = this.$router.resolve({
// path: '/atlas'
// , query: {id: record.zxpoint}
// });
// console.log(routeData)
// console.log(record)
// window.open(routeData.href, '_blank');
let routeData = this.$router.resolve({
path: '/atlas',
query: {id: record.zxpoint}
});
window.open(routeData.href, '_blank');
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'tpname',text:'图谱名称',dictCode:''})
fieldList.push({type:'sel_search',value:'zxpoint',text:'中心知识点',dictTable:'projectx', dictText:'project_name', dictCode:'id'})
fieldList.push({type:'Text',value:'info',text:'说明',dictCode:''})
this.superFieldList = fieldList
}
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({
type: 'string',
value: 'tpname',
text: '图谱名称',
dictCode: ''
})
fieldList.push({
type: 'sel_search',
value: 'zxpoint',
text: '中心知识点',
dictTable: 'projectx',
dictText: 'project_name',
dictCode: 'id'
})
fieldList.push({type: 'Text', value: 'info', text: '说明', dictCode: ''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,165 @@
<template>
<div id="erwei" style="width:100%;height:100%;">
</div>
</template>
<script>
export default ({
name:'erwei',
data(){
return{
data:[],
link:[]
}
},
mounted(){
// threeVendorFunction
// threeMainFunction
this.$HTTP.get(this.$API.topology(),{}).then(data => {
this.data = data.data
this.link = data.link
this.drawChart();
})
},
methods:{
drawChart() {
// echarts
let myChart = this.$echarts.init(document.getElementById("erwei"));
//
let option = {
tooltip : {//
show : true, //
showContent:true, //
trigger:'item',//
triggerOn:'click',//mousemoveclick
alwaysShowContent:false, //true
showDelay:0,// ms triggerOn 'mousemove'
hideDelay:200,// ms alwaysShowContent true
enterable:false,//false true
position:'right',// trigger 'item'
confine:false,// tooltip dom 'overflow: hidden' tooltip
transitionDuration:0.4,// s 0
},
legend : { //=========
show : true,
data : [ {
name : '路由',
symbol : 'rect',
label : { //
}
}, {
name : '终端',
symbol : 'circle'
} ]
},
series : [ {
type : 'graph', //
name : "", //tooltiplegend setOption
layout : 'force', //'circular' Les Miserables
legendHoverLink : true,// hover()
hoverAnimation : true,//
coordinateSystem : null,//
xAxisIndex : 0, //x
yAxisIndex : 0, //y
force : { //
//initLayout: ,//使xy
repulsion : 100,//
gravity : 0.01,//
edgeLength :80,// repulsion[10, 50]
layoutAnimation : true
//>100
},
roam : true,// 'scale' 'move' true
nodeScaleRatio : 0.6,//0
draggable : true,//使
focusNodeAdjacency : true,//
edgeSymbol : [ 'none', 'none' ],//edgeSymbol: ['circle', 'arrow']
edgeSymbolSize : 10,//
itemStyle : {//=============== normal emphasis normal emphasis
normal : { //
label : {
show : true
},
borderType : 'solid', //线 'solid'线, 'dashed'(线), 'dotted'线
borderColor : 'rgba(42,245,255,0.79)', //,0.4
borderWidth : 0, //线 0
opacity : 1
// 0 1 0 0.5
},
emphasis : {//
borderWidth : 2
}
},
lineStyle : { //==========线
normal : {
color : '#F56C6C',
width : '2',
type : 'solid', //线 'solid'线'dashed'线'dotted'线
curveness : 0, //线线01
opacity : 1
// 0 1 0 0.5
},
emphasis : {//
color:'red'
}
},
label : { //=============
normal : {
show : true,//
position : 'inside',//['50%', '50%'] [x,y]
textStyle : { //
color : '#cde6c7', //
fontStyle : 'normal',// 'normal' 'italic' 'oblique'
fontWeight : 'bolder',//'normal''bold''bolder''lighter'100 | 200 | 300 | 400...
fontFamily : 'sans-serif', //
fontSize : 10, //
}
},
emphasis : {//
}
},
edgeLabel : {//==============线
normal : {
show : false
},
emphasis : {//
}
},
data:this.data,
//nodes name:,value:,category:index,symbol:,symbolSize:10
//label:
categories : [ //symbol name legend tooltip label
{
name : '路由',
symbol : 'rect',
label : { //
}
}, {
name : '终端',
symbol : 'circle'
} ],
links:this.link
} ]
};
myChart.setOption(option);
}
}
})
</script>

@ -0,0 +1,72 @@
<template>
<div id="grade"></div>
</template>
<script>
export default({
name:'grade',
data(){
return{
option:{
legend: {
data: ['软工1901B', '软工1902B', '软工1903B'],
textStyle:{
color:'#f0f0f0'
}
},
xAxis: {
name:'日期',
type: 'category',
data: ['第一学年', '第一学年', '第一学年', '第一学年']
},
yAxis: {
name:'平均成绩',
type: 'value',
scale: true,
axisLine:{
show:true,
},
max:100,
min:60,
},
series: [
{
name:'软工1901B',
data: [78, 87, 79, 86],
type: 'line',
smooth: true,
lineStyle:{
// color:"#fff"
}
},
{
name:'软工1902B',
data: [81,88,87,79],
type: 'line',
lineStyle:{
// color:"#fff"
}
},
{
name:'软工1903B',
data: [80,81,80,77],
type: 'line',
lineStyle:{
// color:"#fff"
}
},
]
}
}
},
mounted(){
this.myChart6()
},
methods:{
myChart6(){
require('echarts').init(document.getElementById('grade')).setOption(this.option);
}
},
})
</script>
<style>
</style>

@ -0,0 +1,72 @@
<template>
<div id="chart5"></div>
</template>
<script>
export default({
name:'chart5',
data(){
return{
option1:{
legend: {
data: ['软工1901B', '软工1902B', '软工1903B'],
textStyle:{
color:'#f0f0f0'
}
},
xAxis: {
name:'日期',
type: 'category',
data: ['周一', '周二', '周三', '周四', '周五']
},
yAxis: {
name:'考勤率',
type: 'value',
scale: true,
axisLine:{
show:true,
},
min:92,
},
series: [
{
name:'软工1901B',
data: [98, 97, 99, 96, 98],
type: 'line',
smooth: true,
lineStyle:{
// color:"#fff"
}
},
{
name:'软工1902B',
data: [99,98,97,99,100],
type: 'line',
lineStyle:{
// color:"#fff"
}
},
{
name:'软工1903B',
data: [100,99,100,97,100],
type: 'line',
lineStyle:{
// color:"#fff"
}
},
]
}
}
},
mounted(){
this.myChart4()
},
methods:{
myChart4(){
require('echarts').init(document.getElementById('chart5')).setOption(this.option1);
}
},
})
</script>
<style>
#chart5{width: 100%;height: 100%;}
</style>

@ -0,0 +1,64 @@
<template>
<div id="son"></div>
</template>
<script>
export default({
name:'son',
data(){
return{
option:{
title:{
text:'软工1701B',
bottom:10,
left:'center',
textStyle:{
color:'#fff'
}
},
tooltip: {
trigger: 'item'
},
legend: {
top: '10',
left: 'center'
},
series: [
{
name: '考勤情况',
type: 'pie',
radius: ['20%', '50%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '40',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 56, name: '实到',itemStyle:{color:'#74C3E1'} },
{ value: 3, name: '请假',itemStyle:{color:'#FDD55D'} },
{ value: 1, name: '缺席' ,itemStyle:{color:'#EE6666'} },
]
}
]
},
}
},
mounted(){
this.myChart1()
},
methods:{
myChart1(){
require('echarts').init(document.getElementById('son')).setOption(this.option);
}
}
})
</script>

@ -0,0 +1,65 @@
<template>
<div id="son1"></div>
</template>
<script>
export default({
name:'son1',
data(){
return{
option:{
title:{
text:'软工1702B',
bottom:10,
left:'center',
textStyle:{
color:'#fff'
}
},
tooltip: {
trigger: 'item'
},
legend: {
top: '10',
left: 'center'
},
series: [
{
name: '考勤情况',
type: 'pie',
radius: ['20%', '50%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '40',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 56, name: '实到',itemStyle:{color:'#74C3E1'} },
{ value: 3, name: '请假',itemStyle:{color:'#FDD55D'} },
{ value: 1, name: '缺席' ,itemStyle:{color:'#EE6666'} },
]
}
]
},
}
},
mounted(){
this.myChart1()
},
methods:{
myChart1(){
require('echarts').init(document.getElementById('son1')).setOption(this.option);
}
}
})
</script>

@ -0,0 +1,64 @@
<template>
<div id="son2"></div>
</template>
<script>
export default({
name:'son2',
data(){
return{
option:{
title:{
text:'软工1703B',
bottom:10,
left:'center',
textStyle:{
color:'#fff'
}
},
tooltip: {
trigger: 'item'
},
legend: {
top: '10',
left: 'center'
},
series: [
{
name: '考勤情况',
type: 'pie',
radius: ['20%', '50%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '40',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{ value: 56, name: '实到',itemStyle:{color:'#74C3E1'} },
{ value: 3, name: '请假',itemStyle:{color:'#FDD55D'} },
{ value: 1, name: '缺席' ,itemStyle:{color:'#EE6666'} },
]
}
]
},
}
},
mounted(){
this.myChart1()
},
methods:{
myChart1(){
require('echarts').init(document.getElementById('son2')).setOption(this.option);
}
}
})
</script>

@ -0,0 +1,105 @@
//宇宙特效
"use strict";
var canvas = document.getElementById('canvas'),
ctx = canvas.getContext('2d'),
w = canvas.width = window.innerWidth,
h = canvas.height = window.innerHeight,
hue = 217,
stars = [],
count = 0,
maxStars = 1300;//星星数量
var canvas2 = document.createElement('canvas'),
ctx2 = canvas2.getContext('2d');
canvas2.width = 100;
canvas2.height = 100;
var half = canvas2.width / 2,
gradient2 = ctx2.createRadialGradient(half, half, 0, half, half, half);
gradient2.addColorStop(0.025, '#CCC');
gradient2.addColorStop(0.1, 'hsl(' + hue + ', 61%, 33%)');
gradient2.addColorStop(0.25, 'hsl(' + hue + ', 64%, 6%)');
gradient2.addColorStop(1, 'transparent');
ctx2.fillStyle = gradient2;
ctx2.beginPath();
ctx2.arc(half, half, half, 0, Math.PI * 2);
ctx2.fill();
// End cache
function random(min, max) {
if (arguments.length < 2) {
max = min;
min = 0;
}
if (min > max) {
var hold = max;
max = min;
min = hold;
}
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function maxOrbit(x, y) {
var max = Math.max(x, y),
diameter = Math.round(Math.sqrt(max * max + max * max));
return diameter / 2;
//星星移动范围,值越大范围越小,
}
var Star = function() {
this.orbitRadius = random(maxOrbit(w, h));
this.radius = random(60, this.orbitRadius) / 8;
//星星大小
this.orbitX = w / 2;
this.orbitY = h / 2;
this.timePassed = random(0, maxStars);
this.speed = random(this.orbitRadius) / 1000000;
//星星移动速度
this.alpha = random(2, 10)/1000;
count++;
stars[count] = this;
}
Star.prototype.draw = function() {
var x = Math.sin(this.timePassed) * this.orbitRadius + this.orbitX,
y = Math.cos(this.timePassed) * this.orbitRadius + this.orbitY,
twinkle = random(10);
if (twinkle === 1 && this.alpha > 0) {
this.alpha -= 0.05;
} else if (twinkle === 2 && this.alpha < 1) {
this.alpha += 0.05;
}
ctx.globalAlpha = this.alpha;
ctx.drawImage(canvas2, x - this.radius / 2, y - this.radius / 2, this.radius, this.radius);
this.timePassed += this.speed;
}
for (var i = 0; i < maxStars; i++) {
new Star();
}
function animation() {
ctx.globalCompositeOperation = 'source-over';
ctx.globalAlpha = 0.5; //尾巴
ctx.fillStyle = 'hsla(' + hue + ', 64%, 6%, 2)';
ctx.fillRect(0, 0, w, h)
ctx.globalCompositeOperation = 'lighter';
for (var i = 1, l = stars.length; i < l; i++) {
stars[i].draw();
};
window.requestAnimationFrame(animation);
}
animation();

@ -0,0 +1,394 @@
export let threeMainFunction = function (e) {
function t(t) {
for (var a, u, s = t[0], i = t[1], c = t[2], d = 0, p = []; d < s.length; d++) u = s[d], r[u] && p.push(r[u][0]), r[u] = 0;
for (a in i) Object.prototype.hasOwnProperty.call(i, a) && (e[a] = i[a]);
for (l && l(t); p.length;) p.shift()();
return n.push.apply(n, c || []), o()
}
function o() {
for (var e, t = 0; t < n.length; t++) {
for (var o = n[t], a = !0, s = 1; s < o.length; s++) {
var i = o[s];
0 !== r[i] && (a = !1)
}
a && (n.splice(t--, 1), e = u(u.s = o[0]))
}
return e
}
var a = {}, r = {0: 0}, n = [];
function u(t) {
if (a[t]) return a[t].exports;
var o = a[t] = {i: t, l: !1, exports: {}};
return e[t].call(o.exports, o, o.exports, u), o.l = !0, o.exports
}
u.m = e, u.c = a, u.d = function (e, t, o) {
u.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: o})
}, u.r = function (e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
}, u.t = function (e, t) {
if (1 & t && (e = u(e)), 8 & t) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var o = Object.create(null);
if (u.r(o), Object.defineProperty(o, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e) for (var a in e) u.d(o, a, function (t) {
return e[t]
}.bind(null, a));
return o
}, u.n = function (e) {
var t = e && e.__esModule ? function () {
return e.default
} : function () {
return e
};
return u.d(t, "a", t), t
}, u.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, u.p = "";
var s = window.webpackJsonp = window.webpackJsonp || [], i = s.push.bind(s);
s.push = t, s = s.slice();
for (var c = 0; c < s.length; c++) t(s[c]);
var l = i;
n.push([4, 1]), o()
}([, , , , function (e, t, o) {
e.exports = o(5)
}, function (e, t, o) {
"use strict";
o.r(t);
var a = o(2), r = o(0), n = o(1), u = o(3);
let s = o(6);
const i = o(7);
window.top.forceBallBackground = 16777215, (async () => {
let e = window.innerWidth, t = window.innerHeight, o = a.b(a.c);
new Map;
(() => {
let e = new Map, t = 0;
s.nodes.forEach(o => {
e.set(o.name, t++)
}), s.nodes[0].level = 0, s.edges = s.links.map(o => {
let a = e.get(o.source);
return void 0 === a && (s.nodes.push({name: o.source}), e.set(o.source, t++), console.log(a)), void 0 === e.get(o.target) && (s.nodes.push({name: o.target}), e.set(o.target, t++)), s.nodes[e.get(o.target)].level = s.nodes[e.get(o.source)].level + 1, {
source: e.get(o.source),
target: e.get(o.target)
}
}), s.nodes.forEach(e => {
e.color = (e => a.a(o(e)).brighter(1.7).toString())(e.level)
})
})();
let c = s.nodes, l = s.edges, d = new n.World;
d.gravity.set(0, 0, 0), d.solver.iterations = 20;
let p = new r.Scene, g = new r.WebGLRenderer({antialias: !0});
g.setSize(e, t), g.shadowMap.enabled = !0, g.setClearColor(window.top.forceBallBackground, 1), document.body.appendChild(g.domElement);
let v = new r.PerspectiveCamera(45, e / t, 1, 1e4);
v.position.set(0, -300, 300), v.lookAt(0, 0, 0), window.onresize = (() => {
v.aspect = window.innerWidth / window.innerHeight, v.updateProjectionMatrix(), g.setSize(window.innerWidth, window.innerHeight)
});
let m = [];
c.forEach((e, t) => {
!function () {
let t = document.createElement("canvas");
t.width = 512, t.height = 512;
let o = t.getContext("2d");
o.fillStyle = "#000000", o.font = "75px Yahei", o.textAlign = "center", o.textBaseline = "middle", o.fillText(e.name, 256, 256, 512);
let a = new r.CanvasTexture(t);
a.needsUpdate = !0;
let n = new r.SpriteMaterial({map: a}), u = new r.Sprite(n);
u.scale.set(30, 30, 1), u.castShadow = !0, u.receiveShadow = !0, p.add(u), e.text = u, u.data = e
}();
let o = function () {
let o = new r.SphereGeometry(10, 32, 32),
a = new r.MeshPhongMaterial({color: e.color}), n = new r.Mesh(o, a);
n.castShadow = !0, n.receiveShadow = !0, n.frustumCulled = !1;
{
let e = c.length, o = 50 * e / 2 / Math.PI;
n.position.set(Math.cos(2 * Math.PI / e * t) * o, Math.sin(2 * Math.PI / e * t) * o, 0)
}
return p.add(n), m.push(n), e.body = n, n.data = e, n
}(), a = new n.Body({
mass: 1,
shape: new n.Sphere(10),
linearDamping: .9,
angularDamping: .9
});
a.position.copy(o.position), a.fixedRotation = !0, d.addBody(a), e.pbody = a
}), l.forEach(e => {
let t = new r.LineBasicMaterial({vertexColors: !0, side: r.DoubleSide}),
o = new r.Geometry;
o.vertices.push(c[e.source].body.position), o.vertices.push(c[e.target].body.position), o.colors.push(c[e.source].body.material.color, c[e.target].body.material.color);
let a = new r.Line(o, t);
a.castShadow = !0, a.receiveShadow = !0, a.frustumCulled = !1, p.add(a), e.body = a;
let u = c[e.source].pbody, s = c[e.target].pbody,
i = new n.DistanceConstraint(u, s, 50, 10);
d.addConstraint(i)
}), function () {
let e = new r.AmbientLight(16777215, .5);
e.position.set(0, 10, 0), p.add(e), (e = new r.SpotLight(16777215, .4)).position.set(0, 0, 300), e.castShadow = !0, e.shadow.mapSize.width = 4096, e.shadow.mapSize.height = 4096, p.add(e), (e = new r.SpotLight(16777215, .4)).position.set(0, 0, -300), e.castShadow = !0, e.shadow.mapSize.width = 4096, e.shadow.mapSize.height = 4096, p.add(e)
}();
const h = new i(v, g.domElement);
let f = !1, w = !1;
const y = new u.a(m, v, g.domElement);
function b() {
if (!f) {
let e = new r.Vector3(0, 0, 0);
c.forEach(t => {
e.add(t.pbody.position)
}), e.divideScalar(c.length);
let t = 10 * e.sub(new r.Vector3(0, 0, 0)).length(),
o = e.negate().clampLength(t, Math.ceil(t));
c.forEach(e => {
e.pbody.force.copy(e.pbody.force.vadd(o))
})
}
c.forEach(e => {
e.body.position.copy(e.pbody.position), e.body.quaternion.copy(e.pbody.quaternion);
let t = v.position.clone().sub(e.pbody.position).clampLength(11, 12).add(e.pbody.position);
e.text.position.copy(t), c.forEach(t => {
if (t !== e && t.pbody.type === n.Body.DYNAMIC) {
let o = (new r.Vector3).copy(t.pbody.position).distanceTo(e.pbody.position),
a = 1e5,
n = (new r.Vector3).copy(t.pbody.position).sub(e.pbody.position).clampLength(a / o ** 2, Math.ceil(a / o ** 2));
t.pbody.force.copy(t.pbody.force.vadd(n))
}
})
}), l.forEach(e => {
e.body.geometry.verticesNeedUpdate = !0
})
}
y.addEventListener("hoveron", function (e) {
h.enabled = !1
}), y.addEventListener("hoveroff", function (e) {
h.enabled = !0
}), y.addEventListener("dragstart", function (e) {
e.object.data.pbody.type = n.Body.KINEMATIC, e.object.data.pbody.updateMassProperties(), f = !0
}), y.addEventListener("drag", function (e) {
e.object.data.pbody.position.copy(e.object.position), w = !0
}), y.addEventListener("dragend", function (e) {
e.object.data.pbody.type = n.Body.DYNAMIC, e.object.data.pbody.updateMassProperties(), f = !1, !w && e.object.data.url && "" !== e.object.data.url && window.top.open(e.object.data.url), w = !1
});
console.time();
for (let e = 0; e < 250; e++) d.step(.02), b();
console.timeEnd();
let S = performance.now(), M = function (e) {
let t = e - S;
S = e, t > 0 && (d.step(Math.min(t, 100) / 1e3), b()), g.render(p, v), h.update(), requestAnimationFrame(M)
};
M(S)
})()
}, function (e) {
e.exports = {
nodes: [{name: "城市数据"}, {name: "交通"},
{name: "社区"}, {name: "社交"}, {name: "民生"},
{name: "高速路网"}, {name: "公交车"}, {name: "浮动车"},
{name: "轨道交通"}, {name: "物业数据"}, {name: "民情数据"},
{name: "城管数据"}, {name: "城市管理"}, {name: "推特数据"},
{name: "重庆高速路网测速仪数据"}, {name: "重庆高速路网车间器数据"},
{name: "重庆高速路网交调站数据"}, {name: "重庆高速路网收费站出站数据"},
{name: "天津高速处数据"}, {name: "天津入高速公路数据"},
{name: "天津出高速公路数据"}, {name: "北京公交车"},
{name: "北京公交一卡通"}, {name: "重庆公交车GPS"},
{name: "山东公交车"}, {name: "北京出租车"},
{name: "西安事件数据"}, {name: "西安部件数据"},
{name: "深圳出租车"}, {name: "天津出租车"}, {name: "天津地铁一卡通数据"},
{name: "天津地铁一票通数据"}, {name: "北京GIS"},
{name: "北京市交通小区划分数据"}, {name: "北京数据"},
{name: "重庆数据"}, {name: "天津数据"}, {name: "山东数据"},
{name: "西安数据"}, {name: "深圳数据"}, {name: "温州数据"}],
links: [{
source: "城市数据",
target: "交通",
value: .75
}, {source: "城市数据", target: "社区", value: .1}, {
source: "城市数据",
target: "民生",
value: .05
}, {source: "城市数据", target: "社交", value: .05}, {
source: "城市数据",
target: "城市管理",
value: .05
}, {
source: "交通",
target: "高速路网",
value: .0167781913
}, {
source: "高速路网",
target: "重庆高速路网测速仪数据",
value: .3502949852
}, {
source: "重庆高速路网测速仪数据",
target: "重庆数据",
value: 1
}, {
source: "高速路网",
target: "重庆高速路网车间器数据",
value: .0073746312
}, {
source: "重庆高速路网车间器数据",
target: "重庆数据",
value: 1
}, {
source: "高速路网",
target: "重庆高速路网交调站数据",
value: 216053e-10
}, {
source: "重庆高速路网交调站数据",
target: "重庆数据",
value: 1
}, {
source: "高速路网",
target: "重庆高速路网收费站出站数据",
value: .6452802359
}, {
source: "重庆高速路网收费站出站数据",
target: "重庆数据",
value: 1
}, {
source: "高速路网",
target: "天津高速处数据",
value: 11182e-10
}, {
source: "天津高速处数据",
target: "天津数据",
value: 1
}, {
source: "天津出高速公路数据",
target: "天津数据",
value: 1
}, {
source: "高速路网",
target: "天津入高速公路数据",
value: .0010334566
}, {
source: "天津入高速公路数据",
target: "天津数据",
value: 1
}, {
source: "高速路网",
target: "天津出高速公路数据",
value: .0010622637
}, {
source: "交通",
target: "公交车",
value: .2857142857
}, {
source: "公交车",
target: "北京公交车",
value: .864745011
}, {source: "北京公交车", target: "北京数据", value: 1}, {
source: "公交车",
target: "北京公交一卡通",
value: .0160450734
}, {
source: "北京公交一卡通",
target: "北京数据",
value: 1
}, {
source: "公交车",
target: "重庆公交车GPS",
value: .1125970066
}, {
source: "重庆公交车GPS",
target: "重庆数据",
value: 1
}, {
source: "公交车",
target: "山东公交车",
value: .0012991962
}, {source: "山东公交车", target: "山东数据", value: 1}, {
source: "交通",
target: "浮动车",
value: .6968641114
}, {
source: "浮动车",
target: "北京出租车",
value: .7909090909
}, {
source: "北京出租车",
target: "北京数据",
value: 1
}, {
source: "城管数据",
target: "西安事件数据",
value: .1909090909
}, {
source: "城管数据",
target: "西安部件数据",
value: .1909090909
}, {
source: "西安事件数据",
target: "西安数据",
value: .5
}, {
source: "西安部件数据",
target: "西安数据",
value: .5
}, {
source: "浮动车",
target: "深圳出租车",
value: .0161576704
}, {source: "深圳出租车", target: "深圳数据", value: 1}, {
source: "浮动车",
target: "天津出租车",
value: .0016956676
}, {source: "天津出租车", target: "天津数据", value: 1}, {
source: "交通",
target: "轨道交通",
value: .0006434116
}, {
source: "轨道交通",
target: "天津地铁一卡通数据",
value: .4435897435
}, {
source: "天津地铁一卡通数据",
target: "天津数据",
value: 1
}, {
source: "轨道交通",
target: "天津地铁一票通数据",
value: .5564102565
}, {
source: "天津地铁一票通数据",
target: "天津数据",
value: 1
}, {source: "社区", target: "物业数据", value: 1}, {
source: "民生",
target: "民情数据",
value: 1
}, {source: "城市管理", target: "城管数据", value: 1}, {
source: "社交",
target: "推特数据",
value: 1
}, {
source: "物业数据",
target: "停车场数据",
value: .05
}, {
source: "停车场数据",
target: "深圳数据",
value: 1
}, {source: "物业数据", target: "北京GIS", value: .9}, {
source: "北京GIS",
target: "北京数据",
value: 1
}, {
source: "物业数据",
target: "北京市交通小区划分数据",
value: .05
}, {
source: "北京市交通小区划分数据",
target: "北京数据",
value: 1
}, {source: "民情数据", target: "温州数据", value: 1}, {
source: "城管数据",
target: "温州数据",
value: 1
}]
}
}]);

@ -0,0 +1,275 @@
export let threeMainFunction = function (e) {
function t(t) {
for (var a, u, s = t[0], i = t[1], c = t[2], d = 0, p = []; d < s.length; d++) u = s[d], r[u] && p.push(r[u][0]), r[u] = 0;
for (a in i) Object.prototype.hasOwnProperty.call(i, a) && (e[a] = i[a]);
for (l && l(t); p.length;) p.shift()();
return n.push.apply(n, c || []), o()
}
function o() {
for (var e, t = 0; t < n.length; t++) {
for (var o = n[t], a = !0, s = 1; s < o.length; s++) {
var i = o[s];
0 !== r[i] && (a = !1)
}
a && (n.splice(t--, 1), e = u(u.s = o[0]))
}
return e
}
var a = {},
r = {
0: 0
},
n = [];
function u(t) {
if (a[t]) return a[t].exports;
var o = a[t] = {
i: t,
l: !1,
exports: {}
};
return e[t].call(o.exports, o, o.exports, u), o.l = !0, o.exports
}
u.m = e, u.c = a, u.d = function (e, t, o) {
u.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: o
})
},
u.r = function (e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(e, "__esModule", {
value: !0
})
},
u.t = function (e, t) {
if (1 & t && (e = u(e)), 8 & t) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var o = Object.create(null);
if (u.r(o), Object.defineProperty(o, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var a in e) u.d(o, a, function (t) {
return e[t]
}.bind(null, a));
return o
},
u.n = function (e) {
var t = e && e.__esModule ? function () {
return e.default
} : function () {
return e
};
return u.d(t, "a", t), t
},
u.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
},
u.p = "";
var s = window.webpackJsonp = window.webpackJsonp || [],
i = s.push.bind(s);
s.push = t, s = s.slice();
for (var c = 0; c < s.length; c++) t(s[c]);
var l = i;
n.push([4, 1]), o()
}
([, , , , function (e, t, o) {
e.exports = o(5)
},
function (e, t, o) {
"use strict";
o.r(t);
var a = o(2),
r = o(0),
n = o(1),
u = o(3);
let s = o(6);
const i = o(7);
window.top.forceBallBackground = 16777215, (async () => {
let e = window.innerWidth,
t = window.innerHeight,
o = a.b(a.c);
new Map;
(() => {
let e = new Map,
t = 0;
s.nodes.forEach(o => {
e.set(o.name, t++)
}), s.nodes[0].level = 0, s.edges = s.links.map(o => {
let a = e.get(o.source);
return void 0 === a && (s.nodes.push({
name: o.source
}), e.set(o.source, t++), console.log(a)), void 0 === e.get(o.target) && (s.nodes.push({
name: o.target
}), e.set(o.target, t++)), s.nodes[e.get(o.target)].level = s.nodes[e.get(o.source)].level + 1, {
source: e.get(o.source),
target: e.get(o.target)
}
}), s.nodes.forEach(e => {
e.color = (e => a.a(o(e)).brighter(1.7).toString())(e.level)
})
})();
let c = s.nodes,
l = s.edges,
d = new n.World;
d.gravity.set(0, 0, 0), d.solver.iterations = 20;
let p = new r.Scene,
g = new r.WebGLRenderer({
antialias: !0
});
g.setSize(e, t), g.shadowMap.enabled = !0, g.setClearColor(window.top.forceBallBackground, 1), document.body.appendChild(g.domElement);
let v = new r.PerspectiveCamera(45, e / t, 1, 1e4);
v.position.set(0, -300, 300), v.lookAt(0, 0, 0), window.onresize = (() => {
v.aspect = window.innerWidth / window.innerHeight, v.updateProjectionMatrix(), g.setSize(window.innerWidth, window.innerHeight)
});
let m = [];
c.forEach((e, t) => {
!function () {
let t = document.createElement("canvas");
t.width = 512, t.height = 512;
let o = t.getContext("2d");
o.fillStyle = "#000000", o.font = "75px Yahei", o.textAlign = "center", o.textBaseline = "middle", o.fillText(e.name, 256, 256, 512);
let a = new r.CanvasTexture(t);
a.needsUpdate = !0;
let n = new r.SpriteMaterial({
map: a
}),
u = new r.Sprite(n);
u.scale.set(30, 30, 1), u.castShadow = !0, u.receiveShadow = !0, p.add(u), e.text = u, u.data = e
}();
let o = function () {
let o = new r.SphereGeometry(10, 32, 32),
a = new r.MeshPhongMaterial({
color: e.color
}),
n = new r.Mesh(o, a);
n.castShadow = !0, n.receiveShadow = !0, n.frustumCulled = !1;
{
let e = c.length,
o = 50 * e / 2 / Math.PI;
n.position.set(Math.cos(2 * Math.PI / e * t) * o, Math.sin(2 * Math.PI / e * t) * o, 0)
}
return p.add(n), m.push(n), e.body = n, n.data = e, n
}(),
a = new n.Body({
mass: 1,
shape: new n.Sphere(10),
linearDamping: .9,
angularDamping: .9
});
a.position.copy(o.position), a.fixedRotation = !0, d.addBody(a), e.pbody = a
}), l.forEach(e => {
let t = new r.LineBasicMaterial({
vertexColors: !0,
side: r.DoubleSide
}),
o = new r.Geometry;
o.vertices.push(c[e.source].body.position), o.vertices.push(c[e.target].body.position), o.colors.push(c[e.source].body.material.color, c[e.target].body.material.color);
let a = new r.Line(o, t);
a.castShadow = !0, a.receiveShadow = !0, a.frustumCulled = !1, p.add(a), e.body = a;
let u = c[e.source].pbody,
s = c[e.target].pbody,
i = new n.DistanceConstraint(u, s, 50, 10);
d.addConstraint(i)
}),
function () {
let e = new r.AmbientLight(16777215, .5);
e.position.set(0, 10, 0), p.add(e), (e = new r.SpotLight(16777215, .4)).position.set(0, 0, 300), e.castShadow = !0, e.shadow.mapSize.width = 4096, e.shadow.mapSize.height = 4096, p.add(e), (e = new r.SpotLight(16777215, .4)).position.set(0, 0, -300), e.castShadow = !0, e.shadow.mapSize.width = 4096, e.shadow.mapSize.height = 4096, p.add(e)
}();
const h = new i(v, g.domElement);
let f = !1,
w = !1;
const y = new u.a(m, v, g.domElement);
function b() {
if (!f) {
let e = new r.Vector3(0, 0, 0);
c.forEach(t => {
e.add(t.pbody.position)
}), e.divideScalar(c.length);
let t = 10 * e.sub(new r.Vector3(0, 0, 0)).length(),
o = e.negate().clampLength(t, Math.ceil(t));
c.forEach(e => {
e.pbody.force.copy(e.pbody.force.vadd(o))
})
}
c.forEach(e => {
e.body.position.copy(e.pbody.position), e.body.quaternion.copy(e.pbody.quaternion);
let t = v.position.clone().sub(e.pbody.position).clampLength(11, 12).add(e.pbody.position);
e.text.position.copy(t), c.forEach(t => {
if (t !== e && t.pbody.type === n.Body.DYNAMIC) {
let o = (new r.Vector3).copy(t.pbody.position).distanceTo(e.pbody.position),
a = 1e5,
n = (new r.Vector3).copy(t.pbody.position).sub(e.pbody.position).clampLength(a / o ** 2, Math.ceil(a / o ** 2));
t.pbody.force.copy(t.pbody.force.vadd(n))
}
})
}), l.forEach(e => {
e.body.geometry.verticesNeedUpdate = !0
})
}
y.addEventListener("hoveron", function (e) {
h.enabled = !1
}), y.addEventListener("hoveroff", function (e) {
h.enabled = !0
}), y.addEventListener("dragstart", function (e) {
e.object.data.pbody.type = n.Body.KINEMATIC, e.object.data.pbody.updateMassProperties(), f = !0
}), y.addEventListener("drag", function (e) {
e.object.data.pbody.position.copy(e.object.position), w = !0
}), y.addEventListener("dragend", function (e) {
e.object.data.pbody.type = n.Body.DYNAMIC, e.object.data.pbody.updateMassProperties(), f = !1, !w && e.object.data.url && "" !== e.object.data.url && window.top.open(e.object.data.url), w = !1
});
console.time();
for (let e = 0; e < 250; e++) d.step(.02), b();
console.timeEnd();
let S = performance.now(),
M = function (e) {
let t = e - S;
S = e, t > 0 && (d.step(Math.min(t, 100) / 1e3), b()), g.render(p, v), h.update(), requestAnimationFrame(M)
};
M(S)
})()
},
function (e) {
var nodestemp = []
var linkstemp = []
var id = window.location.href;
var ids = id.indexOf('=')
var idsur = id.substring(ids + 1)
var xhr = new XMLHttpRequest();
var url = process.env.VUE_APP_API_BASE_URL + '/createtp/createtp/maketupu?id=' + idsur;
xhr.open('GET', url, false);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200 || xhr.status == 304) {
console.log(2222);
// 从服务器获得数据
var jsonObj = JSON.parse(xhr.responseText)
// 获取 nodes 数组和 links 数组
nodestemp = jsonObj.result.nodes;
linkstemp = jsonObj.result.links;
// 输出结果
console.log(jsonObj)
console.log(nodestemp);
console.log(linkstemp);
/* var stemp= xhr.responseText;
console.log(stemp);
console.log('aaaa',stemp.nodes)
console.log('bbbb',stemp.links)*/
}
};
xhr.send();
e.exports = {
nodes: nodestemp,
links: linkstemp
}
console.log(3333);
}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -71,7 +71,7 @@ public class ShiroConfig {
}
}
// 配置不会被拦截的链接 顺序判断
filterChainDefinitionMap.put("/createtp/createtp/maketupu","anon"); // 知识图谱排除
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除

@ -1,32 +1,42 @@
package org.jeecg.modules.demo.functionx.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.modulex.entity.Modulex;
import java.util.List;
/**
* @Description: 功能管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Date: 2023-04-10
* @Version: V1.0
*/
public interface IFunctionxService extends IService<Functionx> {
String findModuleCode(String id);
String findModuleCode(String id);
List<String> findRole(String id);
Result<?> fabu(String id);
List<String> findRole(String id);
Result<?> kaishi(String id);
Result<?> fabu(String id);
Result<?> tijiao(String id);
Result<?> kaishi(String id);
Result<?> cehui(String id);
Result<?> tijiao(String id);
Result<?> shenhe(String id);
Result<?> cehui(String id);
Result<?> muban(String id, String ids);
Result<?> shenhe(String id);
/**
* 根据模块id查询该模块下所有的功能
*
* @param modulex modulex
* @return {@link List}<{@link Functionx}>
*/
List<Functionx> queryFunctionListByModuleId(Modulex modulex);
Result<?> muban(String id, String ids);
}

@ -1,17 +1,17 @@
package org.jeecg.modules.demo.functionx.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functiontemplate.entity.FunctionTemplate;
import org.jeecg.modules.demo.functiontemplate.mapper.FunctionTemplateMapper;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.mapper.FunctionxMapper;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import org.springframework.beans.BeanUtils;
import org.jeecg.modules.modulex.entity.Modulex;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@ -19,150 +19,164 @@ import java.util.List;
/**
* @Description: 功能管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Date: 2023-04-10
* @Version: V1.0
*/
@Service
public class FunctionxServiceImpl extends ServiceImpl<FunctionxMapper, Functionx> implements IFunctionxService {
@Autowired
FunctionxMapper functionxMapper;
@Autowired
FunctionTemplateMapper functionTemplateMapper;
@Autowired
FunctionxMapper functionxMapper;
@Autowired
FunctionTemplateMapper functionTemplateMapper;
@Override
public String findModuleCode(String id) {
return functionxMapper.findModuleCode(id);
}
@Override
public String findModuleCode(String id) {
return functionxMapper.findModuleCode(id);
}
@Override
public List<String> findRole(String id) {
return functionxMapper.findRole(id);
}
@Override
public List<String> findRole(String id) {
return functionxMapper.findRole(id);
}
@Override
public Result<?> fabu(String id) {
Functionx functionx = functionxMapper.selectById(id);
//先判断一下当前是什么状态,如果不是处于未发布状态就不让发布
//先改变功能的状态,变为已发布
//然后改变对应规则的所有状态
if(functionx.getWorkStatus()==0){
functionx.setWorkStatus(1);
functionx.setPublishTime(new Date());
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionId(id);
return Result.OK("发布成功!!");
}else{
return Result.error("当前功能已发布!!!");
}
@Override
public Result<?> fabu(String id) {
Functionx functionx = functionxMapper.selectById(id);
//先判断一下当前是什么状态,如果不是处于未发布状态就不让发布
//先改变功能的状态,变为已发布
//然后改变对应规则的所有状态
if (functionx.getWorkStatus() == 0) {
functionx.setWorkStatus(1);
functionx.setPublishTime(new Date());
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionId(id);
return Result.OK("发布成功!!");
} else {
return Result.error("当前功能已发布!!!");
}
@Override
public Result<?> kaishi(String id) {
Functionx functionx = functionxMapper.selectById(id);
//只用判断前一级的状态
//然后改变对应规则的所有状态
if(functionx.getWorkStatus()==0)
return Result.error("请先进行发布!!!");
else if(functionx.getWorkStatus()==1){
}
@Override
public Result<?> kaishi(String id) {
Functionx functionx = functionxMapper.selectById(id);
//只用判断前一级的状态
//然后改变对应规则的所有状态
if (functionx.getWorkStatus() == 0)
return Result.error("请先进行发布!!!");
else if (functionx.getWorkStatus() == 1) {
functionx.setWorkStatus(2);
functionx.setStartTime(new Date());
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionIdStart(id,new Date());
return Result.OK("开始工作!!");
}else if(functionx.getWorkStatus()==2){
return Result.error("已经开始!!!");
}else {
return Result.error("当前不处于开始阶段!!!");
}
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionIdStart(id, new Date());
return Result.OK("开始工作!!");
} else if (functionx.getWorkStatus() == 2) {
return Result.error("已经开始!!!");
} else {
return Result.error("当前不处于开始阶段!!!");
}
@Override
public Result<?> tijiao(String id) {
Functionx functionx = functionxMapper.selectById(id);
//只用判断前一级的状态
//然后改变对应规则的所有状态
if(functionx.getWorkStatus()==1)
return Result.error("请先开始工作!!!");
else if(functionx.getWorkStatus()==2){
functionx.setWorkStatus(3);
functionx.setSubmitTime(new Date());
//获得实际工作时间
//更新规则的提交时间还有时长
long a=(new Date().getTime()-functionx.getStartTime().getTime());
String s=""+a;
BigDecimal bigDecimal=new BigDecimal(s);
BigDecimal divide = bigDecimal.divide(new BigDecimal("3600000"),1,BigDecimal.ROUND_HALF_UP);
double v = Double.parseDouble(divide.toString());
functionx.setRealDuration(v);
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionIdStartTime(id,new Date(),v);
return Result.OK("提交成功!!");
}else if(functionx.getWorkStatus()==3){
return Result.error("已提交!!!");
}else{
return Result.error("当前不属于提交阶段!!!");
}
}
@Override
public Result<?> tijiao(String id) {
Functionx functionx = functionxMapper.selectById(id);
//只用判断前一级的状态
//然后改变对应规则的所有状态
if (functionx.getWorkStatus() == 1)
return Result.error("请先开始工作!!!");
else if (functionx.getWorkStatus() == 2) {
functionx.setWorkStatus(3);
functionx.setSubmitTime(new Date());
//获得实际工作时间
//更新规则的提交时间还有时长
long a = (new Date().getTime() - functionx.getStartTime().getTime());
String s = "" + a;
BigDecimal bigDecimal = new BigDecimal(s);
BigDecimal divide = bigDecimal.divide(new BigDecimal("3600000"), 1, BigDecimal.ROUND_HALF_UP);
double v = Double.parseDouble(divide.toString());
functionx.setRealDuration(v);
functionxMapper.updateById(functionx);
functionxMapper.updateruleByFunctionIdStartTime(id, new Date(), v);
return Result.OK("提交成功!!");
} else if (functionx.getWorkStatus() == 3) {
return Result.error("已提交!!!");
} else {
return Result.error("当前不属于提交阶段!!!");
}
}
@Override
public Result<?> cehui(String id) {
Functionx functionx = functionxMapper.selectById(id);
if(functionx.getWorkStatus()==2){
return Result.error("正处于开发中!!");
}
// functionxMapper.updateById(functionx);
functionxMapper.cehui(id);
//工作状态全部开发者,提交时间null,真实工作时间null
functionxMapper.rule(id);
return Result.OK("撤回成功!!!");
@Override
public Result<?> cehui(String id) {
Functionx functionx = functionxMapper.selectById(id);
if (functionx.getWorkStatus() == 2) {
return Result.error("正处于开发中!!");
}
// functionxMapper.updateById(functionx);
functionxMapper.cehui(id);
//工作状态全部开发者,提交时间null,真实工作时间null
functionxMapper.rule(id);
return Result.OK("撤回成功!!!");
}
@Override
public Result<?> shenhe(String id) {
Functionx functionx = functionxMapper.selectById(id);
if(functionx.getWorkStatus()==3){
functionx.setWorkStatus(4);
functionxMapper.updateById(functionx);
functionxMapper.uprule(id);
return Result.OK("审核通过!!1");
}
if(functionx.getWorkStatus()==4){
return Result.error("已审核!!!");
}
if(functionx.getWorkStatus()<3){
return Result.error("请先完成之前的步骤");
}
if(functionx.getWorkStatus()==9){
return Result.error("出现BUG,请先解决");
}
return null;
@Override
public Result<?> shenhe(String id) {
Functionx functionx = functionxMapper.selectById(id);
if (functionx.getWorkStatus() == 3) {
functionx.setWorkStatus(4);
functionxMapper.updateById(functionx);
functionxMapper.uprule(id);
return Result.OK("审核通过!!1");
}
if (functionx.getWorkStatus() == 4) {
return Result.error("已审核!!!");
}
if (functionx.getWorkStatus() < 3) {
return Result.error("请先完成之前的步骤");
}
if (functionx.getWorkStatus() == 9) {
return Result.error("出现BUG,请先解决");
}
return null;
}
@Override
public Result<?> muban(String id, String ids) {
//本质上就是添加,id为对应的模块id,然后ids为id集合
System.err.println(id+" "+ids);
String[] split = ids.split(",");
for (String s : split) {
FunctionTemplate functionTemplate = functionTemplateMapper.selectById(s);
Functionx functionx=new Functionx();
if(functionTemplate!=null){
functionx.setFunctionName(functionTemplate.getFunctionTemplateName());
functionx.setFunctionEnName(functionTemplate.getFunctionTemplateEnName());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
//根据id获得当前对应模块的编码,然后截取模板的最后两个字符,拼接成为新的功能编码
functionx.setFunctionCode(functionTemplate.getFunctionTemplateCode());
functionx.setFunctionType(functionTemplate.getFunctionTemplateType());
functionx.setDiagrams(functionTemplate.getDiagrams());
functionx.setPmDescribe(functionTemplate.getFunctionTemplateDescribe());
functionx.setWorkLevel(functionTemplate.getWorkLevel());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
functionx.setModuleId(id);
functionx.setId(null);
functionxMapper.insert(functionx);
}
}
return Result.OK("模板添加成功");
@Override
public Result<?> muban(String id, String ids) {
//本质上就是添加,id为对应的模块id,然后ids为id集合
System.err.println(id + " " + ids);
String[] split = ids.split(",");
for (String s : split) {
FunctionTemplate functionTemplate = functionTemplateMapper.selectById(s);
Functionx functionx = new Functionx();
if (functionTemplate != null) {
functionx.setFunctionName(functionTemplate.getFunctionTemplateName());
functionx.setFunctionEnName(functionTemplate.getFunctionTemplateEnName());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
//根据id获得当前对应模块的编码,然后截取模板的最后两个字符,拼接成为新的功能编码
functionx.setFunctionCode(functionTemplate.getFunctionTemplateCode());
functionx.setFunctionType(functionTemplate.getFunctionTemplateType());
functionx.setDiagrams(functionTemplate.getDiagrams());
functionx.setPmDescribe(functionTemplate.getFunctionTemplateDescribe());
functionx.setWorkLevel(functionTemplate.getWorkLevel());
functionx.setWorkStatus(functionTemplate.getWorkStatus());
functionx.setModuleId(id);
functionx.setId(null);
functionxMapper.insert(functionx);
}
}
return Result.OK("模板添加成功");
}
/**
* 根据模块id查询该模块下所有的功能
*
* @param modulex modulex
* @return {@link List}<{@link Functionx}>
*/
@Override
public List<Functionx> queryFunctionListByModuleId(Modulex modulex) {
LambdaQueryWrapper<Functionx> functionWrapper = new LambdaQueryWrapper<>();
functionWrapper.eq(Functionx::getModuleId, modulex.getId());
return this.list(functionWrapper);
}
}

@ -1,183 +1,184 @@
package org.jeecg.modules.demo.gxlx.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.gxlx.entity.Gxlx;
import org.jeecg.modules.demo.gxlx.service.IGxlxService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.gxlx.entity.Gxlx;
import org.jeecg.modules.demo.gxlx.service.IGxlxService;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
import org.jeecg.modules.demo.mkgx.service.IMkgxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 关系类型
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Api(tags="关系类型")
@Api(tags = "关系类型")
@RestController
@RequestMapping("/gxlx/gxlx")
@Slf4j
public class GxlxController extends JeecgController<Gxlx, IGxlxService> {
@Autowired
private IGxlxService gxlxService;
/**
* 分页列表查询
*
* @param gxlx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "关系类型-分页列表查询")
@ApiOperation(value="关系类型-分页列表查询", notes="关系类型-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Gxlx gxlx,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Gxlx> queryWrapper = QueryGenerator.initQueryWrapper(gxlx, req.getParameterMap());
Page<Gxlx> page = new Page<Gxlx>(pageNo, pageSize);
IPage<Gxlx> pageList = gxlxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param gxlx
* @return
*/
@AutoLog(value = "关系类型-添加")
@ApiOperation(value="关系类型-添加", notes="关系类型-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Gxlx gxlx) {
if (gxlx.getWidle()>=0 && gxlx.getWidle()<=2){
gxlxService.save(gxlx);
return Result.OK("添加成功!");
} else {
return Result.error("请输入正确的数值!");
}
}
/**
* 编辑
*
* @param gxlx
* @return
*/
@AutoLog(value = "关系类型-编辑")
@ApiOperation(value="关系类型-编辑", notes="关系类型-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Gxlx gxlx) {
if (gxlx.getWidle()>=0 && gxlx.getWidle()<=2){
gxlxService.updateById(gxlx);
return Result.OK("编辑成功!");
} else {
return Result.error("请输入正确的数值!");
}
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "关系类型-通过id删除")
@ApiOperation(value="关系类型-通过id删除", notes="关系类型-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
gxlxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "关系类型-批量删除")
@ApiOperation(value="关系类型-批量删除", notes="关系类型-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.gxlxService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "关系类型-通过id查询")
@ApiOperation(value="关系类型-通过id查询", notes="关系类型-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Gxlx gxlx = gxlxService.getById(id);
if(gxlx==null) {
return Result.error("未找到对应数据");
}
return Result.OK(gxlx);
}
/**
* 导出excel
*
* @param request
* @param gxlx
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Gxlx gxlx) {
return super.exportXls(request, gxlx, Gxlx.class, "关系类型");
@Autowired
private IGxlxService gxlxService;
@Autowired
private IMkgxService mkgxService;
/**
* 分页列表查询
*
* @param gxlx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "关系类型-分页列表查询")
@ApiOperation(value = "关系类型-分页列表查询", notes = "关系类型-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Gxlx gxlx,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Gxlx> queryWrapper = QueryGenerator.initQueryWrapper(gxlx, req.getParameterMap());
Page<Gxlx> page = new Page<Gxlx>(pageNo, pageSize);
IPage<Gxlx> pageList = gxlxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param gxlx
* @return
*/
@AutoLog(value = "关系类型-添加")
@ApiOperation(value = "关系类型-添加", notes = "关系类型-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Gxlx gxlx) {
if (gxlx.getWidle() >= 0 && gxlx.getWidle() <= 2) {
gxlxService.save(gxlx);
return Result.OK("添加成功!");
} else {
return Result.error("请输入正确的数值!");
}
}
/**
* 编辑
*
* @param gxlx
* @return
*/
@AutoLog(value = "关系类型-编辑")
@ApiOperation(value = "关系类型-编辑", notes = "关系类型-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Gxlx gxlx) {
if (gxlx.getWidle() >= 0 && gxlx.getWidle() <= 2) {
gxlxService.updateById(gxlx);
return Result.OK("编辑成功!");
} else {
return Result.error("请输入正确的数值!");
}
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "关系类型-通过id删除")
@ApiOperation(value = "关系类型-通过id删除", notes = "关系类型-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
LambdaQueryWrapper<Mkgx> mkgxWrapper = new LambdaQueryWrapper<>();
mkgxWrapper.eq(Mkgx::getGxlx, id);
int count = mkgxService.count(mkgxWrapper);
if (count > 0) {
return Result.error("删除失败,该关系类型正在使用中");
}
gxlxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Gxlx.class);
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "关系类型-批量删除")
@ApiOperation(value = "关系类型-批量删除", notes = "关系类型-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
String[] split = ids.split(",");
for (String id : split) {
Result<?> delete = this.delete(id);
if (delete.getCode() != 200) {
return Result.error("批量删除失败");
}
}
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "关系类型-通过id查询")
@ApiOperation(value = "关系类型-通过id查询", notes = "关系类型-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Gxlx gxlx = gxlxService.getById(id);
if (gxlx == null) {
return Result.error("未找到对应数据");
}
return Result.OK(gxlx);
}
/**
* 导出excel
*
* @param request
* @param gxlx
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Gxlx gxlx) {
return super.exportXls(request, gxlx, Gxlx.class, "关系类型");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Gxlx.class);
}
}

@ -1,260 +1,274 @@
package org.jeecg.modules.demo.mkgx.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
import org.jeecg.modules.demo.mkgx.service.IMkgxService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
import org.jeecg.modules.demo.mkgx.service.IMkgxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Description: 知识关系管理
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Api(tags="知识关系管理")
@Api(tags = "知识关系管理")
@RestController
@RequestMapping("/mkgx/mkgx")
@Slf4j
public class MkgxController extends JeecgController<Mkgx, IMkgxService> {
@Autowired
private IMkgxService mkgxService;
/**
* 分页列表查询
*
* @param mkgx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "知识关系管理-分页列表查询")
@ApiOperation(value="知识关系管理-分页列表查询", notes="知识关系管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Mkgx mkgx,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Mkgx> queryWrapper = QueryGenerator.initQueryWrapper(mkgx, req.getParameterMap());
Page<Mkgx> page = new Page<Mkgx>(pageNo, pageSize);
IPage<Mkgx> pageList = mkgxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param mkgx
* @return
*/
@AutoLog(value = "知识关系管理-添加")
@ApiOperation(value="知识关系管理-添加", notes="知识关系管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Mkgx mkgx) {
if (mkgx.getQianmk().equals("1")){
if (mkgx.getHoumk().equals("2") || mkgx.getHoumk().equals("5")){
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("2")){
if (mkgx.getHoumk().equals("3") || mkgx.getHoumk().equals("5")){
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
@Autowired
private IMkgxService mkgxService;
if (mkgx.getQianmk().equals("3")){
if (mkgx.getHoumk().equals("4") || mkgx.getHoumk().equals("5")){
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
/**
* 分页列表查询
*
* @param mkgx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "知识关系管理-分页列表查询")
@ApiOperation(value = "知识关系管理-分页列表查询", notes = "知识关系管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Mkgx mkgx,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Mkgx> queryWrapper = QueryGenerator.initQueryWrapper(mkgx, req.getParameterMap());
Page<Mkgx> page = new Page<Mkgx>(pageNo, pageSize);
IPage<Mkgx> pageList = mkgxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param mkgx
* @return
*/
@AutoLog(value = "知识关系管理-添加")
@ApiOperation(value = "知识关系管理-添加", notes = "知识关系管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Mkgx mkgx) {
LambdaQueryWrapper<Mkgx> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Mkgx::getQianmk, mkgx.getQianmk())
.eq(Mkgx::getHoumk, mkgx.getHoumk());
int count = mkgxService.count(wrapper);
if (count > 0) {
return Result.error("已存在对应关系无法添加新的关系!!");
}
if (mkgx.getQianmk().equals("1")) {
if (mkgx.getHoumk().equals("2") || mkgx.getHoumk().equals("5")) {
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("5")){
if ( mkgx.getHoumk().equals("5")){
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("2")) {
if (mkgx.getHoumk().equals("3") || mkgx.getHoumk().equals("5")) {
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
else {
return Result.error("请注意正确的逻辑规则!!");
}
if (mkgx.getQianmk().equals("3")) {
if (mkgx.getHoumk().equals("4") || mkgx.getHoumk().equals("5")) {
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("4")) {
if (mkgx.getHoumk().equals("5")) {
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
}
/**
* 编辑
*
* @param mkgx
* @return
*/
@AutoLog(value = "知识关系管理-编辑")
@ApiOperation(value="知识关系管理-编辑", notes="知识关系管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Mkgx mkgx) {
if (mkgx.getQianmk().equals("1")){
if (mkgx.getHoumk().equals("2") || mkgx.getHoumk().equals("5")){
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("5")) {
if (mkgx.getHoumk().equals("5")) {
mkgxService.save(mkgx);
return Result.OK("添加成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("2")){
if (mkgx.getHoumk().equals("3") || mkgx.getHoumk().equals("5")){
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
/**
* 编辑
*
* @param mkgx
* @return
*/
@AutoLog(value = "知识关系管理-编辑")
@ApiOperation(value = "知识关系管理-编辑", notes = "知识关系管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Mkgx mkgx) {
LambdaQueryWrapper<Mkgx> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Mkgx::getQianmk, mkgx.getQianmk())
.eq(Mkgx::getHoumk, mkgx.getHoumk());
int count = mkgxService.count(wrapper);
if (count > 0) {
return Result.error("此关系已存在!!");
}
if (mkgx.getQianmk().equals("1")) {
if (mkgx.getHoumk().equals("2") || mkgx.getHoumk().equals("5")) {
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("2")) {
if (mkgx.getHoumk().equals("3") || mkgx.getHoumk().equals("5")) {
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("3")){
if (mkgx.getHoumk().equals("4") || mkgx.getHoumk().equals("5")){
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("3")) {
if (mkgx.getHoumk().equals("4") || mkgx.getHoumk().equals("5")) {
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("4")) {
if (mkgx.getHoumk().equals("5")) {
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("5")){
if ( mkgx.getHoumk().equals("5")){
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
}
if (mkgx.getQianmk().equals("5")) {
if (mkgx.getHoumk().equals("5")) {
mkgxService.updateById(mkgx);
return Result.OK("编辑成功!");
} else {
return Result.error("请注意正确的逻辑规则!!");
}
} else {
return Result.error("请注意正确的逻辑规则!!");
}
else {
return Result.error("请注意正确的逻辑规则!!");
}
}
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "知识关系管理-通过id删除")
@ApiOperation(value="知识关系管理-通过id删除", notes="知识关系管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
mkgxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "知识关系管理-批量删除")
@ApiOperation(value="知识关系管理-批量删除", notes="知识关系管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.mkgxService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "知识关系管理-通过id查询")
@ApiOperation(value="知识关系管理-通过id查询", notes="知识关系管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Mkgx mkgx = mkgxService.getById(id);
if(mkgx==null) {
return Result.error("未找到对应数据");
}
return Result.OK(mkgx);
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "知识关系管理-通过id删除")
@ApiOperation(value = "知识关系管理-通过id删除", notes = "知识关系管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String
id) {
mkgxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 导出excel
*
* @param request
* @param mkgx
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Mkgx mkgx) {
return super.exportXls(request, mkgx, Mkgx.class, "知识关系管理");
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "知识关系管理-批量删除")
@ApiOperation(value = "知识关系管理-批量删除", notes = "知识关系管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch
(@RequestParam(name = "ids", required = true) String ids) {
String[] split = ids.split(",");
for (String id : split) {
Result<?> delete = this.delete(id);
if (delete.getCode() != 200) {
return Result.error("批量删除失败");
}
}
return Result.OK("批量删除成功!");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Mkgx.class);
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "知识关系管理-通过id查询")
@ApiOperation(value = "知识关系管理-通过id查询", notes = "知识关系管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById
(@RequestParam(name = "id", required = true) String id) {
Mkgx mkgx = mkgxService.getById(id);
if (mkgx == null) {
return Result.error("未找到对应数据");
}
return Result.OK(mkgx);
}
/**
* 导出excel
*
* @param request
* @param mkgx
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Mkgx mkgx) {
return super.exportXls(request, mkgx, Mkgx.class, "知识关系管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest
request, HttpServletResponse response) {
return super.importExcel(request, response, Mkgx.class);
}
}

@ -1,15 +1,25 @@
package org.jeecg.modules.demo.mkgx.service;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
/**
* @Description: 知识关系管理
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
public interface IMkgxService extends IService<Mkgx> {
/**
* 根据前后知识点查询两者之间的
*
* @param q
* @param h h
* @return {@link String}
*/
Mkgx queryMkgxByQH(String q, String h);
}

@ -1,20 +1,35 @@
package org.jeecg.modules.demo.mkgx.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
import org.jeecg.modules.demo.mkgx.mapper.MkgxMapper;
import org.jeecg.modules.demo.mkgx.service.IMkgxService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 知识关系管理
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Service
public class MkgxServiceImpl extends ServiceImpl<MkgxMapper, Mkgx> implements IMkgxService {
/**
* 根据前后知识点查询模块之间关系的类型值
*
* @param q 前模块
* @param h 后模块
* @return {@link String}
*/
@Override
public Mkgx queryMkgxByQH(String q, String h) {
LambdaQueryWrapper<Mkgx> mkgxWrapper = new LambdaQueryWrapper<>();
mkgxWrapper.eq(Mkgx::getQianmk, q)
.eq(Mkgx::getHoumk, h)
.last("limit 1");
return this.getOne(mkgxWrapper);
}
}

@ -1,16 +1,21 @@
package org.jeecg.modules.demo.rulex.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 规则管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Date: 2023-04-10
* @Version: V1.0
*/
public interface IRulexService extends IService<Rulex> {
Result<?> sort(String id);
Result<?> sort(String id);
List<Rulex> queryRuleListByFunctionId(Functionx functionx);
}

@ -1,6 +1,8 @@
package org.jeecg.modules.demo.rulex.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.mapper.RulexMapper;
import org.jeecg.modules.demo.rulex.service.IRulexService;
@ -9,31 +11,47 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 规则管理
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Date: 2023-04-10
* @Version: V1.0
*/
@Service
public class RulexServiceImpl extends ServiceImpl<RulexMapper, Rulex> implements IRulexService {
@Autowired
RulexMapper rulexMapper;
@Override
public Result<?> sort(String id) {
String sort=rulexMapper.sort(id);
String functioncode=rulexMapper.find(id);
if(sort==null){
return Result.OK("001"+functioncode);
}else{
int i = Integer.parseInt(sort);
i++;
String s = Integer.toString(i);
while(s.length()<3){
s="0"+s;
}
return Result.OK(s+functioncode);
}
@Autowired
RulexMapper rulexMapper;
@Override
public Result<?> sort(String id) {
String sort = rulexMapper.sort(id);
String functioncode = rulexMapper.find(id);
if (sort == null) {
return Result.OK("001" + functioncode);
} else {
int i = Integer.parseInt(sort);
i++;
String s = Integer.toString(i);
while (s.length() < 3) {
s = "0" + s;
}
return Result.OK(s + functioncode);
}
}
/**
* 根据功能id查询对应的规则
*
* @param functionx functionx
* @return {@link List}<{@link Rulex}>
*/
@Override
public List<Rulex> queryRuleListByFunctionId(Functionx functionx) {
LambdaQueryWrapper<Rulex> ruleWrapper = new LambdaQueryWrapper<>();
ruleWrapper.eq(Rulex::getFunctionId, functionx.getId());
return this.list(ruleWrapper);
}
}

@ -1,171 +1,201 @@
package org.jeecg.modules.demo.tppronext.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.tppronext.entity.Tppronext;
import org.jeecg.modules.demo.tppronext.service.ITppronextService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.tppronext.entity.Tppronext;
import org.jeecg.modules.demo.tppronext.service.ITppronextService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 知识点管理
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Api(tags="知识点管理")
@Api(tags = "知识点管理")
@RestController
@RequestMapping("/tppronext/tppronext")
@Slf4j
public class TppronextController extends JeecgController<Tppronext, ITppronextService> {
@Autowired
private ITppronextService tppronextService;
/**
* 分页列表查询
*
* @param tppronext
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "知识点管理-分页列表查询")
@ApiOperation(value="知识点管理-分页列表查询", notes="知识点管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Tppronext tppronext,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Tppronext> queryWrapper = QueryGenerator.initQueryWrapper(tppronext, req.getParameterMap());
Page<Tppronext> page = new Page<Tppronext>(pageNo, pageSize);
IPage<Tppronext> pageList = tppronextService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param tppronext
* @return
*/
@AutoLog(value = "知识点管理-添加")
@ApiOperation(value="知识点管理-添加", notes="知识点管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Tppronext tppronext) {
tppronextService.save(tppronext);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param tppronext
* @return
*/
@AutoLog(value = "知识点管理-编辑")
@ApiOperation(value="知识点管理-编辑", notes="知识点管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Tppronext tppronext) {
tppronextService.updateById(tppronext);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "知识点管理-通过id删除")
@ApiOperation(value="知识点管理-通过id删除", notes="知识点管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
tppronextService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "知识点管理-批量删除")
@ApiOperation(value="知识点管理-批量删除", notes="知识点管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.tppronextService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "知识点管理-通过id查询")
@ApiOperation(value="知识点管理-通过id查询", notes="知识点管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Tppronext tppronext = tppronextService.getById(id);
if(tppronext==null) {
return Result.error("未找到对应数据");
}
return Result.OK(tppronext);
}
@Autowired
private ITppronextService tppronextService;
/**
* 导出excel
*
* @param request
* @param tppronext
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Tppronext tppronext) {
return super.exportXls(request, tppronext, Tppronext.class, "知识点管理");
}
/**
* 分页列表查询
*
* @param tppronext
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "知识点管理-分页列表查询")
@ApiOperation(value = "知识点管理-分页列表查询", notes = "知识点管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Tppronext tppronext,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Tppronext> queryWrapper = QueryGenerator.initQueryWrapper(tppronext, req.getParameterMap());
Page<Tppronext> page = new Page<Tppronext>(pageNo, pageSize);
IPage<Tppronext> pageList = tppronextService.page(page, queryWrapper);
pageList.getRecords().forEach(item -> {
switch (item.getQianly()) {
case "1": {
item.setQianly("项目");
break;
}
case "2": {
item.setQianly("模块");
break;
}
case "3": {
item.setQianly("功能");
break;
}
case "4": {
item.setQianly("规则");
break;
}
case "5": {
item.setQianly("技能点");
break;
}
}
switch (item.getHouly()) {
case "1": {
item.setHouly("项目");
break;
}
case "2": {
item.setHouly("模块");
break;
}
case "3": {
item.setHouly("功能");
break;
}
case "4": {
item.setHouly("规则");
break;
}
case "5": {
item.setHouly("技能点");
break;
}
}
});
return Result.OK(pageList);
}
/**
* 添加
*
* @param tppronext
* @return
*/
@AutoLog(value = "知识点管理-添加")
@ApiOperation(value = "知识点管理-添加", notes = "知识点管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Tppronext tppronext) {
tppronextService.save(tppronext);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param tppronext
* @return
*/
@AutoLog(value = "知识点管理-编辑")
@ApiOperation(value = "知识点管理-编辑", notes = "知识点管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Tppronext tppronext) {
tppronextService.updateById(tppronext);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "知识点管理-通过id删除")
@ApiOperation(value = "知识点管理-通过id删除", notes = "知识点管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
tppronextService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Tppronext.class);
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "知识点管理-批量删除")
@ApiOperation(value = "知识点管理-批量删除", notes = "知识点管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.tppronextService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "知识点管理-通过id查询")
@ApiOperation(value = "知识点管理-通过id查询", notes = "知识点管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Tppronext tppronext = tppronextService.getById(id);
if (tppronext == null) {
return Result.error("未找到对应数据");
}
return Result.OK(tppronext);
}
/**
* 导出excel
*
* @param request
* @param tppronext
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Tppronext tppronext) {
return super.exportXls(request, tppronext, Tppronext.class, "知识点管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Tppronext.class);
}
}

@ -1,44 +1,117 @@
package org.jeecg.modules.demo.xmtp.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.demo.xmtp.entity.NodeName;
import org.jeecg.modules.demo.xmtp.entity.Xmtp;
import org.jeecg.modules.demo.gxlx.entity.Gxlx;
import org.jeecg.modules.demo.gxlx.service.IGxlxService;
import org.jeecg.modules.demo.xmtp.entity.*;
import org.jeecg.modules.demo.xmtp.service.IXmtpService;
import org.jeecg.modules.demo.xmtp.service.YTppronextService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Api(tags="项目图谱")
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@Api(tags = "项目图谱")
@RestController
@RequestMapping("/createtp/createtp")
@Slf4j
public class CreateTP {
@Autowired
private IXmtpService xmtpService;
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目图谱-通过id查询")
@ApiOperation(value="项目图谱-通过id查询", notes="项目图谱-通过id查询")
@GetMapping(value = "/maketupu")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
//NodeName是获取的知识点
/*NodeName nodenames = xmtpService.getnodenames();*/
return Result.OK("xmtp");
@Autowired
private IXmtpService xmtpService;
@Autowired
private YTppronextService tppronextService;
@Autowired
private IGxlxService gxlxService;
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目图谱-通过id查询")
@ApiOperation(value = "项目图谱-通过id查询", notes = "项目图谱-通过id查询")
@GetMapping(value = "/maketupu")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
//NodeName是获取的知识点
// NodeList是知识点关系
// 知识点集合
List<NodeName> knowledgeList = new ArrayList<>();
// 知识点关系集合
List<NodeList> knowledgeRelationshipList = new ArrayList<>();
// 根据中心知识点获取项目图谱
Xmtp xmtp = xmtpService.queryByCenterKnowledgeId(id);
// 从项目图谱中获取第一个知识点
NodeName centerNode = new NodeName();
// 图谱名称就是中心知识点的名称
centerNode.setName(xmtp.getTpname());
// 将中心知识点添加到知识点集合中
knowledgeList.add(centerNode);
// 根据中心知识点获取所有子知识点关系
LambdaQueryWrapper<Tppronext> tppronextWrapper = new LambdaQueryWrapper<>();
tppronextWrapper.eq(Tppronext::getZxpoint, id);
List<Tppronext> tppronexts = tppronextService.list(tppronextWrapper);
tppronexts.forEach(tppronext -> {
// 构建知识点
NodeName nodeName = new NodeName();
nodeName.setName(tppronext.getTemp2());
knowledgeList.add(nodeName);
// 构建知识点关系
NodeList nodeList = new NodeList();
nodeList.setSource(tppronext.getTemp1());
nodeList.setTarget(tppronext.getTemp2());
Gxlx gxlx = gxlxService.getById(tppronext.getZsdgx());
nodeList.setValue(gxlx.getWidle().toString());
knowledgeRelationshipList.add(nodeList);
});
/* getAllSubKnowledgePoint(centerNode,
knowledgeList,
knowledgeRelationshipList);*/
Set<NodeName> knowledgeSet = new HashSet<>(knowledgeList);
Set<NodeList> knowledgeRelationshipSet = new HashSet<>(knowledgeRelationshipList);
// 封装最终结果
Exports exports = new Exports();
exports.setNodes(new ArrayList<>(knowledgeSet));
exports.setLinks(new ArrayList<>(knowledgeRelationshipSet));
return Result.OK(exports);
}
/* private void getAllSubKnowledgePoint(NodeName node,
List<NodeName> nameList,
List<NodeList> relationshipList) {
//查询指定知识点的所有后知识点
List<Tppronext> tppronextList = tppronextService.querySubKnowledgePoints(node);
if (tppronextList.size() > 0) {
tppronextList.forEach(tppronext -> {
// 构建知识点
NodeName nodeName = new NodeName();
nodeName.setName(tppronext.getHoupoint());
nameList.add(nodeName);
// 构建知识点关系
NodeList nodeList = new NodeList();
nodeList.setSource(tppronext.getQianpoint());
nodeList.setTarget(tppronext.getHoupoint());
nodeList.setValue("1");
relationshipList.add(nodeList);
getAllSubKnowledgePoint(nodeName, nameList, relationshipList);
});
}
}*/
}

@ -1,172 +1,223 @@
package org.jeecg.modules.demo.xmtp.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.xmtp.entity.Xmtp;
import org.jeecg.modules.demo.xmtp.service.IXmtpService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.tppronext.entity.Tppronext;
import org.jeecg.modules.demo.tppronext.service.ITppronextService;
import org.jeecg.modules.demo.xmtp.entity.Xmtp;
import org.jeecg.modules.demo.xmtp.service.IXmtpService;
import org.jeecg.modules.projectx.entity.Projectx;
import org.jeecg.modules.projectx.service.IProjectxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @Description: 项目图谱
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Api(tags="项目图谱")
@Api(tags = "项目图谱")
@RestController
@RequestMapping("/xmtp/xmtp")
@Slf4j
public class XmtpController extends JeecgController<Xmtp, IXmtpService> {
@Autowired
private IXmtpService xmtpService;
/**
* 分页列表查询
*
* @param xmtp
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "项目图谱-分页列表查询")
@ApiOperation(value="项目图谱-分页列表查询", notes="项目图谱-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Xmtp xmtp,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Xmtp> queryWrapper = QueryGenerator.initQueryWrapper(xmtp, req.getParameterMap());
Page<Xmtp> page = new Page<Xmtp>(pageNo, pageSize);
IPage<Xmtp> pageList = xmtpService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param xmtp
* @return
*/
@AutoLog(value = "项目图谱-添加")
@ApiOperation(value="项目图谱-添加", notes="项目图谱-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Xmtp xmtp) {
xmtpService.save(xmtp);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param xmtp
* @return
*/
@AutoLog(value = "项目图谱-编辑")
@ApiOperation(value="项目图谱-编辑", notes="项目图谱-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Xmtp xmtp) {
xmtpService.updateById(xmtp);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "项目图谱-通过id删除")
@ApiOperation(value="项目图谱-通过id删除", notes="项目图谱-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
xmtpService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "项目图谱-批量删除")
@ApiOperation(value="项目图谱-批量删除", notes="项目图谱-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.xmtpService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目图谱-通过id查询")
@ApiOperation(value="项目图谱-通过id查询", notes="项目图谱-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
Xmtp xmtp = xmtpService.getById(id);
if(xmtp==null) {
return Result.error("未找到对应数据");
}
return Result.OK(xmtp);
}
/**
* 导出excel
*
* @param request
* @param xmtp
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Xmtp xmtp) {
return super.exportXls(request, xmtp, Xmtp.class, "项目图谱");
@Autowired
private IXmtpService xmtpService;
@Autowired
private IProjectxService projectxService;
@Autowired
private ITppronextService tppronextService;
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/**
* 分页列表查询
*
* @param xmtp
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "项目图谱-分页列表查询")
@ApiOperation(value = "项目图谱-分页列表查询", notes = "项目图谱-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Xmtp xmtp,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Xmtp> queryWrapper = QueryGenerator.initQueryWrapper(xmtp, req.getParameterMap());
Page<Xmtp> page = new Page<Xmtp>(pageNo, pageSize);
IPage<Xmtp> pageList = xmtpService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param projectx projectx
* @return {@link Result}<{@link ?}>
*/
@AutoLog(value = "项目图谱-添加")
@ApiOperation(value = "项目图谱-添加", notes = "项目图谱-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Projectx projectx) {
Projectx project = projectxService.getById(projectx.getId());
if (project == null) {
log.error("项目信息为空,导致无法添加");
return Result.error("添加失败");
}
Xmtp dbXmtp = xmtpService.queryByCenterKnowledgeId(project.getId());
if (dbXmtp != null) return Result.error("请勿重复添加图谱");
// 获取当前登录的用户
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 封装图谱信息
Xmtp xmtp = new Xmtp();
xmtp.setCreateBy(user.getUsername());
// 创建时间
xmtp.setCreateTime(new Date());
// 更新人
xmtp.setUpdateBy(user.getUsername());
// 更新时间
xmtp.setUpdateTime(new Date());
xmtp.setSysOrgCode("");
// 图谱名称--项目名称
xmtp.setTpname(project.getProjectName());
// 中心知识点--项目id
xmtp.setZxpoint(project.getId());
// 说明--项目说明
xmtp.setInfo(project.getPmDescribe());
// 保存图谱
boolean saveSubPointAndRelationship =
xmtpService.saveSubPointAndRelationship(xmtp);
if (saveSubPointAndRelationship) {
xmtpService.save(xmtp);
return Result.OK("添加成功!");
} else {
return Result.error("添加失败");
}
}
/**
* 编辑
*
* @param xmtp
* @return
*/
@AutoLog(value = "项目图谱-编辑")
@ApiOperation(value = "项目图谱-编辑", notes = "项目图谱-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Xmtp xmtp) {
xmtpService.updateById(xmtp);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "项目图谱-通过id删除")
@ApiOperation(value = "项目图谱-通过id删除", notes = "项目图谱-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
// 先删除该图谱对应的所有知识点
Xmtp xmtp = xmtpService.getById(id);
LambdaQueryWrapper<Tppronext> tppronextWrapper = new LambdaQueryWrapper<>();
tppronextWrapper.eq(Tppronext::getZxpoint, xmtp.getZxpoint());
int count = tppronextService.count(tppronextWrapper);
if (count > 1) {
boolean removeTpp = tppronextService.remove(tppronextWrapper);
if (!removeTpp) return Result.error("删除失败!");
}
// 再删除该图谱
boolean remove = xmtpService.removeById(id);
if (!remove) return Result.error("删除失败");
return Result.OK("删除成功");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Xmtp.class);
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "项目图谱-批量删除")
@ApiOperation(value = "项目图谱-批量删除", notes = "项目图谱-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
// 拿到所有图谱对应的id
String[] idList = ids.split(",");
// 开始删除
for (String id : idList) {
Result<?> delete = this.delete(id);
if (delete.getCode() != 200) {
return Result.error("批量删除失败");
}
}
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "项目图谱-通过id查询")
@ApiOperation(value = "项目图谱-通过id查询", notes = "项目图谱-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Xmtp xmtp = xmtpService.getById(id);
if (xmtp == null) {
return Result.error("未找到对应数据");
}
return Result.OK(xmtp);
}
/**
* 导出excel
*
* @param request
* @param xmtp
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Xmtp xmtp) {
return super.exportXls(request, xmtp, Xmtp.class, "项目图谱");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Xmtp.class);
}
}

@ -0,0 +1,117 @@
package org.jeecg.modules.demo.xmtp.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* @TableName gxlx
*/
@TableName(value ="gxlx")
@Data
public class Gxlx implements Serializable {
/**
*
*/
@TableId
private String id;
/**
* 创建人
*/
private String createBy;
/**
* 创建日期
*/
private Date createTime;
/**
* 更新人
*/
private String updateBy;
/**
* 更新日期
*/
private Date updateTime;
/**
* 所属部门
*/
private String sysOrgCode;
/**
* 关系名称
*/
private String gxname;
/**
* 权值
*/
private Double widle;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
Gxlx other = (Gxlx) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getSysOrgCode() == null ? other.getSysOrgCode() == null : this.getSysOrgCode().equals(other.getSysOrgCode()))
&& (this.getGxname() == null ? other.getGxname() == null : this.getGxname().equals(other.getGxname()))
&& (this.getWidle() == null ? other.getWidle() == null : this.getWidle().equals(other.getWidle()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getSysOrgCode() == null) ? 0 : getSysOrgCode().hashCode());
result = prime * result + ((getGxname() == null) ? 0 : getGxname().hashCode());
result = prime * result + ((getWidle() == null) ? 0 : getWidle().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", sysOrgCode=").append(sysOrgCode);
sb.append(", gxname=").append(gxname);
sb.append(", widle=").append(widle);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,125 @@
package org.jeecg.modules.demo.xmtp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
* @TableName skill_type
*/
@TableName(value ="skill_type")
@Data
public class SkillType implements Serializable {
/**
* 主键
*/
@TableId
private String id;
/**
* 类型名称
*/
private String typeName;
/**
* 父类型id
*/
private String supertypeId;
/**
* 描述
*/
private String skillDesc;
/**
* 图标
*/
private String skillIcon;
/**
* 创建人
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改人
*/
private String updateBy;
/**
* 修改时间
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
SkillType other = (SkillType) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTypeName() == null ? other.getTypeName() == null : this.getTypeName().equals(other.getTypeName()))
&& (this.getSupertypeId() == null ? other.getSupertypeId() == null : this.getSupertypeId().equals(other.getSupertypeId()))
&& (this.getSkillDesc() == null ? other.getSkillDesc() == null : this.getSkillDesc().equals(other.getSkillDesc()))
&& (this.getSkillIcon() == null ? other.getSkillIcon() == null : this.getSkillIcon().equals(other.getSkillIcon()))
&& (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
result = prime * result + ((getSupertypeId() == null) ? 0 : getSupertypeId().hashCode());
result = prime * result + ((getSkillDesc() == null) ? 0 : getSkillDesc().hashCode());
result = prime * result + ((getSkillIcon() == null) ? 0 : getSkillIcon().hashCode());
result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", typeName=").append(typeName);
sb.append(", supertypeId=").append(supertypeId);
sb.append(", skillDesc=").append(skillDesc);
sb.append(", skillIcon=").append(skillIcon);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,117 @@
package org.jeecg.modules.demo.xmtp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
*
* @TableName task_skill
*/
@TableName(value ="task_skill")
@Data
public class TaskSkill implements Serializable {
/**
*
*/
@TableId
private String id;
/**
* 技能点id
*/
private String skillId;
/**
* 任务类型
*/
private Integer taskType;
/**
* 任务id
*/
private String taskId;
/**
* 创建人
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改人
*/
private String updateBy;
/**
* 修改时间
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
TaskSkill other = (TaskSkill) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getSkillId() == null ? other.getSkillId() == null : this.getSkillId().equals(other.getSkillId()))
&& (this.getTaskType() == null ? other.getTaskType() == null : this.getTaskType().equals(other.getTaskType()))
&& (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
&& (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getSkillId() == null) ? 0 : getSkillId().hashCode());
result = prime * result + ((getTaskType() == null) ? 0 : getTaskType().hashCode());
result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", skillId=").append(skillId);
sb.append(", taskType=").append(taskType);
sb.append(", taskId=").append(taskId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,165 @@
package org.jeecg.modules.demo.xmtp.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* @TableName tppronext
*/
@TableName(value ="tppronext")
@Data
public class Tppronext implements Serializable {
/**
* 主键
*/
@TableId
private String id;
/**
* 创建人
*/
private String createBy;
/**
* 创建日期
*/
private Date createTime;
/**
* 更新人
*/
private String updateBy;
/**
* 更新日期
*/
private Date updateTime;
/**
* 所属部门
*/
private String sysOrgCode;
/**
* 中心知识点
*/
private String zxpoint;
/**
* 前知识点
*/
private String qianpoint;
/**
* 前知识点来源
*/
private String qianly;
/**
* 后知识点
*/
private String houpoint;
/**
* 后知识点来源
*/
private String houly;
/**
* 知识点关系类型
*/
private String zsdgx;
/**
* 前知识点
*/
private String temp1;
/**
* 后知识点
*/
private String temp2;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
Tppronext other = (Tppronext) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getSysOrgCode() == null ? other.getSysOrgCode() == null : this.getSysOrgCode().equals(other.getSysOrgCode()))
&& (this.getZxpoint() == null ? other.getZxpoint() == null : this.getZxpoint().equals(other.getZxpoint()))
&& (this.getQianpoint() == null ? other.getQianpoint() == null : this.getQianpoint().equals(other.getQianpoint()))
&& (this.getQianly() == null ? other.getQianly() == null : this.getQianly().equals(other.getQianly()))
&& (this.getHoupoint() == null ? other.getHoupoint() == null : this.getHoupoint().equals(other.getHoupoint()))
&& (this.getHouly() == null ? other.getHouly() == null : this.getHouly().equals(other.getHouly()))
&& (this.getZsdgx() == null ? other.getZsdgx() == null : this.getZsdgx().equals(other.getZsdgx()))
&& (this.getTemp1() == null ? other.getTemp1() == null : this.getTemp1().equals(other.getTemp1()))
&& (this.getTemp2() == null ? other.getTemp2() == null : this.getTemp2().equals(other.getTemp2()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getSysOrgCode() == null) ? 0 : getSysOrgCode().hashCode());
result = prime * result + ((getZxpoint() == null) ? 0 : getZxpoint().hashCode());
result = prime * result + ((getQianpoint() == null) ? 0 : getQianpoint().hashCode());
result = prime * result + ((getQianly() == null) ? 0 : getQianly().hashCode());
result = prime * result + ((getHoupoint() == null) ? 0 : getHoupoint().hashCode());
result = prime * result + ((getHouly() == null) ? 0 : getHouly().hashCode());
result = prime * result + ((getZsdgx() == null) ? 0 : getZsdgx().hashCode());
result = prime * result + ((getTemp1() == null) ? 0 : getTemp1().hashCode());
result = prime * result + ((getTemp2() == null) ? 0 : getTemp2().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", sysOrgCode=").append(sysOrgCode);
sb.append(", zxpoint=").append(zxpoint);
sb.append(", qianpoint=").append(qianpoint);
sb.append(", qianly=").append(qianly);
sb.append(", houpoint=").append(houpoint);
sb.append(", houly=").append(houly);
sb.append(", zsdgx=").append(zsdgx);
sb.append(", temp1=").append(temp1);
sb.append(", temp2=").append(temp2);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -1,72 +1,88 @@
package org.jeecg.modules.demo.xmtp.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 项目图谱
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Data
@TableName("xmtp")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="xmtp对象", description="项目图谱")
@ApiModel(value = "xmtp对象", description = "项目图谱")
public class Xmtp implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**图谱名称*/
@Excel(name = "图谱名称", width = 15)
@ApiModelProperty(value = "图谱名称")
private String tpname;
/**中心知识点*/
@Excel(name = "中心知识点", width = 15, dictTable = "projectx", dicText = "project_name", dicCode = "id")
@Dict(dictTable = "projectx", dicText = "project_name", dicCode = "id")
@ApiModelProperty(value = "中心知识点")
private String zxpoint;
/**说明*/
@Excel(name = "说明", width = 15)
@ApiModelProperty(value = "说明")
private String info;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**
* 图谱名称
*/
@Excel(name = "图谱名称", width = 15)
@ApiModelProperty(value = "图谱名称")
private String tpname;
/**
* 中心知识点
*/
@Excel(name = "中心知识点", width = 15, dictTable = "projectx", dicText = "project_name", dicCode = "id")
@Dict(dictTable = "projectx", dicText = "project_name", dicCode = "id")
@ApiModelProperty(value = "中心知识点")
private String zxpoint;
/**
* 说明
*/
@Excel(name = "说明", width = 15)
@ApiModelProperty(value = "说明")
private String info;
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.xmtp.mapper;
import org.jeecg.modules.demo.xmtp.entity.Gxlx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author You do
* @description 针对表gxlx的数据库操作Mapper
* @createDate 2023-06-30 15:57:18
* @Entity org.jeecg.modules.demo.xmtp.entity.Gxlx
*/
public interface YGxlxMapper extends BaseMapper<Gxlx> {
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.xmtp.mapper;
import org.jeecg.modules.demo.xmtp.entity.SkillType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author You do
* @description 针对表skill_type的数据库操作Mapper
* @createDate 2023-06-30 15:58:43
* @Entity org.jeecg.modules.demo.xmtp.entity.SkillType
*/
public interface YSkillTypeMapper extends BaseMapper<SkillType> {
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.xmtp.mapper;
import org.jeecg.modules.demo.xmtp.entity.TaskSkill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author You do
* @description 针对表task_skill的数据库操作Mapper
* @createDate 2023-06-30 15:56:39
* @Entity org.jeecg.modules.demo.xmtp.entity.TaskSkill
*/
public interface YTaskSkillMapper extends BaseMapper<TaskSkill> {
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.xmtp.mapper;
import org.jeecg.modules.demo.xmtp.entity.Tppronext;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author You do
* @description 针对表tppronext的数据库操作Mapper
* @createDate 2023-06-30 15:56:07
* @Entity org.jeecg.modules.demo.xmtp.entity.Tppronext
*/
public interface YTppronextMapper extends BaseMapper<Tppronext> {
}

@ -3,13 +3,22 @@ package org.jeecg.modules.demo.xmtp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.xmtp.entity.Xmtp;
import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.projectx.entity.Projectx;
import java.util.List;
/**
* @Description: 项目图谱
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
public interface IXmtpService extends IService<Xmtp> {
Xmtp queryByCenterKnowledgeId(String id);
boolean saveSubPointAndRelationship(Xmtp xmtp);
List<Modulex> queryModuleListByTpProjectId(Projectx projectx);
}

@ -0,0 +1,13 @@
package org.jeecg.modules.demo.xmtp.service;
import org.jeecg.modules.demo.xmtp.entity.TaskSkill;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author You do
* @description 针对表task_skill的数据库操作Service
* @createDate 2023-06-30 15:56:39
*/
public interface TaskSkillService extends IService<TaskSkill> {
}

@ -0,0 +1,13 @@
package org.jeecg.modules.demo.xmtp.service;
import org.jeecg.modules.demo.xmtp.entity.Gxlx;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author You do
* @description 针对表gxlx的数据库操作Service
* @createDate 2023-06-30 15:57:18
*/
public interface YGxlxService extends IService<Gxlx> {
}

@ -0,0 +1,13 @@
package org.jeecg.modules.demo.xmtp.service;
import org.jeecg.modules.demo.xmtp.entity.SkillType;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author You do
* @description 针对表skill_type的数据库操作Service
* @createDate 2023-06-30 15:58:43
*/
public interface YSkillTypeService extends IService<SkillType> {
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.xmtp.service;
import org.jeecg.modules.demo.xmtp.entity.NodeName;
import org.jeecg.modules.demo.xmtp.entity.Tppronext;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @author You do
* @description 针对表tppronext的数据库操作Service
* @createDate 2023-06-30 15:56:07
*/
public interface YTppronextService extends IService<Tppronext> {
List<Tppronext> querySubKnowledgePoints(NodeName centerNode);
}

@ -1,20 +1,376 @@
package org.jeecg.modules.demo.xmtp.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.functionx.entity.Functionx;
import org.jeecg.modules.demo.functionx.service.IFunctionxService;
import org.jeecg.modules.demo.gxlx.entity.Gxlx;
import org.jeecg.modules.demo.gxlx.service.IGxlxService;
import org.jeecg.modules.demo.mkgx.entity.Mkgx;
import org.jeecg.modules.demo.mkgx.service.IMkgxService;
import org.jeecg.modules.demo.rulex.entity.Rulex;
import org.jeecg.modules.demo.rulex.service.IRulexService;
import org.jeecg.modules.demo.tppronext.entity.Tppronext;
import org.jeecg.modules.demo.tppronext.service.ITppronextService;
import org.jeecg.modules.demo.xmtp.entity.Xmtp;
import org.jeecg.modules.demo.xmtp.mapper.XmtpMapper;
import org.jeecg.modules.demo.xmtp.service.IXmtpService;
import org.jeecg.modules.modulex.entity.Modulex;
import org.jeecg.modules.modulex.service.IModulexService;
import org.jeecg.modules.projectx.entity.Projectx;
import org.jeecg.modules.projectx.service.IProjectxService;
import org.jeecg.modules.skillPoints.entity.SkillPoints;
import org.jeecg.modules.skillPoints.service.ISkillPointsService;
import org.jeecg.modules.taskSkill.entity.TaskSkill;
import org.jeecg.modules.taskSkill.service.ITaskSkillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @Description: 项目图谱
* @Author: jeecg-boot
* @Date: 2023-05-09
* @Date: 2023-05-09
* @Version: V1.0
*/
@Service
public class XmtpServiceImpl extends ServiceImpl<XmtpMapper, Xmtp> implements IXmtpService {
@Autowired
private IProjectxService projectxService;
@Autowired
private IModulexService modulexService;
@Autowired
private ITppronextService tppronextService;
@Autowired
private IMkgxService mkgxService;
@Autowired
private IFunctionxService functionxService;
@Autowired
private IRulexService rulexService;
@Autowired
private ITaskSkillService taskSkillService;
@Autowired
private ISkillPointsService skillPointsService;
@Autowired
private IGxlxService gxlxService;
/**
* 根据中心知识点查询图谱信息
*
* @param id id
* @return {@link Xmtp}
*/
@Override
public Xmtp queryByCenterKnowledgeId(String id) {
LambdaQueryWrapper<Xmtp> xmtpWrapper = new LambdaQueryWrapper<>();
xmtpWrapper.eq(Xmtp::getZxpoint, id).last("limit 1");
return this.getOne(xmtpWrapper);
}
/**
* 保存所有子级关系
*
* @param xmtp xmtp
* @return boolean
*/
@Override
@Transactional
public boolean saveSubPointAndRelationship(Xmtp xmtp) {
// 获取图谱对应的项目
Projectx project = projectxService.getById(xmtp.getZxpoint());
// 获取当前登录的用户
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// 知识点关系
Tppronext tppronext = new Tppronext();
// 创建人
tppronext.setCreateBy(user.getUsername());
// 创建时间
tppronext.setCreateTime(new Date());
// 更新人
tppronext.setUpdateBy(user.getUsername());
// 更新时间
tppronext.setUpdateTime(new Date());
// 中心知识点--项目id
tppronext.setZxpoint(xmtp.getZxpoint());
// 开始封装所有子级关系
// 保存项目与技能点之间的关系
boolean point = saveSkillPoint(project, 1, tppronext);
if (!point) return false;
return this.savePMTppronext(project, tppronext);
}
private boolean savePMTppronext(Projectx projectx, Tppronext tppronext) {
// 查询该图谱对应项目的所有的子模块
List<Modulex> moduleList = this.queryModuleListByTpProjectId(projectx);
// 封装项目与模块之间的信息
for (Modulex module : moduleList) {
// 关系id
tppronext.setId(null);
// 所属部门
tppronext.setSysOrgCode("");
// 前知识点--项目模块之间的前知识点是项目
tppronext.setQianpoint(projectx.getId());
// 前知识点来源--项目模块之间的前知识点来源是项目,项目在知识关系管理中对应的值为 1
tppronext.setQianly("1");
// 后知识点--项目模块之间的后知识点是模块
tppronext.setHoupoint(module.getId());
// 后知识点来源--项目与模块之间的后知识点来源是模块,模块在知识点关系管理中对应的值为 2
tppronext.setHouly("2");
// 项目与模块之间的知识点关系
if (setGxlx(tppronext)) {
log.error("关系类型设置失败",
new RuntimeException("关系类型设置失败"));
return false;
}
// 设置前后知识点名称
tppronext.setTemp1(projectx.getProjectName());
tppronext.setTemp2(module.getModuleName());
// 保存项目与模块之间的关系
boolean save = tppronextService.save(tppronext);
if (!save) {
log.error("保存模块与功能之间的关系失败",
new RuntimeException("保存模块与功能之间的关系失败"));
return false;
}
// 保存模块与技能点之间的关系
boolean point = this.saveSkillPoint(module, 2, tppronext);
if (!point) return false;
// 保存模块与功能之间的关系
boolean saveMFTppronext = this.saveMFTppronext(module, tppronext);
if (!saveMFTppronext) return false;
}
return true;
}
/**
* 设置关系类型
*
* @param tppronext tppronext
* @return boolean
*/
private boolean setGxlx(Tppronext tppronext) throws RuntimeException {
Mkgx mkgx = mkgxService.queryMkgxByQH(tppronext.getQianly(),
tppronext.getHouly());
if (mkgx == null) {
log.error("模块关系不存在", new RuntimeException("模块关系不存在"));
return true;
}
Gxlx gxlx = gxlxService.getById(mkgx.getGxlx());
if (gxlx == null) {
log.error("关系类型不存在", new RuntimeException("关系类型不存在"));
return true;
}
tppronext.setZsdgx(gxlx.getId());
return false;
}
/**
* 保存模块与功能之间的关系
*
* @param module 模块
* @param tppronext tppronext
* @throws RuntimeException 运行时异常
*/
private boolean saveMFTppronext(Modulex module, Tppronext tppronext)
throws RuntimeException {
// 查询模块下所有的功能
List<Functionx> functionList =
functionxService.queryFunctionListByModuleId(module);
// 封装模块与功能之间的关系
for (Functionx function : functionList) {
// 关系id
tppronext.setId(null);
// 所属部门
tppronext.setSysOrgCode("");
// 前知识点--模块与功能之间的前知识点是模块
tppronext.setQianpoint(module.getId());
// 前知识点来源--模块与功能之间的前知识点来源是模块,模块在知识关系管理中对应的值为 2
tppronext.setQianly("2");
// 后知识点--模块与功能之间的后知识点是功能
tppronext.setHoupoint(function.getId());
// 后知识点来源--项目与模块之间的后知识点来源是模块,模块在知识点关系管理中对应的值为 3
tppronext.setHouly("3");
// 模块与功能之间的知识点关系
if (setGxlx(tppronext)) return false;
// 设置前后知识点名称
tppronext.setTemp1(module.getModuleName());
tppronext.setTemp2(function.getFunctionName());
// 保存模块与功能之间的关系
boolean saved = tppronextService.save(tppronext);
if (!saved) {
log.error("保存模块与功能之间的关系失败",
new RuntimeException("保存模块与功能之间的关系失败"));
return false;
}
// 保存功能与技能点之间的关系
boolean point = this.saveSkillPoint(function, 3, tppronext);
if (!point) return false;
// 保存功能与规则之间的关系
boolean saveFRTppronext = this.saveFRTppronext(function, tppronext);
if (!saveFRTppronext) return false;
}
return true;
}
/**
* 保存功能与规则之间的关系
*
* @param functionx functionx
* @param tppronext tppronext
*/
private boolean saveFRTppronext(Functionx functionx, Tppronext tppronext)
throws RuntimeException {
// 查询功能下的所有规则
List<Rulex> rulexList = rulexService.queryRuleListByFunctionId(functionx);
// 封装功能与规则之间的关系
for (Rulex rule : rulexList) {
// 关系id
tppronext.setId(null);
// 所属部门
tppronext.setSysOrgCode("");
// 前知识点--功能与规则之间的前知识点是功能
tppronext.setQianpoint(functionx.getId());
// 前知识点来源--功能与规则之间的前知识点来源是功能,功能在知识关系管理中对应的值为 3
tppronext.setQianly("3");
// 后知识点--功能与规则之间的后知识点是规则
tppronext.setHoupoint(rule.getId());
// 后知识点来源--功能与规则之间的后知识点来源是模块,规则在知识点关系管理中对应的值为 4
tppronext.setHouly("4");
// 功能与规则之间的知识点关系
if (setGxlx(tppronext)) return false;
// 设置前后知识点名称
tppronext.setTemp1(functionx.getFunctionName());
tppronext.setTemp2(rule.getRuleCode());
// 保存功能与规则之间的关系
boolean saved = tppronextService.save(tppronext);
if (!saved) {
log.error("保存功能与规则之间的关系失败",
new RuntimeException("保存功能与规则之间的关系失败"));
return false;
}
// 保存规则与技能点之间的关系
boolean point = saveSkillPoint(rule, 4, tppronext);
if (!point) return false;
}
return true;
}
private boolean saveSkillPoint(Object object, Integer type, Tppronext tppronext) {
// 创建技能点查询构造器
LambdaQueryWrapper<TaskSkill> taskSkillWrapper = new LambdaQueryWrapper<>();
// 根据类型判断属于那一部分的技能点
switch (type) {
case 1: {
// 项目技能点
Projectx projectx = (Projectx) object;
taskSkillWrapper.eq(TaskSkill::getTaskId, projectx.getId());
// 前知识点来源是项目则值为1
tppronext.setQianly("1");
tppronext.setQianpoint(projectx.getId());
// 设置前知识点名称
tppronext.setTemp1(projectx.getProjectName());
break;
}
case 2: {
// 模块技能点
Modulex modulex = (Modulex) object;
taskSkillWrapper.eq(TaskSkill::getTaskId, modulex.getId());
// 前知识点来源是模块则值为2
tppronext.setQianly("2");
tppronext.setQianpoint(modulex.getId());
// 设置前知识点名称
tppronext.setTemp1(modulex.getModuleName());
break;
}
case 3: {
// 功能技能点
Functionx functionx = (Functionx) object;
taskSkillWrapper.eq(TaskSkill::getTaskId, functionx.getId());
// 前知识点来源是功能则值为3
tppronext.setQianly("3");
tppronext.setQianpoint(functionx.getId());
// 设置前知识点名称
tppronext.setTemp1(functionx.getFunctionName());
break;
}
case 4: {
// 规则技能点
Rulex rulex = (Rulex) object;
taskSkillWrapper.eq(TaskSkill::getTaskId, rulex.getId());
// 前知识点来源是规则则值为4
tppronext.setQianly("4");
tppronext.setQianpoint(rulex.getId());
// 设置前知识点名称
tppronext.setTemp1(rulex.getRuleNo());
break;
}
case 5: {
// 前后知识点都是技能点
SkillPoints skillPoints = (SkillPoints) object;
taskSkillWrapper.eq(TaskSkill::getTaskId, skillPoints.getId());
tppronext.setQianly("5");
tppronext.setQianpoint(skillPoints.getId());
tppronext.setTemp1(skillPoints.getSkillName());
break;
}
}
// 拿到所有符合条件的任务技能点
List<TaskSkill> taskSkillList =
taskSkillService.list(taskSkillWrapper);
if (taskSkillList.size() == 0) return true;
// 拿到所有复合任务技能点的技能点id
List<String> skillPointIds = new ArrayList<>();
taskSkillList.forEach(taskSkill -> {
skillPointIds.add(taskSkill.getSkillId());
});
// 获取所有符合条件的技能点
List<SkillPoints> skillPoints = skillPointsService.listByIds(skillPointIds);
for (SkillPoints skillPoint : skillPoints) {
// 关系id
tppronext.setId(null);
// 后知识点为技能
tppronext.setHoupoint(skillPoint.getId());
// 后知识点来源为技能值为5
tppronext.setHouly("5");
// 与技能点之间的知识点关系
if (setGxlx(tppronext)) return false;
// 设置后知识点名称
tppronext.setTemp2(skillPoint.getSkillName());
boolean save = tppronextService.save(tppronext);
if (!save) {
log.error("保存技能点失败",
new RuntimeException("保存技能点失败"));
return false;
}
// 前后知识点都是技能点
boolean point = this.saveSkillPoint(skillPoint, 5, tppronext);
if (!point) return false;
}
return true;
}
@Override
public List<Modulex> queryModuleListByTpProjectId(Projectx projectx) {
// 查询图谱对应的项目下所有的模块
LambdaQueryWrapper<Modulex> moduleWrapper = new LambdaQueryWrapper<>();
moduleWrapper.eq(Modulex::getProjectId, projectx.getId());
return modulexService.list(moduleWrapper);
}
}

@ -0,0 +1,22 @@
package org.jeecg.modules.demo.xmtp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.xmtp.entity.Gxlx;
import org.jeecg.modules.demo.xmtp.mapper.YGxlxMapper;
import org.jeecg.modules.demo.xmtp.service.YGxlxService;
import org.springframework.stereotype.Service;
/**
* @author You do
* @description 针对表gxlx的数据库操作Service实现
* @createDate 2023-06-30 15:57:18
*/
@Service
public class YGxlxServiceImpl extends ServiceImpl<YGxlxMapper, Gxlx>
implements YGxlxService {
}

@ -0,0 +1,22 @@
package org.jeecg.modules.demo.xmtp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.xmtp.entity.SkillType;
import org.jeecg.modules.demo.xmtp.service.YSkillTypeService;
import org.jeecg.modules.demo.xmtp.mapper.YSkillTypeMapper;
import org.springframework.stereotype.Service;
/**
* @author You do
* @description 针对表skill_type的数据库操作Service实现
* @createDate 2023-06-30 15:58:43
*/
@Service
public class YSkillTypeServiceImpl extends ServiceImpl<YSkillTypeMapper, SkillType>
implements YSkillTypeService {
}

@ -0,0 +1,22 @@
package org.jeecg.modules.demo.xmtp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.xmtp.entity.TaskSkill;
import org.jeecg.modules.demo.xmtp.service.TaskSkillService;
import org.jeecg.modules.demo.xmtp.mapper.YTaskSkillMapper;
import org.springframework.stereotype.Service;
/**
* @author You do
* @description 针对表task_skill的数据库操作Service实现
* @createDate 2023-06-30 15:56:39
*/
@Service
public class YTaskSkillServiceImpl extends ServiceImpl<YTaskSkillMapper, TaskSkill>
implements TaskSkillService{
}

@ -0,0 +1,32 @@
package org.jeecg.modules.demo.xmtp.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.xmtp.entity.NodeName;
import org.jeecg.modules.demo.xmtp.entity.Tppronext;
import org.jeecg.modules.demo.xmtp.service.YTppronextService;
import org.jeecg.modules.demo.xmtp.mapper.YTppronextMapper;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author You do
* @description 针对表tppronext的数据库操作Service实现
* @createDate 2023-06-30 15:56:07
*/
@Service
public class YTppronextServiceImpl extends ServiceImpl<YTppronextMapper, Tppronext>
implements YTppronextService {
@Override
public List<Tppronext> querySubKnowledgePoints(NodeName centerNode) {
LambdaQueryWrapper<Tppronext> tppronextWrapper = new LambdaQueryWrapper<>();
tppronextWrapper.eq(Tppronext::getQianpoint, centerNode.getName());
return this.list(tppronextWrapper);
}
}

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.xmtp.mapper.SkillPointsMapper">
<resultMap id="BaseResultMap" type="org.jeecg.modules.demo.xmtp.entity.SkillPoints">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="skillCode" column="skill_code" jdbcType="VARCHAR"/>
<result property="skillType" column="skill_type" jdbcType="VARCHAR"/>
<result property="skillName" column="skill_name" jdbcType="VARCHAR"/>
<result property="skillLevel" column="skill_level" jdbcType="INTEGER"/>
<result property="skillDesc" column="skill_desc" jdbcType="VARCHAR"/>
<result property="skillIcon" column="skill_icon" jdbcType="VARCHAR"/>
<result property="skillPic" column="skill_pic" jdbcType="VARCHAR"/>
<result property="skillStatus" column="skill_status" jdbcType="INTEGER"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,skill_code,skill_type,
skill_name,skill_level,skill_desc,
skill_icon,skill_pic,skill_status,
create_by,create_time,update_by,
update_time
</sql>
</mapper>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.xmtp.mapper.YGxlxMapper">
<resultMap id="BaseResultMap" type="org.jeecg.modules.demo.xmtp.entity.Gxlx">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="sysOrgCode" column="sys_org_code" jdbcType="VARCHAR"/>
<result property="gxname" column="gxname" jdbcType="VARCHAR"/>
<result property="widle" column="widle" jdbcType="DOUBLE"/>
</resultMap>
<sql id="Base_Column_List">
id,create_by,create_time,
update_by,update_time,sys_org_code,
gxname,widle
</sql>
</mapper>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.xmtp.mapper.YSkillTypeMapper">
<resultMap id="BaseResultMap" type="org.jeecg.modules.demo.xmtp.entity.SkillType">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="typeName" column="type_name" jdbcType="VARCHAR"/>
<result property="supertypeId" column="supertype_id" jdbcType="VARCHAR"/>
<result property="skillDesc" column="skill_desc" jdbcType="VARCHAR"/>
<result property="skillIcon" column="skill_icon" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,type_name,supertype_id,
skill_desc,skill_icon,create_by,
create_time,update_by,update_time
</sql>
</mapper>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.xmtp.mapper.YTaskSkillMapper">
<resultMap id="BaseResultMap" type="org.jeecg.modules.demo.xmtp.entity.TaskSkill">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="skillId" column="skill_id" jdbcType="VARCHAR"/>
<result property="taskType" column="task_type" jdbcType="INTEGER"/>
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,skill_id,task_type,
task_id,create_by,create_time,
update_by,update_time
</sql>
</mapper>

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.xmtp.mapper.YTppronextMapper">
<resultMap id="BaseResultMap" type="org.jeecg.modules.demo.xmtp.entity.Tppronext">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="sysOrgCode" column="sys_org_code" jdbcType="VARCHAR"/>
<result property="zxpoint" column="zxpoint" jdbcType="VARCHAR"/>
<result property="qianpoint" column="qianpoint" jdbcType="VARCHAR"/>
<result property="qianly" column="qianly" jdbcType="VARCHAR"/>
<result property="houpoint" column="houpoint" jdbcType="VARCHAR"/>
<result property="houly" column="houly" jdbcType="VARCHAR"/>
<result property="zsdgx" column="zsdgx" jdbcType="VARCHAR"/>
<result property="temp1" column="temp1" jdbcType="VARCHAR"/>
<result property="temp2" column="temp2" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,create_by,create_time,
update_by,update_time,sys_org_code,
zxpoint,qianpoint,qianly,
houpoint,houly,zsdgx,
temp1,temp2
</sql>
</mapper>
Loading…
Cancel
Save