parent
fbf97c8711
commit
82f4d9f92a
51 changed files with 4040 additions and 1030 deletions
@ -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> |
@ -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',//提示触发条件,mousemove鼠标移至触发,还有click点击触发 |
||||
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 : "", //系列名称,用于tooltip的显示,legend 的图例筛选,在 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, //线条的曲线程度,从0到1 |
||||
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
@ -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,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,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,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> { |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
@ -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); |
||||
} |
@ -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…
Reference in new issue