commit
This commit is contained in:
@@ -79,8 +79,19 @@ public class UpdateUnitController {
|
||||
// 从源数据中心拉取所有的单位
|
||||
// List<Sys_unit> units = SourceData.units();
|
||||
|
||||
Sys_unit unit = dao.fetch(Sys_unit.class, Cnd.where("unitcode", "=", "00000"));
|
||||
if(unit == null) {
|
||||
Sys_unit firstUnit = new Sys_unit();
|
||||
firstUnit.setId("00000");
|
||||
firstUnit.setName("河海大学");
|
||||
firstUnit.setUnitlevel(1);
|
||||
firstUnit.setUnitcode("00000");
|
||||
firstUnit.setHasChildren(true);
|
||||
dao.fastInsert(firstUnit);
|
||||
}
|
||||
|
||||
List<Record> depDbList = dao.query("dep_db", null);
|
||||
/* depDbList.forEach(v -> {
|
||||
depDbList.forEach(v -> {
|
||||
if (list.contains(v.getString("unitcode"))) {
|
||||
dao.update(Sys_unit.class, Chain.make("name", v.getString("unitname")).add("id", v.getString("unitcode")),
|
||||
Cnd.where("id", "=", v.getString("unitcode")));
|
||||
@@ -88,10 +99,12 @@ public class UpdateUnitController {
|
||||
Sys_unit insertUnit = new Sys_unit();
|
||||
insertUnit.setId(v.getString("unitcode"));
|
||||
insertUnit.setName(v.getString("unitname"));
|
||||
dao.insert(Sys_unit.class, Chain.from(insertUnit));
|
||||
insertUnit.setUnitcode(v.getString("unitcode"));
|
||||
insertUnit.setUnitlevel(2);
|
||||
insertUnit.setParentId("00000");
|
||||
dao.fastInsert(insertUnit);
|
||||
}
|
||||
});*/
|
||||
|
||||
});
|
||||
|
||||
/* for (Sys_unit unit : units) {
|
||||
if (list.contains(unit.getId())) { // 包含就修改
|
||||
@@ -181,7 +194,7 @@ public class UpdateUnitController {
|
||||
try {
|
||||
List list = new ArrayList();
|
||||
|
||||
Sys_unit school = sysUnitService.fetch("0");
|
||||
Sys_unit school = sysUnitService.fetch("00000");
|
||||
school.setChild(child(school.getId()));
|
||||
|
||||
list.add(school);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Sys_unit extends BaseModel implements Serializable {
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(els = {@EL("uuid()")})
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -100,7 +100,7 @@ layout("/layouts/platform.html"){
|
||||
<template>
|
||||
|
||||
<template>
|
||||
<el-row class="header navbar bg-white shadow">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
@@ -127,9 +127,9 @@ layout("/layouts/platform.html"){
|
||||
<!-- <el-button icon="el-icon-plus" @click="openAdd">新建单位</el-button>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-row class="el-table-container">
|
||||
<el-card shadow="never" class="mt10">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
v-loading="tabLoading" size="medium">
|
||||
<el-table-column align="center" :key="1" header-align="center" label="序号"
|
||||
@@ -190,19 +190,20 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
</template>
|
||||
@@ -539,4 +540,4 @@ layout("/layouts/platform.html"){
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user