提交 c88b8fb1 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 2516ef5e
......@@ -12,4 +12,10 @@
width: 100%;
overflow: auto;
}
.font-class{
margin: 0px;
padding: 0px;
font-family: '微软雅黑','黑体','宋体';
font-size: 16px;
}
}
\ No newline at end of file
......@@ -2,47 +2,44 @@
<div class="app-data-upload-view">
<el-row :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">选取文件</el-button>
<el-button type="primary" @click="handleUpLoad">{{$t('info.selectfile')}}</el-button>
<input ref="inputUpLoad" type="file" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" @change="importFile"/>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="uploadServer">上传服务器</el-button>
<el-button type="primary" @click="uploadServer">{{$t('info.uploadserver')}}</el-button>
</el-col>
<el-col :span="16">
<div class="import-temp"><span style="cursor: pointer;" @click="downloadTemp">下载导入数据模板</span></div>
<div class="import-temp"><span style="cursor: pointer;" @click="downloadTemp">{{$t('info.datatemplate')}}</span></div>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height:calc(100% - 128px);padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0">
<template v-if="importDataArray.length >0 && isUploading === false">
<ul>
<li v-for="(item,index) in importDataArray" :key="index">
{{'数据标识为'+item[importUniqueItem]+'读取成功......'}}
<li v-for="(item,index) in importDataArray" :key="index" class="font-class">
{{$t('info.dataid')+item[importUniqueItem]+$t('info.read')+'......'}}
</li>
</ul>
</template>
<template v-if="importDataArray.length ==0">
{{uploadStatus === true?"导入中......":""}}
<template v-if="hasImported === true && importDataArray.length === 0">
<span class="font-class">{{isUploading === true?$t('info.importing')+"......":$t('info.completed')}}</span>
</template>
</div>
</el-row>
<el-row :gutter="20">
<el-col :span="4">
<el-row>
<!-- <el-col :span="4">
<div class="import-temp">
<span style="cursor: pointer;display: inline-block;" @click="downloadSuccessData">{{importSuccessData.length >0?"下载导入成功数据":""}}</span>
<div style="cursor: pointer;display: inline-block;" @click="downloadSuccessData">{{importSuccessData.length >0?"下载导入成功数据":""}}</div>
</div>
</el-col>
<el-col :span="4">
<div class="import-temp">
<span style="cursor: pointer;display: inline-block;" @click="downloadErrorData">{{importErrorData.length >0?"下载导入失败数据":""}}</span>
</div>
</el-col>
<el-col :span="2" :offset="11">
<el-button type="primary" @click="handleOK">确定</el-button>
</el-col>
<el-col :span="3" style="text-align: center;">
<el-button plain @click="handleCancel">取消</el-button>
</el-col> -->
<el-col :span="2" :offset="22">
<el-button type="primary" @click="handleOK">{{$t('info.confirm')}}</el-button>
</el-col>
</el-row>
</div>
......@@ -59,12 +56,32 @@ import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorat
messages: {
'zh-CN': {
info: {
"viewtitle":"应用数据导入视图"
"viewtitle":"应用数据导入视图",
"selectfile":"选取文件",
"uploadserver":"上传服务器",
"datatemplate":"下载导入数据模板",
"dataid":"数据标识为",
"read":"读取成功",
"importing":"导入中",
"completed":"导入完成",
"confirm":"确认",
"datatemp":"导入数据模板",
"importfailed":"导入失败"
}
},
'en-US': {
info: {
"viewtitle":"AppDataUploadView"
"viewtitle":"AppDataUploadView",
"selectfile":"Select File",
"uploadserver":"Upload Server",
"datatemplate":"Download Import Data Template",
"dataid":"Data ID is ",
"read":" read Successful",
"importing":"Importing",
"completed":"Import Completed",
"confirm":"OK",
"datatemp":"Data Template",
"importfailed":"Import Failed"
}
}
}
......@@ -137,6 +154,14 @@ export default class AppDataUploadView extends Vue {
*/
protected importId:string = "";
/**
* 是否已有导入数据
*
* @type {boolean}
* @memberof AppDataUploadView
*/
protected hasImported:boolean = false;
/**
* 导入数据识别项属性
*
......@@ -145,13 +170,21 @@ export default class AppDataUploadView extends Vue {
*/
protected importUniqueItem:string ="";
/**
* 提示信息
*
* @type {string}
* @memberof AppDataUploadView
*/
protected promptInfo:string ="";
/**
* 导入状态
*
* @type {boolean}
* @memberof AppDataUploadView
*/
protected uploadStatus:boolean = false;
protected isUploading:boolean = false;
/**
* 导入成功数据
......@@ -227,7 +260,6 @@ export default class AppDataUploadView extends Vue {
}
this.allFieldMap.set(item.headername,item);
});
console.log(this.allFieldMap);
//获取代码表值
this.allCodeList = await this.getChartAllCodeList();
}
......@@ -258,25 +290,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public downloadTemp(){
this.importExcel(this.viewparams.appDeLogicName+"导入数据模板",[]);
}
/**
* 下载导入成功数据
*
* @memberof AppDataUploadView
*/
public downloadSuccessData(){
this.importExcel(this.viewparams.appDeLogicName+"导入成功数据",this.importSuccessData);
}
/**
* 下载导入失败数据
*
* @memberof AppDataUploadView
*/
public downloadErrorData(){
this.importExcel(this.viewparams.appDeLogicName+"导入失败数据",this.importErrorData);
this.importExcel(this.viewparams.appDeLogicName+this.$t('info.datatemp'),[]);
}
/**
......@@ -285,6 +299,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public handleUpLoad(){
this.importSuccessData = [];
(this.$refs.inputUpLoad as any).click();
}
......@@ -299,20 +314,29 @@ export default class AppDataUploadView extends Vue {
}
let tempDataArray:Array<any> = [];
this.transformData(this.importDataArray,tempDataArray);
this.hasImported = true;
this.isUploading = true;
this.importDataArray = [];
this.uploadStatus = true;
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,data:tempDataArray}).then((res:any) =>{
console.log(res);
this.uploadStatus = false;
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('info.importfailed') as string);
this.isUploading = false;
return;
}
this.importSuccessData = result.data;
this.isUploading = false;
})
}).catch((error:any) =>{
this.uploadStatus = false;
this.isUploading = false;
this.promptInfo = (this.$t('info.importfailed') as string);
console.error(error);
})
}catch(error){
this.uploadStatus = false;
this.isUploading = false;
this.promptInfo = (this.$t('info.importfailed') as string);
console.error(error);
};
}
......@@ -346,16 +370,7 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public handleOK(){
this.$emit('viewdataschange',this.importSuccessData);
}
/**
* 取消
*
* @memberof AppDataUploadView
*/
public handleCancel(){
this.$emit('close',null);
this.$emit('close',this.importSuccessData);
}
/**
......
import ibzdictitem_en_US from '@locale/lanres/ibzdict-item/ibzdict-item_en_US';
import ibzdictitem_en_US from '@locale/lanres/ibzdictitem/ibzdictitem_en_US';
import ibzdict_en_US from '@locale/lanres/ibzdict/ibzdict_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
......
import ibzdictitem_zh_CN from '@locale/lanres/ibzdict-item/ibzdict-item_zh_CN';
import ibzdictitem_zh_CN from '@locale/lanres/ibzdictitem/ibzdictitem_zh_CN';
import ibzdict_zh_CN from '@locale/lanres/ibzdict/ibzdict_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
......
......@@ -7,5 +7,5 @@ import './login/login';
import './upload/upload';
// 实体级接口对象
import './entity/ibzdict-items/ibzdict-items';
import './entity/ibzdictitems/ibzdictitems';
import './entity/ibzdicts/ibzdicts';
......@@ -125,7 +125,7 @@
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs';
import IBZDictItemService from '@/service/ibzdict-item/ibzdict-item-service';
import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
import EditViewEngine from '@engine/view/edit-view-engine';
......@@ -140,10 +140,10 @@ export default class IBZDictItemEditViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBZDictItemService}
* @type {IBZDICTITEMService}
* @memberof IBZDictItemEditViewBase
*/
protected appEntityService: IBZDictItemService = new IBZDictItemService;
protected appEntityService: IBZDICTITEMService = new IBZDICTITEMService;
/**
......@@ -661,7 +661,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Save(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -687,7 +687,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.SaveAndNew(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -713,7 +713,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.SaveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -739,7 +739,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.RemoveAndExit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -765,7 +765,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.SaveAndStart(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -791,7 +791,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ViewWFStep(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -817,7 +817,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -843,7 +843,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -869,7 +869,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -895,7 +895,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.FirstRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -921,7 +921,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.PrevRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -947,7 +947,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.NextRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -973,7 +973,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.LastRecord(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -999,7 +999,7 @@ export default class IBZDictItemEditViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1339,33 +1339,6 @@ export default class IBZDictItemEditViewBase extends Vue {
}
}
/**
* 销毁视图回调
*
* @memberof IBZDictItemEditViewBase
*/
protected destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBZDictItemEditViewBase
*/
protected afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
}
}
}
</script>
......
......@@ -2,7 +2,7 @@
import { Component } from 'vue-property-decorator';
import IBZDictItemEditViewBase from './ibzdict-item-edit-view-base.vue';
import view_form from '@widgets/ibzdict-item/main-form/main-form.vue';
import view_form from '@widgets/ibzdictitem/main-form/main-form.vue';
@Component({
components: {
view_form,
......
......@@ -147,7 +147,7 @@
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs';
import IBZDictItemService from '@/service/ibzdict-item/ibzdict-item-service';
import IBZDICTITEMService from '@/service/ibzdictitem/ibzdictitem-service';
import GridViewEngine from '@engine/view/grid-view-engine';
......@@ -162,10 +162,10 @@ export default class IBZDictItemGridViewBase extends Vue {
/**
* 实体服务对象
*
* @type {IBZDictItemService}
* @type {IBZDICTITEMService}
* @memberof IBZDictItemGridViewBase
*/
protected appEntityService: IBZDictItemService = new IBZDictItemService;
protected appEntityService: IBZDICTITEMService = new IBZDICTITEMService;
/**
......@@ -755,7 +755,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.New(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -781,7 +781,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Edit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -807,7 +807,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.View(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.View(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -833,7 +833,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Copy(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -859,7 +859,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ToggleRowEdit(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -885,7 +885,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.NewRow(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -911,7 +911,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Remove(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -937,7 +937,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ExportExcel(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -963,7 +963,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Print(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -989,7 +989,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ExportModel(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1015,7 +1015,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Import(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Import(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1041,7 +1041,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.ToggleFilter(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1067,7 +1067,7 @@ export default class IBZDictItemGridViewBase extends Vue {
datas = [...xData.getDatas()];
}
// 界面行为
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDictItem");
this.Help(datas, contextJO,paramJO, $event, xData,this,"IBZDICTITEM");
}
/**
......@@ -1087,11 +1087,9 @@ export default class IBZDictItemGridViewBase extends Vue {
Object.assign(curViewParam,args[0]);
}
let deResParameters: any[] = [];
if(curViewParam.ibzdict && true){
deResParameters = [
deResParameters = [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' },
]
}
];
const parameters: any[] = [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -1124,11 +1122,9 @@ export default class IBZDictItemGridViewBase extends Vue {
Object.assign(curViewParam,args[0]);
}
let deResParameters: any[] = [];
if(curViewParam.ibzdict && true){
deResParameters = [
deResParameters = [
{ pathName: 'ibzdicts', parameterName: 'ibzdict' },
]
}
];
const parameters: any[] = [
{ pathName: 'ibzdictitems', parameterName: 'ibzdictitem' },
{ pathName: 'editview', parameterName: 'editview' },
......@@ -1417,33 +1413,6 @@ export default class IBZDictItemGridViewBase extends Vue {
}
}
/**
* 销毁视图回调
*
* @memberof IBZDictItemGridViewBase
*/
protected destroyed(){
this.afterDestroyed();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBZDictItemGridViewBase
*/
protected afterDestroyed(){
if(this.viewDefaultUsage){
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
if(item.startsWith(this.context.srfsessionid)){
localStorage.removeItem(item);
}
})
}
}
}
/**
* 是否单选
*
......
......@@ -2,8 +2,8 @@
import { Component } from 'vue-property-decorator';
import IBZDictItemGridViewBase from './ibzdict-item-grid-view-base.vue';
import view_grid from '@widgets/ibzdict-item/main-grid/main-grid.vue';
import view_searchform from '@widgets/ibzdict-item/default-searchform/default-searchform.vue';
import view_grid from '@widgets/ibzdictitem/main-grid/main-grid.vue';
import view_searchform from '@widgets/ibzdictitem/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
......
......@@ -39,7 +39,7 @@ export class EntityServiceRegister {
* @memberof EntityServiceRegister
*/
protected init(): void {
this.allEntityService.set('ibzdictitem', () => import('@/service/ibzdict-item/ibzdict-item-service'));
this.allEntityService.set('ibzdictitem', () => import('@/service/ibzdictitem/ibzdictitem-service'));
this.allEntityService.set('ibzdict', () => import('@/service/ibzdict/ibzdict-service'));
}
......
......@@ -39,7 +39,7 @@ export class UIServiceRegister {
* @memberof UIServiceRegister
*/
protected init(): void {
this.allUIService.set('ibzdictitem', () => import('@/uiservice/ibzdict-item/ibzdict-item-ui-service'));
this.allUIService.set('ibzdictitem', () => import('@/uiservice/ibzdictitem/ibzdictitem-ui-service'));
this.allUIService.set('ibzdict', () => import('@/uiservice/ibzdict/ibzdict-ui-service'));
}
......
......@@ -759,7 +759,7 @@ export default class MainBase extends Vue implements ControlInterface {
let container: Subject<any> = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(this.context)), importDataModel);
container.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
console.log(result);
this.refresh(result.datas);
}
});
}
......
......@@ -68,7 +68,7 @@
<template v-if="getColumnState('updatedate')">
<el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('ibzdictitem.main_grid.columns.updatedate')" :width="250" :align="'left'" :sortable="'custom'">
<template v-slot="{row,column}">
<span>{{row.updatedate}}</span>
<app-format-data format="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :data="row.updatedate"></app-format-data>
</template>
</el-table-column>
</template>
......@@ -806,6 +806,35 @@ export default class MainBase extends Vue implements ControlInterface {
console.error("批量添加未实现");
}
/**
* 数据导入
*
* @param {*} data
* @memberof Main
*/
public importExcel(data:any ={}):void{
//导入excel
const importDataModel:any ={
}
if(Object.keys(importDataModel).length == 0){
this.$Notice.warning({ title: '警告', desc: '请配置数据导入项' });
return;
}
const view:any ={
viewname: 'app-data-upload',
title: '导入数据',
width: 900,
height: 700
}
let container: Subject<any> = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(this.context)), importDataModel);
container.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
this.refresh(result.datas);
}
});
}
/**
* 数据导出
*
......@@ -818,7 +847,7 @@ export default class MainBase extends Vue implements ControlInterface {
const tHeader: Array<any> = [];
const filterVal: Array<any> = [];
this.allColumns.forEach((item: any) => {
item.show && item.label ? tHeader.push(item.label) : "";
item.show && item.label ? tHeader.push(this.$t(item.langtag)) : "";
item.show && item.name ? filterVal.push(item.name) : "";
});
const data = await this.formatExcelData(filterVal, _data);
......@@ -826,7 +855,7 @@ export default class MainBase extends Vue implements ControlInterface {
excel.export_json_to_excel({
header: tHeader, //表头 必填
data, //具体数据 必填
filename: "主实体"+"表", //非必填
filename: "字典项目表", //非必填
autoWidth: true, //非必填
bookType: "xlsx" //非必填
});
......@@ -835,7 +864,7 @@ export default class MainBase extends Vue implements ControlInterface {
const page: any = {};
// 设置page,size
if (Object.is(data.type, 'maxRowCount')) {
Object.assign(page, { page: 0, size: data.maxRowCount });
Object.assign(page, { page: 0, size: data.maxRowCount });
} else if (Object.is(data.type, 'activatedPage')) {
try {
doExport(JSON.parse(JSON.stringify(this.items)));
......
......@@ -6,6 +6,14 @@
*/
export default class MainModel {
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
......@@ -13,77 +21,80 @@ export default class MainModel {
* @memberof MainGridMode
*/
public getDataItems(): any[] {
return [
{
name: 'dictitemval',
prop: 'itemval',
dataType: 'TEXT',
},
{
name: 'dictid',
prop: 'dictid',
dataType: 'PICKUP',
},
{
name: 'showorder',
prop: 'showorder',
dataType: 'INT',
},
{
name: 'pitemval',
prop: 'pitemval',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'itemicon',
prop: 'itemicon',
dataType: 'TEXT',
},
{
name: 'itemfilter',
prop: 'itemfilter',
dataType: 'TEXT',
},
{
name: 'ibzdictitemname',
prop: 'itemname',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'itemname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'itemid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'itemid',
dataType: 'GUID',
},
{
name: 'itemcls',
prop: 'itemcls',
dataType: 'TEXT',
},
{
name: 'ibzdict',
prop: 'dictid',
dataType: 'FONTKEY',
},
{
name: 'ibzdictitem',
prop: 'itemid',
},
if(this.isDEExport){
return [
]
}else{
return [
{
name: 'dictitemval',
prop: 'itemval',
dataType: 'TEXT',
},
{
name: 'dictid',
prop: 'dictid',
dataType: 'PICKUP',
},
{
name: 'showorder',
prop: 'showorder',
dataType: 'INT',
},
{
name: 'pitemval',
prop: 'pitemval',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'itemicon',
prop: 'itemicon',
dataType: 'TEXT',
},
{
name: 'itemfilter',
prop: 'itemfilter',
dataType: 'TEXT',
},
{
name: 'ibzdictitemname',
prop: 'itemname',
dataType: 'TEXT',
},
{
name: 'srfmajortext',
prop: 'itemname',
dataType: 'TEXT',
},
{
name: 'srfdataaccaction',
prop: 'itemid',
dataType: 'GUID',
},
{
name: 'srfkey',
prop: 'itemid',
dataType: 'GUID',
},
{
name: 'itemcls',
prop: 'itemcls',
dataType: 'TEXT',
},
{
name: 'ibzdict',
prop: 'dictid',
dataType: 'FONTKEY',
},
{
name: 'ibzdictitem',
prop: 'itemid',
},
{
name: 'n_ibzdictitemname_like',
prop: 'n_ibzdictitemname_like',
......@@ -100,27 +111,28 @@ export default class MainModel {
dataType: 'FONTKEY',
},
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
}
]
}
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
}
]
}
}
}
\ No newline at end of file
......@@ -175,7 +175,7 @@ export default class MainService extends ControlService {
}
/**
* 查询数据
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
......@@ -237,6 +237,7 @@ export default class MainService extends ControlService {
});
}
/**
* 加载草稿
*
......
......@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "")
public class webAppController {
......
package cn.ibizlab.web.filter;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import org.springframework.cloud.netflix.zuul.filters.support.FilterConstants;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
/**
* 将应用实体映射到对应的系统服务接口
*/
@Component
public class webDataEntitySysApiMappingFilter extends ZuulFilter {
private static Map<String, String> AppDataEntitySysApiMapping = new HashMap<>();
@PostConstruct
private void initDataEntitySysApiMapping() {
AppDataEntitySysApiMapping.put("ibzdictitem", "dictapi");
AppDataEntitySysApiMapping.put("ibzdict", "dictapi");
}
@Override
public Object run() {
RequestContext context = RequestContext.getCurrentContext();
Object entity = context.get(FilterConstants.PROXY_KEY);
Object requestPath = context.get(FilterConstants.REQUEST_URI_KEY);
if (ObjectUtils.isEmpty(requestPath) || ObjectUtils.isEmpty(entity)) {
return null;
}
String sysApiPrefix = AppDataEntitySysApiMapping.get(entity);
if (StringUtils.isEmpty(sysApiPrefix)) {
return null;
}
context.put(FilterConstants.REQUEST_URI_KEY, String.format("/%s%s", sysApiPrefix,requestPath));
return null;
}
@Override
public String filterType() {
return FilterConstants.PRE_TYPE;
}
@Override
public int filterOrder() {
return FilterConstants.PRE_DECORATION_FILTER_ORDER + 1;
}
@Override
public boolean shouldFilter() {
return true;
}
}
......@@ -18,14 +18,11 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@Import({
FeignClientsConfiguration.class
})
@ComponentScans({
@ComponentScan(basePackages = {"cn.ibizlab.util", "cn.ibizlab.web"})
})
@EnableDiscoveryClient
@Configuration
@EnableFeignClients
@EnableZuulProxy
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@SpringBootApplication
public class webApplication extends WebMvcConfigurerAdapter{
public static void main(String[] args) {
......
server:
devmode: true
port: 8080
servlet:
session:
cookie:
name: ibzdict-app-web
spring:
cloud:
nacos:
discovery:
server-addr: 172.16.102.211:8848
sysapi:
defaultServiceId: ibzdict
defaultStripPrefix: false
zuul:
routes:
ibzdictitem:
path: /ibzdictitems/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ibzdict:
path: /ibzdicts/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000
server:
devmode: true
port: 8080
servlet:
session:
cookie:
name: ibzdict-app-web
spring:
application:
name: ibzdict-app-web
cloud:
nacos:
discovery:
server-addr: 172.16.102.211:8848
sysapi:
defaultServiceId: ibzdict
defaultStripPrefix: false
zuul:
routes:
ibzdictitem:
path: /ibzdictitems/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ibzdict:
path: /ibzdicts/**
serviceId: ${sysapi.defaultServiceId}
stripPrefix: ${sysapi.defaultStripPrefix}
ribbon:
ReadTimeout: 60000
ConnectTimeout: 60000
spring:
profiles:
include: web, sys
include: web-prod, sys
......@@ -32,12 +32,6 @@
</dependency>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibzdict-util</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
......
......@@ -24,6 +24,11 @@
<artifactId>ibzdict-provider-dictapi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibzdict-app-web</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -30,7 +30,6 @@ import cn.ibizlab.util.web.SearchContextHandlerMethodArgumentResolver;
})
@EnableDiscoveryClient
@Configuration
@ComponentScan(nameGenerator = UniqueNameGenerator.class)
@EnableTransactionManagement
public class IbzdictApplication extends WebMvcConfigurerAdapter {
......
spring:
profiles:
include: dev, core, mybatis, sys
include: dev, core, mybatis, sys ,web-dev
......@@ -16,7 +16,6 @@ import cn.ibizlab.util.SearchFieldFilter;
import cn.ibizlab.util.enums.SearchFieldType;
import cn.ibizlab.util.enums.SearchGroupType;
import cn.ibizlab.util.SearchGroupFilter;
import cn.ibizlab.util.log.IBIZLog;
import org.springframework.util.StringUtils;
......@@ -29,7 +28,6 @@ import cn.ibizlab.core.dict.domain.IBZDictItem;
*/
@Slf4j
@Data
@IBIZLog
public class IBZDictItemSearchContext extends MybatisSearchContext {
private QueryWrapper<IBZDictItem> selectCond=new QueryWrapper();
......
......@@ -16,7 +16,6 @@ import cn.ibizlab.util.SearchFieldFilter;
import cn.ibizlab.util.enums.SearchFieldType;
import cn.ibizlab.util.enums.SearchGroupType;
import cn.ibizlab.util.SearchGroupFilter;
import cn.ibizlab.util.log.IBIZLog;
import org.springframework.util.StringUtils;
......@@ -29,7 +28,6 @@ import cn.ibizlab.core.dict.domain.IBZDict;
*/
@Slf4j
@Data
@IBIZLog
public class IBZDictSearchContext extends MybatisSearchContext {
private QueryWrapper<IBZDict> selectCond=new QueryWrapper();
......
......@@ -28,4 +28,10 @@ public interface IBZDictItemMapper extends BaseMapper<IBZDictItem>{
@Override
int deleteById(Serializable id);
Page<IBZDictItem> selectPermission(IPage page,@Param("pw") Wrapper<IBZDictItem> wrapper) ;
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] -->
List<IBZDictItem> selectByDictid(@Param("dictid") Serializable dictid) ;
}
\ No newline at end of file
......@@ -28,4 +28,6 @@ public interface IBZDictMapper extends BaseMapper<IBZDict>{
@Override
int deleteById(Serializable id);
Page<IBZDict> selectPermission(IPage page,@Param("pw") Wrapper<IBZDict> wrapper) ;
}
\ No newline at end of file
......@@ -36,5 +36,12 @@ public interface IIBZDictItemService extends IService<IBZDictItem>{
void updateBatch(List<IBZDictItem> list, int batchSize) ;
Page<IBZDictItem> searchDefault(IBZDictItemSearchContext context) ;
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] -->
List<IBZDictItem> selectByDictid(String dictid) ;
void saveByDictid(String dictidList<IBZDictItem>) ;
void removeByDictid(String dictid) ;
}
......@@ -36,5 +36,7 @@ public interface IIBZDictService extends IService<IBZDict>{
void saveBatch(List<IBZDict> list, int batchSize) ;
Page<IBZDict> searchDefault(IBZDictSearchContext context) ;
}
package cn.ibizlab.core.dict.service.dto;
import java.sql.Timestamp;
......@@ -9,10 +8,6 @@ import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.core.dict.domain.IBZDict;
import org.springframework.cglib.beans.BeanCopier;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
......@@ -32,14 +27,14 @@ public class IBZDictDTO extends DTOBase implements Serializable {
*
*/
@JsonProperty("dictid")
private String dictId;
private String dictid;
/**
* 属性 [IBZDICTNAME]
*
*/
@JsonProperty("dictname")
private String dictName;
private String dictname;
/**
* 属性 [ENABLE]
......@@ -52,39 +47,36 @@ public class IBZDictDTO extends DTOBase implements Serializable {
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("createdate")
private Timestamp createDate;
private Timestamp createdate;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("updatedate")
private Timestamp updateDate;
private Timestamp updatedate;
/**
* 属性 [CREATEMAN]
*
*/
@JsonProperty("createman")
private String createMan;
private String createman;
/**
* 属性 [UPDATEMAN]
*
*/
@JsonProperty("updateman")
private String updateMan;
private String updateman;
/**
* 设置 [IBZDICTID]
*/
@JsonProperty("dictid")
public void setDictId(String dictId){
this.dictId = dictId ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(dictId==null){
this.addFocusNull("ibzdictid");
}
......@@ -92,9 +84,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/**
* 设置 [IBZDICTNAME]
*/
@JsonProperty("dictname")
public void setDictName(String dictName){
this.dictName = dictName ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(dictName==null){
this.addFocusNull("ibzdictname");
}
......@@ -102,9 +93,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/**
* 设置 [ENABLE]
*/
@JsonProperty("enable")
public void setEnable(Integer enable){
this.enable = enable ;
public void setUpdateman(Integer updateman){
this.updateman = updateman ;
if(enable==null){
this.addFocusNull("enable");
}
......@@ -112,9 +102,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/**
* 设置 [CREATEDATE]
*/
@JsonProperty("createdate")
public void setCreateDate(Timestamp createDate){
this.createDate = createDate ;
public void setUpdateman(Timestamp updateman){
this.updateman = updateman ;
if(createDate==null){
this.addFocusNull("createdate");
}
......@@ -122,9 +111,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/**
* 设置 [UPDATEDATE]
*/
@JsonProperty("updatedate")
public void setUpdateDate(Timestamp updateDate){
this.updateDate = updateDate ;
public void setUpdateman(Timestamp updateman){
this.updateman = updateman ;
if(updateDate==null){
this.addFocusNull("updatedate");
}
......@@ -132,9 +120,8 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/**
* 设置 [CREATEMAN]
*/
@JsonProperty("createman")
public void setCreateMan(String createMan){
this.createMan = createMan ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(createMan==null){
this.addFocusNull("createman");
}
......@@ -142,13 +129,27 @@ public class IBZDictDTO extends DTOBase implements Serializable {
/**
* 设置 [UPDATEMAN]
*/
@JsonProperty("updateman")
public void setUpdateMan(String updateMan){
this.updateMan = updateMan ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(updateMan==null){
this.addFocusNull("updateman");
}
}
/**
* [IBZDICTITEM]
*/
private List<IBZDictItemDTO> ibzdictitems = new ArrayList<IBZDictItemDTO>();
@JsonProperty("ibzdictitems")
public List<IBZDictItemDTO> getIbzdictitems(){
return ibzdictitems ;
}
@JsonProperty("ibzdictitems")
public void setIbzdictitems(List <IBZDictItemDTO> ibzdictitems){
this.ibzdictitems = ibzdictitems ;
}
}
package cn.ibizlab.core.dict.service.dto;
import java.sql.Timestamp;
......@@ -9,10 +8,6 @@ import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.core.dict.domain.IBZDictItem;
import org.springframework.cglib.beans.BeanCopier;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
......@@ -32,101 +27,98 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
*
*/
@JsonProperty("itemid")
private String itemId;
private String itemid;
/**
* 属性 [IBZDICTITEMNAME]
*
*/
@JsonProperty("itemname")
private String itemName;
private String itemname;
/**
* 属性 [DICTITEMVAL]
*
*/
@JsonProperty("itemval")
private String itemVal;
private String itemval;
/**
* 属性 [DICTID]
*
*/
@JsonProperty("dictid")
private String dictId;
private String dictid;
/**
* 属性 [PITEMVAL]
*
*/
@JsonProperty("pitemval")
private String pItemVal;
private String pitemval;
/**
* 属性 [ITEMFILTER]
*
*/
@JsonProperty("itemfilter")
private String itemFilter;
private String itemfilter;
/**
* 属性 [ITEMCLS]
*
*/
@JsonProperty("itemcls")
private String itemCls;
private String itemcls;
/**
* 属性 [ITEMICON]
*
*/
@JsonProperty("itemicon")
private String itemIcon;
private String itemicon;
/**
* 属性 [SHOWORDER]
*
*/
@JsonProperty("showorder")
private Integer showOrder;
private Integer showorder;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("createdate")
private Timestamp createDate;
private Timestamp createdate;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JsonProperty("updatedate")
private Timestamp updateDate;
private Timestamp updatedate;
/**
* 属性 [CREATEMAN]
*
*/
@JsonProperty("createman")
private String createMan;
private String createman;
/**
* 属性 [UPDATEMAN]
*
*/
@JsonProperty("updateman")
private String updateMan;
private String updateman;
/**
* 设置 [IBZDICTITEMID]
*/
@JsonProperty("itemid")
public void setItemId(String itemId){
this.itemId = itemId ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(itemId==null){
this.addFocusNull("ibzdictitemid");
}
......@@ -134,9 +126,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [IBZDICTITEMNAME]
*/
@JsonProperty("itemname")
public void setItemName(String itemName){
this.itemName = itemName ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(itemName==null){
this.addFocusNull("ibzdictitemname");
}
......@@ -144,9 +135,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [DICTITEMVAL]
*/
@JsonProperty("itemval")
public void setItemVal(String itemVal){
this.itemVal = itemVal ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(itemVal==null){
this.addFocusNull("dictitemval");
}
......@@ -154,9 +144,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [DICTID]
*/
@JsonProperty("dictid")
public void setDictId(String dictId){
this.dictId = dictId ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(dictId==null){
this.addFocusNull("dictid");
}
......@@ -164,9 +153,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [PITEMVAL]
*/
@JsonProperty("pitemval")
public void setPItemVal(String pItemVal){
this.pItemVal = pItemVal ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(pItemVal==null){
this.addFocusNull("pitemval");
}
......@@ -174,9 +162,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [ITEMFILTER]
*/
@JsonProperty("itemfilter")
public void setItemFilter(String itemFilter){
this.itemFilter = itemFilter ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(itemFilter==null){
this.addFocusNull("itemfilter");
}
......@@ -184,9 +171,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [ITEMCLS]
*/
@JsonProperty("itemcls")
public void setItemCls(String itemCls){
this.itemCls = itemCls ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(itemCls==null){
this.addFocusNull("itemcls");
}
......@@ -194,9 +180,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [ITEMICON]
*/
@JsonProperty("itemicon")
public void setItemIcon(String itemIcon){
this.itemIcon = itemIcon ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(itemIcon==null){
this.addFocusNull("itemicon");
}
......@@ -204,9 +189,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [SHOWORDER]
*/
@JsonProperty("showorder")
public void setShowOrder(Integer showOrder){
this.showOrder = showOrder ;
public void setUpdateman(Integer updateman){
this.updateman = updateman ;
if(showOrder==null){
this.addFocusNull("showorder");
}
......@@ -214,9 +198,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [CREATEDATE]
*/
@JsonProperty("createdate")
public void setCreateDate(Timestamp createDate){
this.createDate = createDate ;
public void setUpdateman(Timestamp updateman){
this.updateman = updateman ;
if(createDate==null){
this.addFocusNull("createdate");
}
......@@ -224,9 +207,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [UPDATEDATE]
*/
@JsonProperty("updatedate")
public void setUpdateDate(Timestamp updateDate){
this.updateDate = updateDate ;
public void setUpdateman(Timestamp updateman){
this.updateman = updateman ;
if(updateDate==null){
this.addFocusNull("updatedate");
}
......@@ -234,9 +216,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [CREATEMAN]
*/
@JsonProperty("createman")
public void setCreateMan(String createMan){
this.createMan = createMan ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(createMan==null){
this.addFocusNull("createman");
}
......@@ -244,9 +225,8 @@ public class IBZDictItemDTO extends DTOBase implements Serializable {
/**
* 设置 [UPDATEMAN]
*/
@JsonProperty("updateman")
public void setUpdateMan(String updateMan){
this.updateMan = updateMan ;
public void setUpdateman(String updateman){
this.updateman = updateman ;
if(updateMan==null){
this.addFocusNull("updateman");
}
......
......@@ -26,8 +26,6 @@ import cn.ibizlab.core.dict.filter.IBZDictItemSearchContext;
import cn.ibizlab.core.dict.service.IIBZDictItemService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.SearchResult;
import cn.ibizlab.util.log.IBIZLog;
......@@ -42,7 +40,6 @@ import org.springframework.util.ObjectUtils;
* 实体[字典项目] 服务对象接口实现
*/
@Slf4j
@IBIZLog
@Service
public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDictItem> implements IIBZDictItemService {
......
......@@ -26,8 +26,6 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import cn.ibizlab.core.dict.service.IIBZDictService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.SearchResult;
import cn.ibizlab.util.log.IBIZLog;
......@@ -42,7 +40,6 @@ import org.springframework.util.ObjectUtils;
* 实体[数据字典] 服务对象接口实现
*/
@Slf4j
@IBIZLog
@Service
public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> implements IIBZDictService {
......
......@@ -11,7 +11,6 @@ import org.mapstruct.factory.Mappers;
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZDictItemMapping extends MappingBase<IBZDictItemDTO, IBZDictItem> {
IBZDictItemMapping MAPPER = Mappers.getMapper(IBZDictItemMapping.class);
}
......@@ -11,7 +11,6 @@ import org.mapstruct.factory.Mappers;
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZDictMapping extends MappingBase<IBZDictDTO, IBZDict> {
IBZDictMapping MAPPER = Mappers.getMapper(IBZDictMapping.class);
}
......@@ -12,7 +12,7 @@
<resultMap id="IBZDictResultMap" type="cn.ibizlab.core.dict.domain.IBZDict" autoMapping="true">
<id property="dictid" column="ibzdictid" /><!--主键字段映射-->
<!--通过mybatis自动注入关系属性[关系实体],fetchType="lazy"为懒加载配置 -->
<collection property="items" ofType="cn.ibizlab.core.dict.domain.IBZDictItem" column="ibzdictid" select="cn.ibizlab.core.dict.mapper.IBZDictItemMapper.selectBydictid" fetchType="lazy"></collection>
<collection property="items" ofType="cn.ibizlab.core.dict.domain.IBZDictItem" column="ibzdictid" select="cn.ibizlab.core.dict.mapper.IBZDictItemMapper.selectByDictid" fetchType="lazy"></collection>
</resultMap>
......
......@@ -17,7 +17,7 @@
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZDICTITEM_IBZDICT_DICTID] -->
<select id="selectBydictid" resultMap="IBZDictItemResultMap">
<select id="selectByDictid" resultMap="IBZDictItemResultMap">
select t1.* from (
<include refid="Default" />
) t1
......
......@@ -35,12 +35,10 @@ import cn.ibizlab.core.dict.filter.IBZDictSearchContext;
import cn.ibizlab.core.dict.service.mapping.IBZDictMapping;
import cn.ibizlab.util.log.IBIZLog;
@Slf4j
@IBIZLog
@Api(tags = {"IBZDict" })
@RestController
@RestController("dictapiIBZDict")
@RequestMapping("")
public class IBZDictResource {
......
......@@ -14,18 +14,20 @@ public class DTOBase implements Serializable {
@JSONField(serialize = false)
private Set<String> focusNull;
@JsonIgnore
@JSONField(serialize = false)
public void addFocusNull(String field) {
getFocusNull().add(field);
public void modify(String field,Object val) {
if(val==null)
this.getFocusNull().add(field.toLowerCase());
else
this.getFocusNull().remove(field.toLowerCase());
}
@JsonIgnore
@JSONField(serialize = false)
public Set<String> getFocusNull() {
if(focusNull==null)
focusNull=new HashSet<>();
return focusNull;
}
}
......@@ -5,10 +5,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import cn.ibizlab.util.log.IBIZLog;
@Slf4j
@IBIZLog
public class UniqueNameGenerator extends AnnotationBeanNameGenerator {
@Override
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册