.
74
pom.xml
@@ -73,8 +73,76 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- 拷贝所有依赖到指定目录 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/meta-kit/lib</outputDirectory>
|
||||
<overWriteReleases>false</overWriteReleases>
|
||||
<overWriteSnapshots>false</overWriteSnapshots>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${basedir}/target/meta-kit/</outputDirectory>
|
||||
<resources>
|
||||
<!-- 拷贝指定文件 -->
|
||||
<resource>
|
||||
<directory>${basedir}/</directory>
|
||||
<includes>
|
||||
<include>bin/**</include>
|
||||
<include>conf/**</include>
|
||||
<include>root/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-resources1</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${basedir}/target/meta-kit/lib</outputDirectory>
|
||||
<resources>
|
||||
<!-- 拷贝指定文件 -->
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources/</directory>
|
||||
<includes>
|
||||
<include>tpl/**</include>
|
||||
<include>META-INF/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- 指定到相对路径下-->
|
||||
<!--<plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
@@ -93,11 +161,11 @@
|
||||
<type>${project.packaging}</type>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<outputDirectory>libs</outputDirectory>
|
||||
<outputDirectory>${project.basedir}/target/meta-kit/lib</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>-->
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
@@ -6,13 +6,14 @@ const plat = {
|
||||
return red.getX('/plat/list', params)
|
||||
},
|
||||
platSave({plat}) {
|
||||
return red.postX('/plat/save', {plat})
|
||||
return red.postX('/plat/save', {plat:JSON.stringify(plat)})
|
||||
},
|
||||
|
||||
dbList(params) { // 数据源列表
|
||||
return red.getX('/plat/db_list', params)
|
||||
},
|
||||
dbSave({plat}) {
|
||||
// todo:解决重复点击保存出现的异常
|
||||
plat["url"] = escape(plat["url"])
|
||||
return red.postX('/plat/db_save', {plat: JSON.stringify(plat)})
|
||||
},
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
{name: "关于", url: "/single", nodes: [
|
||||
{url:"/single/about.html", name:"关于MetaKit", icon:"icon-server"},
|
||||
{url:"/single/code.html", name:"整体实现", icon:"icon-server"},
|
||||
{url:"/single/core.html", name:"组件关系", icon:"icon-server"},
|
||||
{url:"/single/metaFlow.html", name:"MetaKit使用", icon:"icon-server"},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
<h4 class="modal-title">功能概览</h4>
|
||||
<h4 class="modal-title">功能介绍</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div style="text-align: left">
|
||||
@@ -26,7 +26,8 @@
|
||||
对于关联表,只需要在MetaLink中建立关联即可,此处选择了业务主表后会自动查询所有已经关联关联的业务表,<br>
|
||||
然后便可以轻松配置 列表要展示,导出哪些字段,查询过滤条件用哪些表的哪些字段,等等。。
|
||||
</p>
|
||||
|
||||
<b>MetaService概念模型</b>
|
||||
<img src="../res/img/MetaService.png">
|
||||
|
||||
|
||||
</div>
|
||||
@@ -104,7 +105,7 @@
|
||||
<th>备注</th>-->
|
||||
</tr>
|
||||
<tr v-for="(item, index) in serviceDetail['tables'][sheet].items">
|
||||
<td v-show="status==3"><input type="checkbox" v-model="exportArr" :value="sheet + '$' + item.name"></td>
|
||||
<td v-show="status==3"><input type="checkbox" v-model="exportArr" :value="sheet + '$' + item.name"></t d>
|
||||
<td v-show="status==4"><input type="checkbox" v-model="serviceInfo.imports" :value="sheet + '$' + item.name"></td>
|
||||
<td v-show="status==5"><input type="checkbox" v-model="showFields" :value="sheet + '$' + item.name"></td>
|
||||
<td v-show="status==6"><input type="checkbox" v-model="filterArr" :value="sheet + '$' + item.name"></td>
|
||||
|
||||
@@ -211,7 +211,8 @@
|
||||
<a :class="[{hv: tableData[item]['hv']==1 }]" href="javascript:;" @click="tableName=item" data-target="#tab3Content1" data-toggle="tab" v-text="item"></a>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-show="ckTable && ckTable.length">已选择 <code v-text="ckTable.length||0"></code> 个实体待导入</p>
|
||||
<!-- v-show="ckTable && ckTable.length" -->
|
||||
<p >已选择 <code v-text="ckTable.length||0"></code> 个实体待导入,上面<code class="text-danger">红色</code> 部分已经导入过的数据表</p>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> Table-Detail</div>
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
<row class="meta-list">
|
||||
<div class="info">
|
||||
<a @click="showInfo()" href="javascript:;"><i class="icon icon-info"></i></a>
|
||||
</div>
|
||||
<!-- info -->
|
||||
<div class="modal fade" id="f-info">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
<h4 class="modal-title">MetaTable概念模型</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: center">
|
||||
<img src="../res/img/MetaTable.png">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="input-group list-head">
|
||||
<div class="pull-left">
|
||||
@@ -385,6 +406,9 @@
|
||||
},
|
||||
loadImportPage() {
|
||||
$("#main").load('/metadata/metatable/import.html')
|
||||
},
|
||||
showInfo() {
|
||||
$('#f-info').modal({moveable: true})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
数据平台:可以获取数据的平台(除java-method类型的qtask 实列都会对应绑定相应的数据平台)
|
||||
<b>DbPlat概念模型图</b>
|
||||
</p>
|
||||
<img src="../res/img/DbPlat概念图.png">
|
||||
<br><br><br>
|
||||
<p>
|
||||
数据平台:可以获取数据的平台{{/*(除java-method类型的qtask 实列都会对应绑定相应的数据平台)*/}}
|
||||
</p>
|
||||
<img src="../res/img/db_plat.png">
|
||||
</div>
|
||||
@@ -52,10 +57,10 @@
|
||||
v-html="field.fmt ? field.fmt(item[field.col]) : item[field.col]">
|
||||
</td>
|
||||
<td>
|
||||
<a @click="edit(item)" href="javascript:;">编辑</a> |
|
||||
<a @click="edit(item)" href="javascript:;">编辑</a><!-- |
|
||||
<a @click="update({status:1}, item)" v-show="item.status != 1" href="javascript:;">启用</a>
|
||||
<a @click="update({status:0}, item)" v-show="item.status == 1" href="javascript:;">不启用</a> |
|
||||
<a @click="update({status:-1}, item)" href="javascript:;">删除</a>
|
||||
<a @click="update({status:-1}, item)" href="javascript:;">删除</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
<tr v-for="item in list.rows">
|
||||
<td v-for="field in cfg.cols" v-title="item[field.col]" v-text="field.fmt ? field.fmt(item[field.col]) : item[field.col]"></td>
|
||||
<td>
|
||||
<a @click="edit(item)" href="javascript:;">编辑</a> |
|
||||
<a @click="edit(item)" href="javascript:;">编辑</a> <!-- |
|
||||
<a @click="update({status:1}, item)" v-show="item.status != 1" href="javascript:;">启用</a>
|
||||
<a @click="update({status:0}, item)" v-show="item.status == 1" href="javascript:;">不启用</a> |
|
||||
<a @click="update({status:-1}, item)" href="javascript:;">删除</a>
|
||||
<a @click="update({status:-1}, item)" href="javascript:;">删除</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
BIN
root/res/img/DbPlat概念图.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
root/res/img/MetaService.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
root/res/img/MetaTable.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
root/res/img/Table-Link-Service.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 7.8 KiB |
14
root/single/core.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<div id="about">
|
||||
<p>
|
||||
<b>核心组件关系</b>
|
||||
</p>
|
||||
<img src="../res/img/Table-Link-Service.png">
|
||||
</div>
|
||||
<script>
|
||||
var vm = new Vue({
|
||||
el: "#about",
|
||||
data: {
|
||||
about: "AbOUT",
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,7 +1,4 @@
|
||||
import net.tccn.base.FileKit;
|
||||
import net.tccn.base.Kv;
|
||||
import net.tccn.base.MetaKit;
|
||||
import net.tccn.base.TplKit;
|
||||
import net.tccn.base.*;
|
||||
import net.tccn.dbq.fbean.FBean;
|
||||
import net.tccn.dbq.jdbc.api.DbAccount;
|
||||
import net.tccn.dbq.jdbc.api.DbKit;
|
||||
@@ -11,6 +8,7 @@ import net.tccn.meta.MetaTable;
|
||||
import net.tccn.qtask.TaskEntity;
|
||||
import net.tccn.qtask.TaskKit;
|
||||
import net.tccn.user.User;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.junit.Test;
|
||||
import org.redkale.convert.json.JsonConvert;
|
||||
import org.redkale.source.CacheMemorySource;
|
||||
@@ -18,6 +16,7 @@ import org.redkale.util.TypeToken;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Date;
|
||||
@@ -314,4 +313,61 @@ public class RunTest<T> {
|
||||
|
||||
}
|
||||
|
||||
public List<Map> dbKitTest() {
|
||||
DbAccount dbAccount = new DbAccount();
|
||||
dbAccount.setCate("mysql");
|
||||
dbAccount.setUrl("jdbc:mysql://192.168.202.11:3306/gxbii_dev");
|
||||
dbAccount.setUser("root");
|
||||
dbAccount.setPwd("eversec123098");
|
||||
|
||||
DbKit dbKit = new DbKit(dbAccount);
|
||||
|
||||
String sql = "select platID,platDomain,platIP from basic_domain limit 10";
|
||||
String countSql = "select count(*) from basic_domain";
|
||||
|
||||
// find list
|
||||
List<Map> list = dbKit.findList(sql, Map.class);
|
||||
int total = dbKit.queryColumn(countSql, int.class);
|
||||
|
||||
System.out.println("总记录数:" + total);
|
||||
System.out.println(list);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
// 通用导出组件测试
|
||||
@Test
|
||||
public void exportTest() {
|
||||
List<Map> list = dbKitTest();
|
||||
|
||||
Kv kv = Kv.of("platID", "平台id")
|
||||
.set("platDomain", "平台域名").set("platIP", "平台IP");
|
||||
|
||||
try {
|
||||
Workbook workbook = ExcelKit.exportExcel(list, kv);
|
||||
|
||||
workbook.write(new FileOutputStream(new File("tmp/basic_domain.xls")));
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void switchTest() {
|
||||
String a = "2";
|
||||
switch (a){
|
||||
case "1":
|
||||
System.out.println(1);
|
||||
case "2":
|
||||
System.out.println(2);
|
||||
case "3":
|
||||
System.out.println(3);
|
||||
case "4":
|
||||
System.out.println(4);
|
||||
}
|
||||
System.out.println("end");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||