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

ibiz4j 发布系统代码 [ibz-lite,应用]

上级 fc87b6f1
......@@ -148,6 +148,7 @@ export default {
menuitem7: "路由",
menuitem3: "视图",
menuitem4: "组件",
menuitem11: "配置项",
menuitem10: "大屏",
},
},
......
......@@ -148,6 +148,7 @@ export default {
menuitem7: "路由",
menuitem3: "视图",
menuitem4: "组件",
menuitem11: "配置项",
menuitem10: "大屏",
},
},
......
......@@ -23,8 +23,6 @@ export default {
details: {
group1: "配置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "标识",
......@@ -33,6 +31,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
systemid: "系统标识",
cfgtype: "配置类型",
targettype: "引用类型",
userid: "用户标识",
cfg: "配置内容",
updatedate: "更新时间",
cfgid: "标识",
},
uiactions: {
......@@ -40,6 +44,11 @@ export default {
},
main_grid: {
columns: {
cfgtype: "配置类型",
targettype: "引用类型",
systemid: "系统标识",
userid: "用户标识",
updatedate: "更新时间",
},
nodata:"",
uiactions: {
......@@ -48,10 +57,71 @@ export default {
default_searchform: {
details: {
formpage1: "常规条件",
n_cfgtype_eq: "配置类型(等于(=))",
n_targettype_eq: "引用类型(等于(=))",
n_systemid_eq: "系统标识(等于(=))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
......@@ -118,62 +188,4 @@ export default {
tip: "Help",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
......@@ -22,8 +22,6 @@ export default {
details: {
group1: "配置基本信息",
formpage1: "基本信息",
group2: "操作信息",
formpage2: "其它",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "标识",
......@@ -32,6 +30,12 @@ export default {
srfuf: "",
srfdeid: "",
srfsourcekey: "",
systemid: "系统标识",
cfgtype: "配置类型",
targettype: "引用类型",
userid: "用户标识",
cfg: "配置内容",
updatedate: "更新时间",
cfgid: "标识",
},
uiactions: {
......@@ -39,6 +43,11 @@ export default {
},
main_grid: {
columns: {
cfgtype: "配置类型",
targettype: "引用类型",
systemid: "系统标识",
userid: "用户标识",
updatedate: "更新时间",
},
nodata:"",
uiactions: {
......@@ -47,10 +56,71 @@ export default {
default_searchform: {
details: {
formpage1: "常规条件",
n_cfgtype_eq: "配置类型(等于(=))",
n_targettype_eq: "引用类型(等于(=))",
n_systemid_eq: "系统标识(等于(=))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
......@@ -117,62 +187,4 @@ export default {
tip: "帮助",
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
......@@ -171,6 +171,24 @@ mock.onGet('v7/lite-indexappmenu').reply((config: any) => {
textcls: '',
appfunctag: 'AppFunc4',
resourcetag: '',
},
{
id: 'D1F510DC-819F-45FA-AF98-55327155B417',
name: 'menuitem11',
text: '配置项',
type: 'MENUITEM',
counterid: '',
tooltip: '配置项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc11',
resourcetag: '',
},
{
id: '8DAB721A-F1FD-42E3-9EC7-C2871C815FF5',
......
......@@ -293,11 +293,11 @@ export default class DstConfigEditViewBase extends Vue {
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
for(let key in this.viewparams){
delete this.viewparams[key];
}
if(typeof this.viewparams == 'string') {
this.viewparams = {};
if(typeof newVal == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
}
}
......
......@@ -283,11 +283,11 @@ export default class DstConfigGridViewBase extends Vue {
@Watch('viewparam',{immediate: true, deep: true})
onParamData(newVal: any, oldVal: any) {
if(newVal){
for(let key in this.viewparams){
delete this.viewparams[key];
}
if(typeof this.viewparams == 'string') {
this.viewparams = {};
if(typeof newVal == 'string') {
Object.assign(this.viewparams, JSON.parse(this.viewparam));
}else{
this.viewparams = Util.deepCopy(this.viewparam);
}
}
......@@ -1303,16 +1303,28 @@ export default class DstConfigGridViewBase extends Vue {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
const openIndexViewTab = (data: any) => {
const _data: any = { w: (new Date().getTime()) };
Object.assign(_data, data);
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, _data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'dst-config-edit-view',
height: 0,
width: 650,
title: this.$t('entities.dstconfig.views.editview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
......@@ -1344,17 +1356,31 @@ export default class DstConfigGridViewBase extends Vue {
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
];
const _this: any = this;
if(fullargs && fullargs.copymode){
Object.assign(data,{copymode:true});
}
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, tempContext, deResParameters, parameters, args, data);
this.$router.push(routePath);
const openDrawer = (view: any, data: any) => {
let container: Subject<any> = this.$appdrawer.openDrawer(view, tempContext, data);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
}
openIndexViewTab(data);
const view: any = {
viewname: 'dst-config-edit-view',
height: 0,
width: 650,
title: this.$t('entities.dstconfig.views.editview.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
}
......
......@@ -5,12 +5,14 @@ export const PageComponents = {
Vue.component('dst-data-source-grid-view', () => import('@pages/lite/dst-data-source-grid-view/dst-data-source-grid-view.vue'));
Vue.component('dst-microservice-pickup-grid-view', () => import('@pages/lite/dst-microservice-pickup-grid-view/dst-microservice-pickup-grid-view.vue'));
Vue.component('dst-data-source-pickup-grid-view', () => import('@pages/lite/dst-data-source-pickup-grid-view/dst-data-source-pickup-grid-view.vue'));
Vue.component('dst-config-grid-view', () => import('@pages/lite/dst-config-grid-view/dst-config-grid-view.vue'));
Vue.component('meta-relationship-pickup-view', () => import('@pages/lite/meta-relationship-pickup-view/meta-relationship-pickup-view.vue'));
Vue.component('dst-apigrid-view', () => import('@pages/lite/dst-apigrid-view/dst-apigrid-view.vue'));
Vue.component('meta-field-edit-view', () => import('@pages/lite/meta-field-edit-view/meta-field-edit-view.vue'));
Vue.component('meta-data-set-grid-view', () => import('@pages/lite/meta-data-set-grid-view/meta-data-set-grid-view.vue'));
Vue.component('dst-view-edit-view', () => import('@pages/lite/dst-view-edit-view/dst-view-edit-view.vue'));
Vue.component('meta-entity-pickup-view', () => import('@pages/lite/meta-entity-pickup-view/meta-entity-pickup-view.vue'));
Vue.component('dst-config-edit-view', () => import('@pages/lite/dst-config-edit-view/dst-config-edit-view.vue'));
Vue.component('meta-data-set-edit-view', () => import('@pages/lite/meta-data-set-edit-view/meta-data-set-edit-view.vue'));
Vue.component('meta-model-grid-view', () => import('@pages/lite/meta-model-grid-view/meta-model-grid-view.vue'));
Vue.component('dst-router-grid-view', () => import('@pages/lite/dst-router-grid-view/dst-router-grid-view.vue'));
......@@ -19,11 +21,11 @@ export const PageComponents = {
Vue.component('meta-field-pickup-view', () => import('@pages/lite/meta-field-pickup-view/meta-field-pickup-view.vue'));
Vue.component('meta-relationship-edit-view', () => import('@pages/lite/meta-relationship-edit-view/meta-relationship-edit-view.vue'));
Vue.component('dst-data-source-pickup-view', () => import('@pages/lite/dst-data-source-pickup-view/dst-data-source-pickup-view.vue'));
Vue.component('dst-component-grid-view', () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'));
Vue.component('meta-field-edit-grid-view', () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'));
Vue.component('dst-component-grid-view', () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'));
Vue.component('meta-entity-pickup-grid-view', () => import('@pages/lite/meta-entity-pickup-grid-view/meta-entity-pickup-grid-view.vue'));
Vue.component('meta-entity-edit-view', () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'));
Vue.component('meta-relationship-edit-grid-view', () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'));
Vue.component('meta-entity-edit-view', () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'));
Vue.component('dst-microservice-pickup-view', () => import('@pages/lite/dst-microservice-pickup-view/dst-microservice-pickup-view.vue'));
Vue.component('meta-field-pickup-grid-view', () => import('@pages/lite/meta-field-pickup-grid-view/meta-field-pickup-grid-view.vue'));
Vue.component('blade-visual-edit-view', () => import('@pages/avuedata/blade-visual-edit-view/blade-visual-edit-view.vue'));
......
......@@ -135,6 +135,20 @@ const router = new Router({
},
component: () => import('@pages/lite/dst-data-source-pickup-grid-view/dst-data-source-pickup-grid-view.vue'),
},
{
path: 'dstconfigs/:dstconfig?/gridview/:gridview?',
meta: {
caption: 'entities.dstconfig.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-config-grid-view/dst-config-grid-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metarelationships/:metarelationship?/pickupview/:pickupview?',
meta: {
......@@ -389,6 +403,20 @@ const router = new Router({
},
component: () => import('@pages/lite/meta-entity-pickup-view/meta-entity-pickup-view.vue'),
},
{
path: 'dstconfigs/:dstconfig?/editview/:editview?',
meta: {
caption: 'entities.dstconfig.views.editview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-config-edit-view/dst-config-edit-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metadatasets/:metadataset?/editview/:editview?',
meta: {
......@@ -641,94 +669,94 @@ const router = new Router({
component: () => import('@pages/lite/dst-data-source-pickup-view/dst-data-source-pickup-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/dstapps/:dstapp?/dstcomponents/:dstcomponent?/gridview/:gridview?',
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metafields/:metafield?/editgridview/:editgridview?',
meta: {
caption: 'entities.dstcomponent.views.gridview.caption',
caption: 'entities.metafield.views.editgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstsystems', parameterName: 'dstsystem' },
{ pathName: 'dstapps', parameterName: 'dstapp' },
{ pathName: 'dstcomponents', parameterName: 'dstcomponent' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'metafields', parameterName: 'metafield' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'),
component: () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'),
},
{
path: 'dstapps/:dstapp?/dstcomponents/:dstcomponent?/gridview/:gridview?',
path: 'metaentities/:metaentity?/metafields/:metafield?/editgridview/:editgridview?',
meta: {
caption: 'entities.dstcomponent.views.gridview.caption',
caption: 'entities.metafield.views.editgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstapps', parameterName: 'dstapp' },
{ pathName: 'dstcomponents', parameterName: 'dstcomponent' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'metafields', parameterName: 'metafield' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'),
component: () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'),
},
{
path: 'dstcomponents/:dstcomponent?/gridview/:gridview?',
path: 'metafields/:metafield?/editgridview/:editgridview?',
meta: {
caption: 'entities.dstcomponent.views.gridview.caption',
caption: 'entities.metafield.views.editgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstcomponents', parameterName: 'dstcomponent' },
{ pathName: 'gridview', parameterName: 'gridview' },
{ pathName: 'metafields', parameterName: 'metafield' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'),
component: () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metafields/:metafield?/editgridview/:editgridview?',
path: 'dstsystems/:dstsystem?/dstapps/:dstapp?/dstcomponents/:dstcomponent?/gridview/:gridview?',
meta: {
caption: 'entities.metafield.views.editgridview.caption',
caption: 'entities.dstcomponent.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstsystems', parameterName: 'dstsystem' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'metafields', parameterName: 'metafield' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
{ pathName: 'dstapps', parameterName: 'dstapp' },
{ pathName: 'dstcomponents', parameterName: 'dstcomponent' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'),
component: () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'),
},
{
path: 'metaentities/:metaentity?/metafields/:metafield?/editgridview/:editgridview?',
path: 'dstapps/:dstapp?/dstcomponents/:dstcomponent?/gridview/:gridview?',
meta: {
caption: 'entities.metafield.views.editgridview.caption',
caption: 'entities.dstcomponent.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'metafields', parameterName: 'metafield' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
{ pathName: 'dstapps', parameterName: 'dstapp' },
{ pathName: 'dstcomponents', parameterName: 'dstcomponent' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'),
component: () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'),
},
{
path: 'metafields/:metafield?/editgridview/:editgridview?',
path: 'dstcomponents/:dstcomponent?/gridview/:gridview?',
meta: {
caption: 'entities.metafield.views.editgridview.caption',
caption: 'entities.dstcomponent.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'metafields', parameterName: 'metafield' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
{ pathName: 'dstcomponents', parameterName: 'dstcomponent' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-field-edit-grid-view/meta-field-edit-grid-view.vue'),
component: () => import('@pages/lite/dst-component-grid-view/dst-component-grid-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/pickupgridview/:pickupgridview?',
......@@ -760,43 +788,43 @@ const router = new Router({
component: () => import('@pages/lite/meta-entity-pickup-grid-view/meta-entity-pickup-grid-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/editview/:editview?',
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metarelationships/:metarelationship?/editgridview/:editgridview?',
meta: {
caption: 'entities.metaentity.views.editview.caption',
caption: 'entities.metarelationship.views.editgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstsystems', parameterName: 'dstsystem' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'metarelationships', parameterName: 'metarelationship' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'),
component: () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'),
},
{
path: 'metaentities/:metaentity?/editview/:editview?',
path: 'metaentities/:metaentity?/metarelationships/:metarelationship?/editgridview/:editgridview?',
meta: {
caption: 'entities.metaentity.views.editview.caption',
caption: 'entities.metarelationship.views.editgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'metarelationships', parameterName: 'metarelationship' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'),
component: () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/metarelationships/:metarelationship?/editgridview/:editgridview?',
path: 'metarelationships/:metarelationship?/editgridview/:editgridview?',
meta: {
caption: 'entities.metarelationship.views.editgridview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstsystems', parameterName: 'dstsystem' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'metarelationships', parameterName: 'metarelationship' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
],
......@@ -805,33 +833,33 @@ const router = new Router({
component: () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'),
},
{
path: 'metaentities/:metaentity?/metarelationships/:metarelationship?/editgridview/:editgridview?',
path: 'dstsystems/:dstsystem?/metaentities/:metaentity?/editview/:editview?',
meta: {
caption: 'entities.metarelationship.views.editgridview.caption',
caption: 'entities.metaentity.views.editview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'dstsystems', parameterName: 'dstsystem' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'metarelationships', parameterName: 'metarelationship' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'),
component: () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'),
},
{
path: 'metarelationships/:metarelationship?/editgridview/:editgridview?',
path: 'metaentities/:metaentity?/editview/:editview?',
meta: {
caption: 'entities.metarelationship.views.editgridview.caption',
caption: 'entities.metaentity.views.editview.caption',
info:'',
parameters: [
{ pathName: 'liteindex', parameterName: 'liteindex' },
{ pathName: 'metarelationships', parameterName: 'metarelationship' },
{ pathName: 'editgridview', parameterName: 'editgridview' },
{ pathName: 'metaentities', parameterName: 'metaentity' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/meta-relationship-edit-grid-view/meta-relationship-edit-grid-view.vue'),
component: () => import('@pages/lite/meta-entity-edit-view/meta-entity-edit-view.vue'),
},
{
path: 'dstsystems/:dstsystem?/dstmicroservices/:dstmicroservice?/pickupview/:pickupview?',
......@@ -2035,6 +2063,19 @@ const router = new Router({
},
component: () => import('@pages/lite/meta-entity-grid-view/meta-entity-grid-view.vue'),
},
{
path: '/dstconfigs/:dstconfig?/editview/:editview?',
meta: {
caption: 'entities.dstconfig.views.editview.caption',
info:'',
parameters: [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-config-edit-view/dst-config-edit-view.vue'),
},
{
path: '/dstsystems/:dstsystem?/metaentities/:metaentity?/metarelationships/:metarelationship?/pickupview/:pickupview?',
meta: {
......@@ -2379,6 +2420,19 @@ const router = new Router({
requireAuth: true,
},
component: () => import('@pages/lite/dst-microservice-pickup-grid-view/dst-microservice-pickup-grid-view.vue'),
},
{
path: '/dstconfigs/:dstconfig?/gridview/:gridview?',
meta: {
caption: 'entities.dstconfig.views.gridview.caption',
info:'',
parameters: [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
requireAuth: true,
},
component: () => import('@pages/lite/dst-config-grid-view/dst-config-grid-view.vue'),
},
...globalRoutes,
{
......
......@@ -256,6 +256,7 @@ export const viewstate: any = {
'1ade7920c947bf50c32012de9962a92d',
'33ec4b7d5a31addaec9b033067520820',
'd613248735503950b91cb7094b036cdc',
'f20b2b6dc4d1c75c48f5da3eca3a3274',
'18d59a3ac7947d7123e0be76e7cb71c0',
'88894333da0e2e0f7a556ecabf7b48ab',
'9c46a7edc5d5d3a08e75ca57fcb7b03c',
......@@ -273,6 +274,15 @@ export const viewstate: any = {
'2feae2829a80f67eb57a3335aad45d42',
],
},
{
viewtag: '8ee101d8fe3517d595bd6518026d1ab8',
viewmodule: 'lite',
viewname: 'DstConfigEditView',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '8ef054d29badaac8974f6a19c375c422',
viewmodule: 'lite',
......@@ -380,6 +390,16 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'f20b2b6dc4d1c75c48f5da3eca3a3274',
viewmodule: 'lite',
viewname: 'DstConfigGridView',
viewaction: '',
viewdatachange: false,
refviews: [
'8ee101d8fe3517d595bd6518026d1ab8',
],
},
],
createdviews: [],
}
\ No newline at end of file
......@@ -605,6 +605,9 @@ export default class LiteIndexBase extends Vue implements ControlInterface {
case 'AppFunc6':
this.clickAppFunc6(item);
return;
case 'AppFunc11':
this.clickAppFunc11(item);
return;
case 'AppFunc8':
this.clickAppFunc8(item);
return;
......@@ -722,6 +725,29 @@ export default class LiteIndexBase extends Vue implements ControlInterface {
})
}
/**
* 配置
*
* @param {*} [item={}]
* @memberof LiteIndex
*/
public clickAppFunc11(item: any = {}) {
const viewparam: any = {};
Object.assign(viewparam, {});
const deResParameters: any[] = [];
const parameters: any[] = [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'gridview', parameterName: 'gridview' },
];
const path: string = this.$viewTool.buildUpRoutePath(this.$route, {}, deResParameters, parameters, [], viewparam);
if(Object.is(this.$route.fullPath,path)){
return;
}
this.$nextTick(function(){
this.$router.push(path);
})
}
/**
* 接口
*
......
......@@ -184,6 +184,25 @@ export default class LiteIndexModel {
appfunctag: 'AppFunc4',
resourcetag: '',
authtag:'web-liteIndex-menuitem4',
},
{
id: 'D1F510DC-819F-45FA-AF98-55327155B417',
name: 'menuitem11',
text: '配置项',
type: 'MENUITEM',
counterid: '',
tooltip: '配置项',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: '',
icon: '',
textcls: '',
appfunctag: 'AppFunc11',
resourcetag: '',
authtag:'web-liteIndex-menuitem11',
},
{
id: '8DAB721A-F1FD-42E3-9EC7-C2871C815FF5',
......@@ -262,6 +281,18 @@ export default class LiteIndexModel {
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: 'AppFunc11',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'dstconfiggridview',
deResParameters: [],
routepath: '/liteindex/:liteindex?/dstconfigs/:dstconfig?/gridview/:gridview?',
parameters: [
{ pathName: 'dstconfigs', parameterName: 'dstconfig' },
{ pathName: 'gridview', parameterName: 'gridview' },
],
},
{
appfunctag: 'AppFunc8',
appfuncyype: 'APPVIEW',
......
......@@ -4,7 +4,35 @@
<row>
<i-col span="20" class="form-content">
<row>
</row>
<i-col v-show="detailsModel.n_cfgtype_eq.visible" :style="{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='n_cfgtype_eq' :itemRules="this.rules.n_cfgtype_eq" class='' :caption="$t('entities.dstconfig.default_searchform.details.n_cfgtype_eq')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_cfgtype_eq.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.n_cfgtype_eq"
@enter="onEnter($event)"
:disabled="detailsModel.n_cfgtype_eq.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.n_targettype_eq.visible" :style="{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item name='n_targettype_eq' :itemRules="this.rules.n_targettype_eq" class='' :caption="$t('entities.dstconfig.default_searchform.details.n_targettype_eq')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.n_targettype_eq.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.n_targettype_eq"
@enter="onEnter($event)"
:disabled="detailsModel.n_targettype_eq.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
</row>
</i-col>
<i-col span="4" class="search-button">
<row v-show="Object.keys(data).length>0">
......@@ -261,6 +289,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
public data: any = {
n_cfgtype_eq: null,
n_targettype_eq: null,
n_systemid_eq: null,
};
/**
......@@ -271,6 +302,12 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public detailsModel: any = {
formpage1: new FormPageModel({ caption: '常规条件', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this })
,
n_cfgtype_eq: new FormItemModel({ caption: '配置类型(等于(=))', detailType: 'FORMITEM', name: 'n_cfgtype_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
,
n_targettype_eq: new FormItemModel({ caption: '引用类型(等于(=))', detailType: 'FORMITEM', name: 'n_targettype_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
,
n_systemid_eq: new FormItemModel({ caption: '系统标识(等于(=))', detailType: 'FORMITEM', name: 'n_systemid_eq', visible: true, isShowCaption: true, form: this,required:false, disabled: false, enableCond: 3 })
,
};
......@@ -281,6 +318,60 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
public rules: any = {
n_cfgtype_eq: [
{ type: 'string', message: '配置类型(等于(=)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '配置类型(等于(=)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_cfgtype_eq.required, type: 'string', message: '配置类型(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_cfgtype_eq.required, type: 'string', message: '配置类型(等于(=)) 值不能为空', trigger: 'blur' },
],
n_targettype_eq: [
{ type: 'string', message: '引用类型(等于(=)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '引用类型(等于(=)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_targettype_eq.required, type: 'string', message: '引用类型(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_targettype_eq.required, type: 'string', message: '引用类型(等于(=)) 值不能为空', trigger: 'blur' },
],
n_systemid_eq: [
{ type: 'string', message: '系统标识(等于(=)) 值必须为字符串类型', trigger: 'change' },
{ type: 'string', message: '系统标识(等于(=)) 值必须为字符串类型', trigger: 'blur' },
{ required: this.detailsModel.n_systemid_eq.required, type: 'string', message: '系统标识(等于(=)) 值不能为空', trigger: 'change' },
{ required: this.detailsModel.n_systemid_eq.required, type: 'string', message: '系统标识(等于(=)) 值不能为空', trigger: 'blur' },
],
}
/**
* 监控表单属性 n_cfgtype_eq 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_cfgtype_eq')
onN_cfgtype_eqChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_cfgtype_eq', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 n_targettype_eq 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_targettype_eq')
onN_targettype_eqChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_targettype_eq', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 n_systemid_eq 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@Watch('data.n_systemid_eq')
onN_systemid_eqChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'n_systemid_eq', newVal: newVal, oldVal: oldVal });
}
......@@ -304,6 +395,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
}
/**
......@@ -381,6 +475,9 @@ export default class DefaultBase extends Vue implements ControlInterface {
* @memberof DefaultBase
*/
public createDefault(){
if (this.data.hasOwnProperty('n_systemid_eq')) {
this.data['n_systemid_eq'] = this.context['dstsystemid'];
}
}
/**
......
......@@ -25,6 +25,21 @@ export default class DefaultModel {
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'n_cfgtype_eq',
prop: 'cfg_type',
dataType: 'TEXT',
},
{
name: 'n_targettype_eq',
prop: 'target_type',
dataType: 'TEXT',
},
{
name: 'n_systemid_eq',
prop: 'system_id',
dataType: 'PICKUP',
},
]
}
......
<template>
<i-form :model="this.data" class='app-form' ref='form' id='dstconfig_main' style="">
<i-form :model="this.data" class='app-form' ref='form' id='dstconfig_main' style="" @on-validate="formItemValidate">
<input style="display:none;" />
<row >
<tabs :animated="false" name='main' :value="detailsModel.form.activiedPage"
@on-click="detailsModel.form.clickPage($event)">
<tab-pane v-show="detailsModel.formpage1.visible" name='formpage1' :index="0" tab='main' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.dstconfig.main_form.details.formpage1')
])
}">
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<i-col v-show="detailsModel.group1.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group1.manageContainerStatus" :isManageContainer="detailsModel.group1.isManageContainer" @managecontainerclick="manageContainerClick('group1')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group1.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.dstconfig.main_form.details.group1')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
</row>
</app-form-group>
<i-col v-show="detailsModel.cfgtype.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='cfgtype' :itemRules="this.rules().cfgtype" class='' :caption="$t('entities.dstconfig.main_form.details.cfgtype')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.cfgtype.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.cfgtype"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.cfgtype.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.targettype.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='targettype' :itemRules="this.rules().targettype" class='' :caption="$t('entities.dstconfig.main_form.details.targettype')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.targettype.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.targettype"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.targettype.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.userid.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='userid' :itemRules="this.rules().userid" class='' :caption="$t('entities.dstconfig.main_form.details.userid')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.userid.error" :isEmptyCaption="false" labelPos="LEFT">
<input-box
v-model="data.userid"
@enter="onEnter($event)"
unit=""
:disabled="detailsModel.userid.disabled"
type='text'
style="">
</input-box>
</app-form-item>
</tab-pane>
<tab-pane v-show="detailsModel.formpage2.visible" name='formpage2' :index="1" tab='main' class=''
:label="(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.dstconfig.main_form.details.formpage2')
])
}">
<i-col v-show="detailsModel.group2.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.group2.manageContainerStatus" :isManageContainer="detailsModel.group2.isManageContainer" @managecontainerclick="manageContainerClick('group2')" layoutType="TABLE_24COL" titleStyle="" class='' :uiActionGroup="detailsModel.group2.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="$t('entities.dstconfig.main_form.details.group2')" :isShowCaption="true" uiStyle="DEFAULT" :titleBarCloseMode="0" :isInfoGroupMode="false" >
<row>
</i-col>
<i-col v-show="detailsModel.cfg.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='cfg' :itemRules="this.rules().cfg" class='' :caption="$t('entities.dstconfig.main_form.details.cfg')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.cfg.error" :isEmptyCaption="false" labelPos="TOP">
<app-code-editor :code="data.cfg" :disabled="detailsModel.cfg.disabled" @change="(val) =>{this.data.cfg =val}" codetype="javascript" ></app-code-editor>
</app-form-item>
</i-col>
<i-col v-show="detailsModel.updatedate.visible" :style="{}" :lg="{ span: 24, offset: 0 }">
<app-form-item name='updatedate' :itemRules="this.rules().updatedate" class='' :caption="$t('entities.dstconfig.main_form.details.updatedate')" uiStyle="DEFAULT" :labelWidth="130" :isShowCaption="true" :error="detailsModel.updatedate.error" :isEmptyCaption="false" labelPos="LEFT">
<app-span name='updatedate' :value="data.updatedate" dataType="DATETIME" valueFormat="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS" :precision="0"
:data="data" :context="context" :viewparams="viewparams" :localContext ='{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
</tabs>
</row>
</i-form>
</template>
......@@ -201,6 +229,15 @@ export default class MainBase extends Vue implements ControlInterface {
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 主键表单项名称
*
* @protected
* @type {string}
* @memberof MainBase
*/
public formKeyItemName: string = '';
/**
* 界面UI服务对象
*
......@@ -375,6 +412,35 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public mixinData:any = {};
/**
* 表单项校验错误提示信息
*
* @memberof MainBase
*/
public errorMessages: Array<any> = [];
/**
* 设置表单项错误提示信息
*
* @param {*} prop 表单项字段名
* @param {*} status 校验状态
* @param {*} error 错误信息
* @memberof MainBase
*/
public formItemValidate(prop: string,status: boolean, error: string){
error = error ? error : '';
if(this.errorMessages && this.errorMessages.length > 0){
const index = this.errorMessages.findIndex((errorMessage:any) => Object.is(errorMessage.prop,prop));
if(index != -1){
this.errorMessages[index].error = error;
}else{
this.errorMessages.push({prop: prop,error: error});
}
}else{
this.errorMessages.push({prop: prop,error: error});
}
}
/**
* 表单数据对象
*
......@@ -390,6 +456,12 @@ export default class MainBase extends Vue implements ControlInterface {
srfuf: null,
srfdeid: null,
srfsourcekey: null,
systemid: null,
cfgtype: null,
targettype: null,
userid: null,
cfg: null,
updatedate: null,
cfgid: null,
dstconfig:null,
};
......@@ -426,6 +498,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public saveState:any ;
/**
* 主信息属性映射表单项名称
*
* @type {string}
* @memberof MainBase
*/
public majorMessageField: string = "cfgtype";
/**
* 值规则
*
......@@ -434,6 +514,26 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public rules() :any {
return {
cfgtype: [
{ required: this.detailsModel.cfgtype.required, type: 'string', message: '配置类型 值不能为空', trigger: 'change' },
{ required: this.detailsModel.cfgtype.required, type: 'string', message: '配置类型 值不能为空', trigger: 'blur' },
],
targettype: [
{ required: this.detailsModel.targettype.required, type: 'string', message: '引用类型 值不能为空', trigger: 'change' },
{ required: this.detailsModel.targettype.required, type: 'string', message: '引用类型 值不能为空', trigger: 'blur' },
],
userid: [
{ required: this.detailsModel.userid.required, type: 'string', message: '用户标识 值不能为空', trigger: 'change' },
{ required: this.detailsModel.userid.required, type: 'string', message: '用户标识 值不能为空', trigger: 'blur' },
],
cfg: [
{ required: this.detailsModel.cfg.required, type: 'string', message: '配置内容 值不能为空', trigger: 'change' },
{ required: this.detailsModel.cfg.required, type: 'string', message: '配置内容 值不能为空', trigger: 'blur' },
],
updatedate: [
{ required: this.detailsModel.updatedate.required, type: 'string', message: '更新时间 值不能为空', trigger: 'change' },
{ required: this.detailsModel.updatedate.required, type: 'string', message: '更新时间 值不能为空', trigger: 'blur' },
],
}
}
......@@ -462,9 +562,9 @@ export default class MainBase extends Vue implements ControlInterface {
let startOp = (val:boolean)=>{
if(falg.isPast){
if(opValue){
falg.isPast = falg && val;
falg.isPast = falg.isPast && val;
}else{
falg.isPast = falg || val;
falg.isPast = falg.isPast || val;
}
}else{
falg.isPast = val;
......@@ -473,6 +573,11 @@ export default class MainBase extends Vue implements ControlInterface {
for(let i=0;i<rule[name].length;i++){
let item:any = rule[name][i];
let dataValue = item.deName?this.data[this.service.getItemNameByDeName(item.deName)]:"";
item.ruleInfo = item.ruleInfo ? item.ruleInfo : this.$t('app.formpage.valuecheckex');
if((dataValue === null || dataValue === undefined || dataValue === "") && (item.type != 'GROUP')){
startOp(true);
return falg;
}
// 常规规则
if(item.type == 'SIMPLE'){
startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond));
......@@ -505,7 +610,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
// 分组
if(item.type == 'GROUP'){
falg = this.verifyDeRules('group',item)
falg = this.verifyDeRules('group',item,item.condOP?item.condOP:"AND");
if(item.isNotMode){
falg.isPast = !falg.isPast;
}
......@@ -531,10 +636,6 @@ export default class MainBase extends Vue implements ControlInterface {
group1: new FormGroupPanelModel({ caption: '配置基本信息', detailType: 'GROUPPANEL', name: 'group1', visible: true, isShowCaption: true, form: this, isControlledContent: false , uiActionGroup: { caption: '', langbase: 'entities.dstconfig.main_form', extractMode: 'ITEM', details: [] }, isManageContainer: false, showMoreModeItems: [] })
,
formpage1: new FormPageModel({ caption: '基本信息', detailType: 'FORMPAGE', name: 'formpage1', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
group2: new FormGroupPanelModel({ caption: '操作信息', detailType: 'GROUPPANEL', name: 'group2', visible: true, isShowCaption: true, form: this, isControlledContent: false , uiActionGroup: { caption: '', langbase: 'entities.dstconfig.main_form', extractMode: 'ITEM', details: [] }, isManageContainer: false, showMoreModeItems: [] })
,
formpage2: new FormPageModel({ caption: '其它', detailType: 'FORMPAGE', name: 'formpage2', visible: true, isShowCaption: true, form: this, isControlledContent: false })
,
srfupdatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'srfupdatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
......@@ -551,10 +652,21 @@ export default class MainBase extends Vue implements ControlInterface {
srfdeid: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfdeid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
srfsourcekey: new FormItemModel({ caption: '', detailType: 'FORMITEM', name: 'srfsourcekey', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
systemid: new FormItemModel({ caption: '系统标识', detailType: 'FORMITEM', name: 'systemid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
cfgtype: new FormItemModel({ caption: '配置类型', detailType: 'FORMITEM', name: 'cfgtype', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
targettype: new FormItemModel({ caption: '引用类型', detailType: 'FORMITEM', name: 'targettype', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
userid: new FormItemModel({ caption: '用户标识', detailType: 'FORMITEM', name: 'userid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
cfg: new FormItemModel({ caption: '配置内容', detailType: 'FORMITEM', name: 'cfg', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
updatedate: new FormItemModel({ caption: '更新时间', detailType: 'FORMITEM', name: 'updatedate', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
cfgid: new FormItemModel({ caption: '标识', detailType: 'FORMITEM', name: 'cfgid', visible: true, isShowCaption: true, form: this, isControlledContent: false , required:false, disabled: false, enableCond: 3 })
,
form: new FormTabPanelModel({ caption: 'form', detailType: 'TABPANEL', name: 'form', visible: true, isShowCaption: true, form: this, tabPages: [{ name: 'formpage1', index: 0, visible: true }, { name: 'formpage2', index: 1, visible: true }] }),
};
/**
......@@ -653,6 +765,78 @@ export default class MainBase extends Vue implements ControlInterface {
this.formDataChange({ name: 'srfsourcekey', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 systemid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.systemid')
onSystemidChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'systemid', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 cfgtype 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.cfgtype')
onCfgtypeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'cfgtype', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 targettype 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.targettype')
onTargettypeChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'targettype', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 userid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.userid')
onUseridChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'userid', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 cfg 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.cfg')
onCfgChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'cfg', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 updatedate 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainBase
*/
@Watch('data.updatedate')
onUpdatedateChange(newVal: any, oldVal: any) {
this.formDataChange({ name: 'updatedate', newVal: newVal, oldVal: oldVal });
}
/**
* 监控表单属性 cfgid 值
*
......@@ -732,6 +916,10 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
......@@ -1230,6 +1418,7 @@ export default class MainBase extends Vue implements ControlInterface {
const arg: any = { ...opt };
const data = this.getValues();
Object.assign(arg, data);
Object.assign(arg,{srfmajortext:data[this.majorMessageField]});
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
......@@ -1255,24 +1444,45 @@ export default class MainBase extends Vue implements ControlInterface {
});
}).catch((response: any) => {
if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}else{
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
if (response.data.errorKey) {
if(Object.is(response.data.errorKey, "versionCheck")) {
this.$Modal.confirm({
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
} else if(Object.is(response.data.errorKey, 'DupCheck')) {
let errorProp: string = response.data.message.match(/\[[a-zA-Z]*\]/)[0];
let name: string = this.service.getNameByProp(errorProp.substr(1, errorProp.length-2));
if(name) {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: this.detailsModel[name].caption + " : " + arg[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: response.data.message?response.data.message:(this.$t('app.commonWords.sysException') as string),
})
}
}else if(Object.is(response.data.errorKey, 'DuplicateKeyException')){
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: this.detailsModel[this.formKeyItemName].caption + " : " + arg[this.formKeyItemName] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message?response.data.message:(this.$t('app.commonWords.sysException') as string) });
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message?response.data.message:(this.$t('app.commonWords.sysException') as string) });
}
return;
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
}
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return;
}
});
}
......@@ -1289,13 +1499,22 @@ export default class MainBase extends Vue implements ControlInterface {
return new Promise((resolve: any, reject: any) => {
showResultInfo = showResultInfo === undefined ? true : false;
if (!this.formValidateStatus()) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.valuecheckex') as string) });
if(this.errorMessages && this.errorMessages.length > 0) {
let descMessage: string = '';
this.errorMessages.forEach((message: any) => {
descMessage = descMessage + '<p>' + message.error + '<p>';
})
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: descMessage });
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.valuecheckex') as string) });
}
return;
}
const arg: any = { ...opt };
const data = this.getValues();
Object.assign(arg, this.context);
Object.assign(arg, data);
Object.assign(arg,{srfmajortext:data[this.majorMessageField]});
if (ifStateNext) {
this.drcounter = 0;
if(this.drcounter !== 0){
......@@ -1336,27 +1555,43 @@ export default class MainBase extends Vue implements ControlInterface {
}
resolve(response);
}).catch((response: any) => {
if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}else{
if (response && response.status && response.data) {
if (response.data.errorKey) {
if(Object.is(response.data.errorKey, "versionCheck")) {
this.$Modal.confirm({
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
} else if(Object.is(response.data.errorKey, 'DupCheck')) {
let errorProp: string = response.data.message.match(/\[[a-zA-Z]*\]/)[0];
let name: string = this.service.getNameByProp(errorProp.substr(1, errorProp.length-2));
if(name) {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: this.detailsModel[name].caption + " : " + arg[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: response.data.message,
})
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response);
}
return;
}
if (!response || !response.status || !response.data) {
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response);
return;
}
}
reject(response);
});
})
......@@ -1763,6 +1998,9 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public createDefault(){
if (this.data.hasOwnProperty('systemid')) {
this.data['systemid'] = this.context['dstsystemid'];
}
}
/**
......@@ -1770,6 +2008,9 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public updateDefault(){
if (this.data.hasOwnProperty('systemid') && !this.data.systemid) {
this.data['systemid'] = this.context['dstsystemid'];
}
}
......
......@@ -55,6 +55,36 @@ export default class MainModel {
{
name: 'srfsourcekey',
},
{
name: 'systemid',
prop: 'system_id',
dataType: 'PICKUP',
},
{
name: 'cfgtype',
prop: 'cfg_type',
dataType: 'TEXT',
},
{
name: 'targettype',
prop: 'target_type',
dataType: 'TEXT',
},
{
name: 'userid',
prop: 'user_id',
dataType: 'TEXT',
},
{
name: 'cfg',
prop: 'cfg',
dataType: 'LONGTEXT',
},
{
name: 'updatedate',
prop: 'update_date',
dataType: 'DATETIME',
},
{
name: 'cfgid',
prop: 'cfg_id',
......
......@@ -21,6 +21,66 @@
<template v-if="!isSingleSelect">
<el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
</template>
<template v-if="getColumnState('cfgtype')">
<el-table-column show-overflow-tooltip :prop="'cfgtype'" :label="$t('entities.dstconfig.main_grid.columns.cfgtype')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.dstconfig.main_grid.columns.cfgtype')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.cfgtype}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('targettype')">
<el-table-column show-overflow-tooltip :prop="'targettype'" :label="$t('entities.dstconfig.main_grid.columns.targettype')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.dstconfig.main_grid.columns.targettype')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.targettype}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('systemid')">
<el-table-column show-overflow-tooltip :prop="'systemid'" :label="$t('entities.dstconfig.main_grid.columns.systemid')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.dstconfig.main_grid.columns.systemid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.systemid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('userid')">
<el-table-column show-overflow-tooltip :prop="'userid'" :label="$t('entities.dstconfig.main_grid.columns.userid')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.dstconfig.main_grid.columns.userid')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.userid}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('updatedate')">
<el-table-column show-overflow-tooltip :prop="'updatedate'" :label="$t('entities.dstconfig.main_grid.columns.updatedate')" :width="300" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.dstconfig.main_grid.columns.updatedate')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<app-format-data format="YYYY-MM-DD HH:mm:ss" :data="row.updatedate"></app-format-data>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
......@@ -205,7 +265,6 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
* 代码表服务对象
*
......@@ -214,6 +273,14 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 主信息表格列
*
* @type {string}
* @memberof MainBase
*/
public majorInfoColName:string = "cfgtype";
/**
* 界面UI服务对象
*
......@@ -571,6 +638,51 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public allColumns: any[] = [
{
name: 'cfgtype',
label: '配置类型',
langtag: 'entities.dstconfig.main_grid.columns.cfgtype',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'targettype',
label: '引用类型',
langtag: 'entities.dstconfig.main_grid.columns.targettype',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'systemid',
label: '系统标识',
langtag: 'entities.dstconfig.main_grid.columns.systemid',
show: false,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'userid',
label: '用户标识',
langtag: 'entities.dstconfig.main_grid.columns.userid',
show: false,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
{
name: 'updatedate',
label: '更新时间',
langtag: 'entities.dstconfig.main_grid.columns.updatedate',
show: true,
unit: 'PX',
isEnableRowEdit: false,
enableCond: 3 ,
},
]
/**
......@@ -683,16 +795,18 @@ export default class MainBase extends Vue implements ControlInterface {
this.errorMessages = [];
let validateState = true;
let index = -1;
for(let item of this.items){
index++;
if(item.rowDataState === "create" || item.rowDataState === "update"){
for(let property of Object.keys(this.rules)){
if(!await this.validate(property,item,index)){
validateState = false;
this.errorMessages.push(this.gridItemsModel[index][property].error);
}
for (let item of this.items) {
let tempMessage: string = '';
index++;
if (item.rowDataState === "create" || item.rowDataState === "update") {
for (let property of Object.keys(this.rules)) {
if (!await this.validate(property, item, index)) {
validateState = false;
tempMessage = tempMessage + '<p>' + this.gridItemsModel[index][property].error + '<p>';
}
}
}
}
this.errorMessages.push(tempMessage);
}
return validateState;
}
......@@ -817,7 +931,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
let dataInfo = '';
_datas.forEach((record: any, index: number) => {
let srfmajortext = record.cfg_type;
let srfmajortext = record.cfgtype;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
......@@ -829,9 +943,9 @@ export default class MainBase extends Vue implements ControlInterface {
});
if (_datas.length < 5) {
dataInfo = dataInfo + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.records') as string)+(this.$t('app.gridpage.data') as string);
dataInfo = dataInfo + ' ' + (this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.records') as string) + (this.$t('app.gridpage.data') as string);
} else {
dataInfo = dataInfo + '...' + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.desc2') as string);
dataInfo = ' ... ' + (this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.records') as string) + (this.$t('app.gridpage.data') as string);
}
const removeData = () => {
......@@ -1135,7 +1249,7 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if (Object.is('load', action)) {
this.load(data);
this.load(data,true);
}
if (Object.is('remove', action)) {
this.remove(data);
......@@ -1224,7 +1338,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = [];
let allColumns:Array<any> = ['cfgtype','targettype','systemid','userid','updatedate'];
if(row && row.children && row.children.length>0) {
if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1];
......@@ -1267,6 +1381,11 @@ export default class MainBase extends Vue implements ControlInterface {
const tree: any ={
groupById: Number((groupIndex+1)*10),
group: group,
cfgtype:'',
targettype:'',
systemid:'',
userid:'',
updatedate:'',
children: children,
}
groupTree.push(tree);
......@@ -1623,11 +1742,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
if (!await this.validateAll()) {
if(this.errorMessages && this.errorMessages.length > 0) {
let descMessage: string = '';
this.errorMessages.forEach((message: any) => {
descMessage = descMessage + '<p>' + message + '<p>';
})
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: descMessage });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: this.errorMessages[0] });
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
}
......@@ -1668,10 +1783,40 @@ export default class MainBase extends Vue implements ControlInterface {
if(errorItems.length === 0 && successItems.length >0 && !this.isformDruipart){
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: errorMessage[index].data.message });
console.error(errorMessage[index]);
});
errorItems.forEach((item: any, index: number) => {
if(errorMessage[index] && errorMessage[index].data) {
if(Object.is(errorMessage[index].data.errorKey, 'DupCheck')) {
let errorProp: string = errorMessage[index].data.message.match(/\[[a-zA-Z]*\]/)[0];
let name: string = errorProp ? this.service.getNameByProp(errorProp.substr(1, errorProp.length-2)) : '';
if(name) {
let desc: any = this.allColumns.find((column: any) =>{
return Object.is(column.name, name);
});
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: (desc ? desc.label : '') + " : " + item[name] + (this.$t('app.commonWords.isExist') as string) + '!',
});
} else {
this.$Notice.error({
title: (this.$t('app.commonWords.createFailed') as string),
desc: errorMessage[index].data.message?errorMessage[index].data.message:(this.$t('app.commonWords.sysException') as string),
});
}
} else if(Object.is(errorMessage[index].data.errorKey, 'DuplicateKeyException')){
this.$Notice.error({
title: (this.$t('app.commonWords.saveFailed') as string),
desc: errorMessage[index].data.message?errorMessage[index].data.message:(this.$t('app.commonWords.sysException') as string),
});
}else {
this.$Notice.error({
title: (this.$t('app.commonWords.saveFailed') as string),
desc: errorMessage[index].data.message?errorMessage[index].data.message:(this.$t('app.commonWords.sysException') as string),
});
}
} else {
this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: (item[this.majorInfoColName]?item[this.majorInfoColName]:"") + (this.$t('app.commonWords.saveFailed') as string) + '!' });
}
});
}
return successItems;
}
......@@ -1929,15 +2074,19 @@ export default class MainBase extends Vue implements ControlInterface {
let startOp = (val:boolean)=>{
if(falg.isPast){
if(opValue){
falg.isPast = falg && val;
falg.isPast = falg.isPast && val;
}else{
falg.isPast = falg || val;
falg.isPast = falg.isPast || val;
}
}else{
falg.isPast = val;
}
}
rule[name].forEach((item:any) => {
if((value === null || value === undefined || value === "") && (item.type != 'GROUP')){
startOp(true);
return falg;
}
// 常规规则
if(item.type == 'SIMPLE'){
startOp(!this.$verify.checkFieldSimpleRule(value,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.curEditRowData,item.isKeyCond));
......@@ -1960,7 +2109,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
// 分组
if(item.type == 'GROUP'){
falg = this.verifyDeRules('group',item,"AND",value)
falg = this.verifyDeRules('group',item,item.condOP?item.condOP:"AND",value)
if(item.isNotMode){
falg.isPast = !falg.isPast;
}
......
......@@ -31,6 +31,26 @@ export default class MainModel {
prop: 'system_id',
dataType: 'PICKUP',
},
{
name: 'targettype',
prop: 'target_type',
dataType: 'TEXT',
},
{
name: 'userid',
prop: 'user_id',
dataType: 'TEXT',
},
{
name: 'cfgtype',
prop: 'cfg_type',
dataType: 'TEXT',
},
{
name: 'updatedate',
prop: 'update_date',
dataType: 'DATETIME',
},
{
name: 'srfmajortext',
prop: 'cfg_type',
......@@ -51,6 +71,21 @@ export default class MainModel {
name: 'dstconfig',
prop: 'cfg_id',
},
{
name: 'n_cfgtype_eq',
prop: 'n_cfgtype_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_targettype_eq',
prop: 'n_targettype_eq',
dataType: 'QUERYPARAM'
},
{
name: 'n_systemid_eq',
prop: 'n_systemid_eq',
dataType: 'QUERYPARAM'
},
{
name:'size',
......
......@@ -46,7 +46,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -90,10 +90,10 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 创建时间
*/
@DEField(name = "create_time" , preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "create_time" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createtime" , format="yyyy-MM-dd HH:mm:ss")
@DEField(name = "create_time", preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "create_time", fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "createtime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("createtime")
private Timestamp createtime;
/**
......@@ -115,10 +115,10 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 修改时间
*/
@DEField(name = "update_time" , preType = DEPredefinedFieldType.UPDATEDATE)
@DEField(name = "update_time", preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "update_time")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatetime" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "updatetime", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatetime")
private Timestamp updatetime;
/**
......@@ -132,8 +132,8 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 是否已删除
*/
@DEField(name = "is_deleted" , preType = DEPredefinedFieldType.LOGICVALID, logicval = "0" , logicdelval="1")
@TableLogic(value= "0",delval="1")
@DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "0", logicdelval = "1")
@TableLogic(value= "0", delval = "1")
@TableField(value = "is_deleted")
@JSONField(name = "isdeleted")
@JsonProperty("isdeleted")
......@@ -144,7 +144,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [大屏标题]
*/
public void setTitle(String title){
public void setTitle(String title) {
this.title = title ;
this.modify("title",title);
}
......@@ -152,7 +152,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [大屏类型]
*/
public void setCategory(Integer category){
public void setCategory(Integer category) {
this.category = category ;
this.modify("category",category);
}
......@@ -160,7 +160,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [发布密码]
*/
public void setPassword(String password){
public void setPassword(String password) {
this.password = password ;
this.modify("password",password);
}
......@@ -168,7 +168,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [大屏背景]
*/
public void setBackgroundurl(String backgroundurl){
public void setBackgroundurl(String backgroundurl) {
this.backgroundurl = backgroundurl ;
this.modify("background_url",backgroundurl);
}
......@@ -176,7 +176,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [状态]
*/
public void setStatus(Integer status){
public void setStatus(Integer status) {
this.status = status ;
this.modify("status",status);
}
......@@ -184,7 +184,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [创建部门]
*/
public void setCreatedept(Long createdept){
public void setCreatedept(Long createdept) {
this.createdept = createdept ;
this.modify("create_dept",createdept);
}
......@@ -192,7 +192,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [创建人]
*/
public void setCreateuser(Long createuser){
public void setCreateuser(Long createuser) {
this.createuser = createuser ;
this.modify("create_user",createuser);
}
......@@ -200,7 +200,7 @@ public class BladeVisual extends EntityMP implements Serializable {
/**
* 设置 [修改人]
*/
public void setUpdateuser(Long updateuser){
public void setUpdateuser(Long updateuser) {
this.updateuser = updateuser ;
this.modify("update_user",updateuser);
}
......
......@@ -46,7 +46,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -70,8 +70,8 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/**
* 是否已删除
*/
@DEField(name = "is_deleted" , preType = DEPredefinedFieldType.LOGICVALID, logicval = "1" , logicdelval="0")
@TableLogic(value= "1",delval="0")
@DEField(name = "is_deleted", preType = DEPredefinedFieldType.LOGICVALID, logicval = "1", logicdelval = "0")
@TableLogic(value= "1", delval = "0")
@TableField(value = "is_deleted")
@JSONField(name = "isdeleted")
@JsonProperty("isdeleted")
......@@ -82,7 +82,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/**
* 设置 [分类键值]
*/
public void setCategorykey(String categorykey){
public void setCategorykey(String categorykey) {
this.categorykey = categorykey ;
this.modify("category_key",categorykey);
}
......@@ -90,7 +90,7 @@ public class BladeVisualCategory extends EntityMP implements Serializable {
/**
* 设置 [分类名称]
*/
public void setCategoryvalue(String categoryvalue){
public void setCategoryvalue(String categoryvalue) {
this.categoryvalue = categoryvalue ;
this.modify("category_value",categoryvalue);
}
......
......@@ -46,7 +46,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -79,7 +79,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 设置 [可视化表主键]
*/
public void setVisualid(Long visualid){
public void setVisualid(Long visualid) {
this.visualid = visualid ;
this.modify("visual_id",visualid);
}
......@@ -87,7 +87,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 设置 [组件json]
*/
public void setComponent(String component){
public void setComponent(String component) {
this.component = component ;
this.modify("component",component);
}
......@@ -95,7 +95,7 @@ public class BladeVisualConfig extends EntityMP implements Serializable {
/**
* 设置 [配置json]
*/
public void setDetail(String detail){
public void setDetail(String detail) {
this.detail = detail ;
this.modify("detail",detail);
}
......
......@@ -46,7 +46,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/**
* 主键
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "id",type=IdType.ASSIGN_ID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -71,7 +71,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/**
* 设置 [地图名称]
*/
public void setName(String name){
public void setName(String name) {
this.name = name ;
this.modify("name",name);
}
......@@ -79,7 +79,7 @@ public class BladeVisualMap extends EntityMP implements Serializable {
/**
* 设置 [地图数据]
*/
public void setData(String data){
public void setData(String data) {
this.data = data ;
this.modify("data",data);
}
......
......@@ -31,6 +31,7 @@ public class BladeVisualCategorySearchContext extends QueryWrapperContext<BladeV
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -31,6 +31,7 @@ public class BladeVisualConfigSearchContext extends QueryWrapperContext<BladeVis
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -31,6 +31,7 @@ public class BladeVisualMapSearchContext extends QueryWrapperContext<BladeVisual
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -38,6 +38,7 @@ public class BladeVisualSearchContext extends QueryWrapperContext<BladeVisual> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -54,8 +54,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override
@Transactional
public boolean create(BladeVisualCategory et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override
@Transactional
public boolean update(BladeVisualCategory et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
@Override
@Transactional
public boolean save(BladeVisualCategory et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override
@Transactional
public boolean create(BladeVisualConfig et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override
@Transactional
public boolean update(BladeVisualConfig et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
@Override
@Transactional
public boolean save(BladeVisualConfig et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override
@Transactional
public boolean create(BladeVisualMap et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override
@Transactional
public boolean update(BladeVisualMap et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
@Override
@Transactional
public boolean save(BladeVisualMap et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override
@Transactional
public boolean create(BladeVisual et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override
@Transactional
public boolean update(BladeVisual et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("id",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -119,8 +121,9 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
@Override
@Transactional
public boolean save(BladeVisual et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -46,7 +46,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 部件标识
*/
@DEField(name = "cid" , isKeyField=true)
@DEField(name = "cid" , isKeyField = true)
@TableId(value= "cid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -140,7 +140,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [名称]
*/
public void setName(String name){
public void setName(String name) {
this.name = name ;
this.modify("cname",name);
}
......@@ -148,7 +148,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [代码名称]
*/
public void setCodeName(String codeName){
public void setCodeName(String codeName) {
this.codeName = codeName ;
this.modify("codename",codeName);
}
......@@ -156,7 +156,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [系统标识]
*/
public void setSystemId(String systemId){
public void setSystemId(String systemId) {
this.systemId = systemId ;
this.modify("systemid",systemId);
}
......@@ -164,7 +164,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [应用标识]
*/
public void setAppId(String appId){
public void setAppId(String appId) {
this.appId = appId ;
this.modify("appid",appId);
}
......@@ -172,7 +172,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [类型]
*/
public void setType(String type){
public void setType(String type) {
this.type = type ;
this.modify("ctype",type);
}
......@@ -180,7 +180,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [实体标识]
*/
public void setEntityId(String entityId){
public void setEntityId(String entityId) {
this.entityId = entityId ;
this.modify("entityid",entityId);
}
......@@ -188,7 +188,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 设置 [配置]
*/
public void setConfig(String config){
public void setConfig(String config) {
this.config = config ;
this.modify("cfg",config);
}
......@@ -197,7 +197,7 @@ public class DstComponent extends EntityMP implements Serializable {
/**
* 获取 [部件标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "cfgid",type=IdType.ASSIGN_UUID)
@JSONField(name = "cfg_id")
@JsonProperty("cfg_id")
......@@ -92,8 +92,8 @@ public class DstConfig extends EntityMP implements Serializable {
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "update_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone = "GMT+8")
@JSONField(name = "update_date", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("update_date")
private Timestamp updateDate;
......@@ -110,7 +110,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 设置 [系统标识]
*/
public void setSystemId(String systemId){
public void setSystemId(String systemId) {
this.systemId = systemId ;
this.modify("systemid",systemId);
}
......@@ -118,7 +118,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 设置 [配置类型]
*/
public void setCfgType(String cfgType){
public void setCfgType(String cfgType) {
this.cfgType = cfgType ;
this.modify("cfgtype",cfgType);
}
......@@ -126,7 +126,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 设置 [引用类型]
*/
public void setTargetType(String targetType){
public void setTargetType(String targetType) {
this.targetType = targetType ;
this.modify("targettype",targetType);
}
......@@ -134,7 +134,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 设置 [配置内容]
*/
public void setCfg(String cfg){
public void setCfg(String cfg) {
this.cfg = cfg ;
this.modify("cfg",cfg);
}
......@@ -143,7 +143,7 @@ public class DstConfig extends EntityMP implements Serializable {
/**
* 获取 [标识]
*/
public String getCfgId(){
public String getCfgId() {
if(ObjectUtils.isEmpty(cfgId)){
cfgId=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(defaultValue = "dsname" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField=true)
@DEField(defaultValue = "dsname" , defaultValueType = DEFieldDefaultValueType.PARAM , isKeyField = true)
@TableId(value= "dsid",type=IdType.ASSIGN_UUID)
@JSONField(name = "ds_id")
@JsonProperty("ds_id")
......@@ -78,7 +78,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/**
* 设置 [数据源名称]
*/
public void setDsName(String dsName){
public void setDsName(String dsName) {
this.dsName = dsName ;
this.modify("dsname",dsName);
}
......@@ -86,7 +86,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/**
* 设置 [类型]
*/
public void setDsType(String dsType){
public void setDsType(String dsType) {
this.dsType = dsType ;
this.modify("dstype",dsType);
}
......@@ -94,7 +94,7 @@ public class DstDataSource extends EntityMP implements Serializable {
/**
* 设置 [配置]
*/
public void setDsCfg(String dsCfg){
public void setDsCfg(String dsCfg) {
this.dsCfg = dsCfg ;
this.modify("dscfg",dsCfg);
}
......
......@@ -46,7 +46,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 路径标识
*/
@DEField(name = "routerid" , isKeyField=true)
@DEField(name = "routerid" , isKeyField = true)
@TableId(value= "routerid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -132,7 +132,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [路径名称]
*/
public void setName(String name){
public void setName(String name) {
this.name = name ;
this.modify("routername",name);
}
......@@ -140,7 +140,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [系统标识]
*/
public void setSystemId(String systemId){
public void setSystemId(String systemId) {
this.systemId = systemId ;
this.modify("systemid",systemId);
}
......@@ -148,7 +148,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [应用标识]
*/
public void setAppId(String appId){
public void setAppId(String appId) {
this.appId = appId ;
this.modify("appid",appId);
}
......@@ -156,7 +156,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [路径]
*/
public void setPath(String path){
public void setPath(String path) {
this.path = path ;
this.modify("routerpath",path);
}
......@@ -164,7 +164,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [父路径标识]
*/
public void setParentid(String parentid){
public void setParentid(String parentid) {
this.parentid = parentid ;
this.modify("parentid",parentid);
}
......@@ -172,7 +172,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [meta]
*/
public void setMeta(String meta){
public void setMeta(String meta) {
this.meta = meta ;
this.modify("meta",meta);
}
......@@ -180,7 +180,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 设置 [组件]
*/
public void setComponent(String component){
public void setComponent(String component) {
this.component = component ;
this.modify("component",component);
}
......@@ -189,7 +189,7 @@ public class DstRouter extends EntityMP implements Serializable {
/**
* 获取 [路径标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(name = "viewid" , isKeyField=true)
@DEField(name = "viewid" , isKeyField = true)
@TableId(value= "viewid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -133,7 +133,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 设置 [名称]
*/
public void setName(String name){
public void setName(String name) {
this.name = name ;
this.modify("viewname",name);
}
......@@ -141,7 +141,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 设置 [视图路径]
*/
public void setPath(String path){
public void setPath(String path) {
this.path = path ;
this.modify("viewpath",path);
}
......@@ -149,7 +149,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 设置 [系统标识]
*/
public void setSystemId(String systemId){
public void setSystemId(String systemId) {
this.systemId = systemId ;
this.modify("systemid",systemId);
}
......@@ -157,7 +157,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 设置 [应用标识]
*/
public void setAppId(String appId){
public void setAppId(String appId) {
this.appId = appId ;
this.modify("appid",appId);
}
......@@ -165,7 +165,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 设置 [实体标识]
*/
public void setEntityId(String entityId){
public void setEntityId(String entityId) {
this.entityId = entityId ;
this.modify("entityid",entityId);
}
......@@ -173,7 +173,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 设置 [配置]
*/
public void setConfig(String config){
public void setConfig(String config) {
this.config = config ;
this.modify("cfg",config);
}
......@@ -182,7 +182,7 @@ public class DstView extends EntityMP implements Serializable {
/**
* 获取 [标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "datasetid",type=IdType.ASSIGN_UUID)
@JSONField(name = "dataset_id")
@JsonProperty("dataset_id")
......@@ -107,7 +107,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 设置 [名称]
*/
public void setDatasetName(String datasetName){
public void setDatasetName(String datasetName) {
this.datasetName = datasetName ;
this.modify("datasetname",datasetName);
}
......@@ -115,7 +115,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 设置 [实体标识]
*/
public void setEntityId(String entityId){
public void setEntityId(String entityId) {
this.entityId = entityId ;
this.modify("entityid",entityId);
}
......@@ -123,7 +123,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 设置 [实体]
*/
public void setEntityName(String entityName){
public void setEntityName(String entityName) {
this.entityName = entityName ;
this.modify("entityname",entityName);
}
......@@ -131,7 +131,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 设置 [代码名称]
*/
public void setCodeName(String codeName){
public void setCodeName(String codeName) {
this.codeName = codeName ;
this.modify("codename",codeName);
}
......@@ -139,7 +139,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 设置 [代码]
*/
public void setDsCode(String dsCode){
public void setDsCode(String dsCode) {
this.dsCode = dsCode ;
this.modify("dscode",dsCode);
}
......@@ -147,7 +147,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 设置 [模型]
*/
public void setDsModel(String dsModel){
public void setDsModel(String dsModel) {
this.dsModel = dsModel ;
this.modify("dsmodel",dsModel);
}
......@@ -156,7 +156,7 @@ public class MetaDataSet extends EntityMP implements Serializable {
/**
* 获取 [标识]
*/
public String getDatasetId(){
public String getDatasetId() {
if(ObjectUtils.isEmpty(datasetId)){
datasetId=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 属性标识
*/
@DEField(isKeyField=true)
@DEField(isKeyField = true)
@TableId(value= "fieldid",type=IdType.ASSIGN_UUID)
@JSONField(name = "field_id")
@JsonProperty("field_id")
......@@ -292,7 +292,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [属性名称]
*/
public void setFieldName(String fieldName){
public void setFieldName(String fieldName) {
this.fieldName = fieldName ;
this.modify("fieldname",fieldName);
}
......@@ -300,7 +300,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [代码名称]
*/
public void setCodeName(String codeName){
public void setCodeName(String codeName) {
this.codeName = codeName ;
this.modify("codename",codeName);
}
......@@ -308,7 +308,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [实体标识]
*/
public void setEntityId(String entityId){
public void setEntityId(String entityId) {
this.entityId = entityId ;
this.modify("entityid",entityId);
}
......@@ -316,7 +316,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [实体名称]
*/
public void setEntityName(String entityName){
public void setEntityName(String entityName) {
this.entityName = entityName ;
this.modify("entityname",entityName);
}
......@@ -324,7 +324,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [属性逻辑名]
*/
public void setFieldLogicName(String fieldLogicName){
public void setFieldLogicName(String fieldLogicName) {
this.fieldLogicName = fieldLogicName ;
this.modify("fieldlogicname",fieldLogicName);
}
......@@ -332,7 +332,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [引用属性标识]
*/
public void setRefFieldId(String refFieldId){
public void setRefFieldId(String refFieldId) {
this.refFieldId = refFieldId ;
this.modify("reffieldid",refFieldId);
}
......@@ -340,7 +340,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [引用属性名称]
*/
public void setRefFieldName(String refFieldName){
public void setRefFieldName(String refFieldName) {
this.refFieldName = refFieldName ;
this.modify("reffieldname",refFieldName);
}
......@@ -348,7 +348,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [引用关系标识]
*/
public void setRelationId(String relationId){
public void setRelationId(String relationId) {
this.relationId = relationId ;
this.modify("relationid",relationId);
}
......@@ -356,7 +356,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [引用关系]
*/
public void setRelationName(String relationName){
public void setRelationName(String relationName) {
this.relationName = relationName ;
this.modify("relationname",relationName);
}
......@@ -364,7 +364,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [主键]
*/
public void setKeyField(Integer keyField){
public void setKeyField(Integer keyField) {
this.keyField = keyField ;
this.modify("keyfield",keyField);
}
......@@ -372,7 +372,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [主信息]
*/
public void setMajorField(Integer majorField){
public void setMajorField(Integer majorField) {
this.majorField = majorField ;
this.modify("majorfield",majorField);
}
......@@ -380,7 +380,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [联合主键]
*/
public void setUnionKey(String unionKey){
public void setUnionKey(String unionKey) {
this.unionKey = unionKey ;
this.modify("unionkey",unionKey);
}
......@@ -388,7 +388,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [属性类型]
*/
public void setFieldType(String fieldType){
public void setFieldType(String fieldType) {
this.fieldType = fieldType ;
this.modify("fieldtype",fieldType);
}
......@@ -396,7 +396,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [预定义类型]
*/
public void setPredefined(String predefined){
public void setPredefined(String predefined) {
this.predefined = predefined ;
this.modify("predefined",predefined);
}
......@@ -404,7 +404,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [数据字典]
*/
public void setDict(String dict){
public void setDict(String dict) {
this.dict = dict ;
this.modify("dict",dict);
}
......@@ -412,7 +412,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [允许为空]
*/
public void setNullable(Integer nullable){
public void setNullable(Integer nullable) {
this.nullable = nullable ;
this.modify("nullable",nullable);
}
......@@ -420,7 +420,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [物理属性]
*/
public void setPhysicalField(Integer physicalField){
public void setPhysicalField(Integer physicalField) {
this.physicalField = physicalField ;
this.modify("physicalfield",physicalField);
}
......@@ -428,7 +428,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [数据类型]
*/
public void setDataType(String dataType){
public void setDataType(String dataType) {
this.dataType = dataType ;
this.modify("datatype",dataType);
}
......@@ -436,7 +436,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [长度]
*/
public void setDataLength(Integer dataLength){
public void setDataLength(Integer dataLength) {
this.dataLength = dataLength ;
this.modify("datalength",dataLength);
}
......@@ -444,7 +444,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [精度]
*/
public void setDataPreci(Integer dataPreci){
public void setDataPreci(Integer dataPreci) {
this.dataPreci = dataPreci ;
this.modify("datapreci",dataPreci);
}
......@@ -452,7 +452,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [逻辑表达式]
*/
public void setExpression(String expression){
public void setExpression(String expression) {
this.expression = expression ;
this.modify("expression",expression);
}
......@@ -460,7 +460,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [扩展属性]
*/
public void setExtensionField(Integer extensionField){
public void setExtensionField(Integer extensionField) {
this.extensionField = extensionField ;
this.modify("extensionfield",extensionField);
}
......@@ -468,7 +468,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [审计]
*/
public void setIsEnableAudit(Integer isEnableAudit){
public void setIsEnableAudit(Integer isEnableAudit) {
this.isEnableAudit = isEnableAudit ;
this.modify("isenableaudit",isEnableAudit);
}
......@@ -476,7 +476,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 设置 [排序]
*/
public void setShowOrder(Integer showOrder){
public void setShowOrder(Integer showOrder) {
this.showOrder = showOrder ;
this.modify("showorder",showOrder);
}
......@@ -485,7 +485,7 @@ public class MetaField extends EntityMP implements Serializable {
/**
* 获取 [属性标识]
*/
public String getFieldId(){
public String getFieldId() {
if(ObjectUtils.isEmpty(fieldId)){
fieldId=(String)getDefaultKey(true);
}
......
......@@ -46,7 +46,7 @@ public class MetaModel extends EntityMP implements Serializable {
/**
* 标识
*/
@DEField(name = "modelid" , isKeyField=true)
@DEField(name = "modelid" , isKeyField = true)
@TableId(value= "modelid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -80,7 +80,7 @@ public class MetaModel extends EntityMP implements Serializable {
/**
* 设置 [名称]
*/
public void setName(String name){
public void setName(String name) {
this.name = name ;
this.modify("modelname",name);
}
......@@ -88,7 +88,7 @@ public class MetaModel extends EntityMP implements Serializable {
/**
* 设置 [代码名称]
*/
public void setCodeName(String codeName){
public void setCodeName(String codeName) {
this.codeName = codeName ;
this.modify("codename",codeName);
}
......@@ -96,7 +96,7 @@ public class MetaModel extends EntityMP implements Serializable {
/**
* 设置 [配置]
*/
public void setConfig(String config){
public void setConfig(String config) {
this.config = config ;
this.modify("modelcfg",config);
}
......
......@@ -46,7 +46,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 关系标识
*/
@DEField(name = "relationid" , isKeyField=true)
@DEField(name = "relationid" , isKeyField = true)
@TableId(value= "relationid",type=IdType.ASSIGN_UUID)
@JSONField(name = "id")
@JsonProperty("id")
......@@ -145,7 +145,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [lookup]
*/
public void setLookup(List<cn.ibizlab.core.lite.domain.DstLookup> lookup){
public void setLookup(List<cn.ibizlab.core.lite.domain.DstLookup> lookup) {
this.lookup = lookup ;
this.modify("lookup",(lookup!=null)?lookup:(new ArrayList()));
}
......@@ -153,7 +153,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [关系名称]
*/
public void setName(String name){
public void setName(String name) {
this.name = name ;
this.modify("relationname",name);
}
......@@ -161,7 +161,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [类型]
*/
public void setRelationType(String relationType){
public void setRelationType(String relationType) {
this.relationType = relationType ;
this.modify("reltype",relationType);
}
......@@ -169,7 +169,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [代码名称]
*/
public void setCodeName(String codeName){
public void setCodeName(String codeName) {
this.codeName = codeName ;
this.modify("codename",codeName);
}
......@@ -177,7 +177,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [实体标识]
*/
public void setEntityId(String entityId){
public void setEntityId(String entityId) {
this.entityId = entityId ;
this.modify("entityid",entityId);
}
......@@ -185,7 +185,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [实体名称]
*/
public void setEntityName(String entityName){
public void setEntityName(String entityName) {
this.entityName = entityName ;
this.modify("entityname",entityName);
}
......@@ -193,7 +193,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [引用实体标识]
*/
public void setRefEntityId(String refEntityId){
public void setRefEntityId(String refEntityId) {
this.refEntityId = refEntityId ;
this.modify("refentityid",refEntityId);
}
......@@ -201,7 +201,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [引用实体名称]
*/
public void setRefEntityName(String refEntityName){
public void setRefEntityName(String refEntityName) {
this.refEntityName = refEntityName ;
this.modify("refentityname",refEntityName);
}
......@@ -209,7 +209,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 设置 [嵌套代码名称]
*/
public void setNestedName(String nestedName){
public void setNestedName(String nestedName) {
this.nestedName = nestedName ;
this.modify("nestedname",nestedName);
}
......@@ -218,7 +218,7 @@ public class MetaRelationship extends EntityMP implements Serializable {
/**
* 获取 [关系标识]
*/
public String getId(){
public String getId() {
if(ObjectUtils.isEmpty(id)){
id=(String)getDefaultKey(true);
}
......
......@@ -87,6 +87,7 @@ public class DstComponentSearchContext extends QueryWrapperContext<DstComponent>
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -66,6 +66,7 @@ public class DstConfigSearchContext extends QueryWrapperContext<DstConfig> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -45,6 +45,7 @@ public class DstDataSourceSearchContext extends QueryWrapperContext<DstDataSourc
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -73,6 +73,7 @@ public class DstRouterSearchContext extends QueryWrapperContext<DstRouter> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -38,6 +38,7 @@ public class DstSystemSearchContext extends QueryWrapperContext<DstSystem> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -80,6 +80,7 @@ public class DstViewSearchContext extends QueryWrapperContext<DstView> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -66,6 +66,7 @@ public class MetaDataSetSearchContext extends QueryWrapperContext<MetaDataSet> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -101,6 +101,7 @@ public class MetaEntitySearchContext extends QueryWrapperContext<MetaEntity> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -157,6 +157,7 @@ public class MetaFieldSearchContext extends QueryWrapperContext<MetaField> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -59,6 +59,7 @@ public class MetaModelSearchContext extends QueryWrapperContext<MetaModel> {
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -94,6 +94,7 @@ public class MetaRelationshipSearchContext extends QueryWrapperContext<MetaRelat
/**
* 启用快速搜索
*/
@Override
public void setQuery(String query)
{
this.query=query;
......
......@@ -61,8 +61,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional
public boolean create(DstComponent et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -78,8 +79,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional
public boolean update(DstComponent et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cid",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cid",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -130,8 +132,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Override
@Transactional
public boolean save(DstComponent et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -57,8 +57,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override
@Transactional
public boolean create(DstConfig et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getCfgId()),et);
return true;
}
......@@ -72,8 +73,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override
@Transactional
public boolean update(DstConfig et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cfgid",et.getCfgId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("cfgid",et.getCfgId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getCfgId()),et);
return true;
}
......@@ -122,8 +124,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Override
@Transactional
public boolean save(DstConfig et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -57,8 +57,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override
@Transactional
public boolean create(DstDataSource et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getDsId()),et);
return true;
}
......@@ -72,8 +73,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override
@Transactional
public boolean update(DstDataSource et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("dsid",et.getDsId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("dsid",et.getDsId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getDsId()),et);
return true;
}
......@@ -122,8 +124,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Override
@Transactional
public boolean save(DstDataSource et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -59,8 +59,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override
@Transactional
public boolean create(DstRouter et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -74,8 +75,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override
@Transactional
public boolean update(DstRouter et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("routerid",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("routerid",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -124,8 +126,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Override
@Transactional
public boolean save(DstRouter et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -69,8 +69,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override
@Transactional
public boolean create(DstSystem et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getPssystemid()),et);
return true;
}
......@@ -84,8 +85,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override
@Transactional
public boolean update(DstSystem et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("pssystemid",et.getPssystemid())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("pssystemid",et.getPssystemid()))) {
return false;
}
CachedBeanCopier.copy(get(et.getPssystemid()),et);
return true;
}
......@@ -134,8 +136,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Override
@Transactional
public boolean save(DstSystem et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -61,8 +61,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional
public boolean create(DstView et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -78,8 +79,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional
public boolean update(DstView et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("viewid",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("viewid",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -130,8 +132,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Override
@Transactional
public boolean save(DstView et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -58,8 +58,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional
public boolean create(MetaDataSet et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getDatasetId()),et);
return true;
}
......@@ -75,8 +76,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional
public boolean update(MetaDataSet et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("datasetid",et.getDatasetId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("datasetid",et.getDatasetId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getDatasetId()),et);
return true;
}
......@@ -127,8 +129,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Override
@Transactional
public boolean save(MetaDataSet et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -76,8 +76,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional
public boolean create(MetaEntity et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys());
......@@ -97,8 +98,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional
public boolean update(MetaEntity et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("entityid",et.getEntityId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("entityid",et.getEntityId()))) {
return false;
}
metadatasetService.saveByEntityId(et.getEntityId(),et.getDataSets());
metafieldService.saveByEntityId(et.getEntityId(),et.getFields());
metarelationshipService.saveByEntityId(et.getEntityId(),et.getParentEntitys());
......@@ -161,8 +163,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Override
@Transactional
public boolean save(MetaEntity et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -63,8 +63,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional
public boolean create(MetaField et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getFieldId()),et);
return true;
}
......@@ -80,8 +81,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional
public boolean update(MetaField et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("fieldid",et.getFieldId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("fieldid",et.getFieldId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getFieldId()),et);
return true;
}
......@@ -132,8 +134,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Override
@Transactional
public boolean save(MetaField et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -54,8 +54,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
public boolean create(MetaModel et) {
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -69,8 +70,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
public boolean update(MetaModel et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("modelid",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("modelid",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -126,8 +128,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
public boolean save(MetaModel et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -61,8 +61,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional
public boolean create(MetaRelationship et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
if(!this.retBool(this.baseMapper.insert(et))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -78,8 +79,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional
public boolean update(MetaRelationship et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationid",et.getId())))
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationid",et.getId()))) {
return false;
}
CachedBeanCopier.copy(get(et.getId()),et);
return true;
}
......@@ -130,8 +132,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Override
@Transactional
public boolean save(MetaRelationship et) {
if(!saveOrUpdate(et))
if(!saveOrUpdate(et)) {
return false;
}
return true;
}
......
......@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-46-1">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual-47-1">
<createTable tableName="blade_visual">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_ID"/>
......@@ -36,7 +36,7 @@
<!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-19-2">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_category-20-2">
<createTable tableName="blade_visual_category">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CATEGORY_ID"/>
......@@ -52,7 +52,7 @@
<!--输出实体[BLADE_VISUAL_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_config-17-3">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_config-18-3">
<createTable tableName="blade_visual_config">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_CONFIG_ID"/>
......@@ -68,7 +68,7 @@
<!--输出实体[BLADE_VISUAL_MAP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_map-17-4">
<changeSet author="a_A_5d9d78509" id="tab-blade_visual_map-18-4">
<createTable tableName="blade_visual_map">
<column name="ID" remarks="" type="BIGINT">
<constraints primaryKey="true" primaryKeyName="PK_BLADE_VISUAL_MAP_ID"/>
......@@ -110,7 +110,7 @@
<!--输出实体[DST_CONFIG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_config-23-6">
<changeSet author="a_A_5d9d78509" id="tab-dst_config-28-6">
<createTable tableName="IBZCFG">
<column name="CFGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_CONFIG_CFGID"/>
......@@ -196,7 +196,7 @@
<!--输出实体[DST_VIEW]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_view-42-10">
<changeSet author="a_A_5d9d78509" id="tab-dst_view-43-10">
<createTable tableName="IBZVIEW">
<column name="VIEWID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_VIEW_VIEWID"/>
......
......@@ -137,7 +137,7 @@
{
"appid":"web",
"appname":"应用",
"appmenu":[{"menuid":"liteIndex", "menuname":"liteIndex", "menuitem":[{ "id":"menuitem2" , "name":"数据源" },{ "id":"menuitem1" , "name":"实体" },{ "id":"menuitem9" , "name":"模型" },{ "id":"menuitem6" , "name":"微服务" },{ "id":"menuitem8" , "name":"接口" },{ "id":"menuitem5" , "name":"应用" },{ "id":"menuitem7" , "name":"路由" },{ "id":"menuitem3" , "name":"视图" },{ "id":"menuitem4" , "name":"组件" },{ "id":"menuitem10" , "name":"大屏" }] }]
"appmenu":[{"menuid":"liteIndex", "menuname":"liteIndex", "menuitem":[{ "id":"menuitem2" , "name":"数据源" },{ "id":"menuitem1" , "name":"实体" },{ "id":"menuitem9" , "name":"模型" },{ "id":"menuitem6" , "name":"微服务" },{ "id":"menuitem8" , "name":"接口" },{ "id":"menuitem5" , "name":"应用" },{ "id":"menuitem7" , "name":"路由" },{ "id":"menuitem3" , "name":"视图" },{ "id":"menuitem4" , "name":"组件" },{ "id":"menuitem11" , "name":"配置项" },{ "id":"menuitem10" , "name":"大屏" }] }]
}
]
}
......@@ -264,7 +264,6 @@
<version>${baomidou-jobs.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......
......@@ -50,15 +50,17 @@ public class AuditAspect
request=((ServletRequestAttributes)requestAttributes).getRequest();
}
Object [] args = point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0)
if(ObjectUtils.isEmpty(args) || args.length==0) {
return;
}
Object serviceParam =args[0];
if(serviceParam instanceof EntityBase){
EntityBase entity=(EntityBase)serviceParam;//创建数据
EntityBase entity=(EntityBase)serviceParam;
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
if(auditFields.size()==0)//是否有审计属性
//是否有审计属性
if(auditFields.size()==0) {
return;
}
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue="";
......@@ -85,8 +87,9 @@ public class AuditAspect
Object serviceObj=point.getTarget();
Object args[]=point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0)
if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed();
}
Object arg=args[0];
if(arg instanceof EntityBase){
......@@ -94,15 +97,17 @@ public class AuditAspect
Map<String, Audit> auditFields= DEFieldCacheMap.getAuditFields(entity.getClass());
//是否有审计属性
if(auditFields.size()==0)
if(auditFields.size()==0) {
return point.proceed();
}
String idField=DEFieldCacheMap.getDEKeyField(entity.getClass());
Object idValue="";
if(!StringUtils.isEmpty(idField)){
idValue=entity.get(idField);
}
if(ObjectUtils.isEmpty(idValue))
if(ObjectUtils.isEmpty(idValue)) {
return point.proceed();
}
//获取更新前实体
EntityBase beforeEntity=getEntity(serviceObj,idValue);
......@@ -132,8 +137,9 @@ public class AuditAspect
Object serviceObj=point.getTarget();
Object args[]=point.getArgs();
if(ObjectUtils.isEmpty(args) || args.length==0)
if(ObjectUtils.isEmpty(args) || args.length==0) {
return point.proceed();
}
Object idValue=args[0];
EntityBase entity=getEntity(serviceObj,idValue);
......
......@@ -84,8 +84,9 @@ public class DEFieldDefaultValueAspect
Map<String, DEField> deFields = DEFieldCacheMap.getDEFields(obj.getClass());
AuthenticationUser curUser = AuthenticationUser.getAuthenticationUser();
String keyField=DEFieldCacheMap.getDEKeyField(obj.getClass());
if(StringUtils.isEmpty(keyField))
if(StringUtils.isEmpty(keyField)) {
return true;
}
fillDEField((EntityBase)obj, deFields,actionName,curUser,keyField);
}
else if (obj instanceof List) {
......@@ -98,8 +99,9 @@ public class DEFieldDefaultValueAspect
deFields = DEFieldCacheMap.getDEFields(item.getClass());
curUser = AuthenticationUser.getAuthenticationUser();
keyField=DEFieldCacheMap.getDEKeyField(item.getClass());
if(StringUtils.isEmpty(keyField))
if(StringUtils.isEmpty(keyField)) {
return true;
}
}
fillDEField((EntityBase)item, deFields,actionName,curUser,keyField);
}
......@@ -116,14 +118,14 @@ public class DEFieldDefaultValueAspect
* @param et 当前实体对象
*/
private void fillDEField(EntityBase et, Map<String, DEField> deFields, String actionName,AuthenticationUser curUser,String keyField) throws Exception {
if(deFields.size()==0)
return ;
if(deFields.size()==0) {
return;
}
if(actionName.toLowerCase().startsWith("save")) {
if(ObjectUtils.isEmpty(et.get(keyField)))
if(ObjectUtils.isEmpty(et.get(keyField))) {
actionName="create";
}
}
for (Map.Entry<String, DEField> entry : deFields.entrySet()) {
String fieldname=entry.getKey();
//获取注解
......
......@@ -40,11 +40,13 @@ public class VersionCheckAspect
Object[] args = point.getArgs();
Object id=args[0];
Object dto=args[1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return;
}
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
if(StringUtils.isEmpty(versionField)) {
return;
}
versionCheck(versionCheck,point.getTarget(),dto,id);
}
......@@ -55,11 +57,13 @@ public class VersionCheckAspect
if(args.length>=2){
Object id=args[args.length-2];
Object dto=args[args.length-1];
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto))
if(ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dto)) {
return;
}
String versionField=versionCheck.versionfield();
if(StringUtils.isEmpty(versionField))
if(StringUtils.isEmpty(versionField)) {
return;
}
versionCheck(versionCheck,point.getTarget(),dto,id);
}
}
......@@ -70,17 +74,20 @@ public class VersionCheckAspect
//忽略版本检查
Expression dtoParamsExp = parser.parseExpression("#dto.extensionparams");
Map dtoParam=dtoParamsExp.getValue(context, Map.class);
if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1))
if(!ObjectUtils.isEmpty(dtoParam) && !ObjectUtils.isEmpty(dtoParam.get(IgnoreField)) && dtoParam.get(IgnoreField).equals(1)) {
return;
}
Expression newExp = parser.parseExpression(String.format("#dto.%s",versionCheck.versionfield()));
Object newVersion=newExp.getValue(context);
if(ObjectUtils.isEmpty(newVersion))
if(ObjectUtils.isEmpty(newVersion)) {
return;
}
//进行版本检查
Object oldVersion =getDBVersion(versionCheck,getService(resource,versionCheck.entity()),id);
if(!ObjectUtils.isEmpty(oldVersion)){
if(RuleUtils.gt(newVersion,oldVersion))
if(RuleUtils.gt(newVersion,oldVersion)) {
throw new BadRequestAlertException("数据已变更,可能后台数据已被修改,请重新加载数据","VersionCheckAspect","versionCheck");
}
}
}
......
......@@ -21,33 +21,39 @@ public class DTOBase implements Serializable {
public void modify(String field,Object val) {
if(val==null)
if(val==null) {
this.getFocusNull(true).add(field.toLowerCase());
else
}
else {
this.getFocusNull(true).remove(field.toLowerCase());
}
}
public Set<String> getFocusNull() {
if(focusNull==null)
if(focusNull==null) {
focusNull=new HashSet<>();
}
if(focusNull.size()>0 && extensionparams.containsKey("dirtyflagenable"))
{
Set<String> nocheck=new HashSet<>();
for(String key:focusNull)
{
if(!extensionparams.containsKey(key+"dirtyflag"))
if(!extensionparams.containsKey(key+"dirtyflag")) {
nocheck.add(key);
}
}
for(String key:nocheck)
for(String key:nocheck) {
focusNull.remove(key);
}
}
return focusNull;
}
private Set<String> getFocusNull(boolean newflag) {
if(focusNull==null)
if(focusNull==null) {
focusNull=new HashSet<>();
}
return focusNull;
}
......
......@@ -24,8 +24,9 @@ public class EntityBase implements Serializable {
private Set<String> focusNull;
public Set<String> getFocusNull() {
if(focusNull==null)
if(focusNull==null) {
focusNull=new HashSet<>();
}
return focusNull;
}
......@@ -50,8 +51,9 @@ public class EntityBase implements Serializable {
private BeanMap getMap()
{
if(map==null)
map=BeanMap.create(this);
if(map==null) {
map=BeanMap.create(this);
}
return map;
}
......@@ -68,17 +70,16 @@ public class EntityBase implements Serializable {
this.extensionparams = extensionparams;
}
public Object get(String field) {
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName))
if(!StringUtils.isEmpty(fieldRealName)) {
return getMap().get(fieldRealName);
else
}
else {
return this.extensionparams.get(field.toLowerCase());
}
}
@JsonAnyGetter
public Map<String , Object> any() {
return extensionparams;
......@@ -89,13 +90,16 @@ public class EntityBase implements Serializable {
field=field.toLowerCase();
String fieldRealName=DEFieldCacheMap.getFieldRealName(this.getClass(),field);
if(!StringUtils.isEmpty(fieldRealName)) {
if (value == null)
if (value == null) {
getMap().put(fieldRealName, null);
else
}
else {
getMap().put(fieldRealName, DEFieldCacheMap.fieldValueOf(this.getClass(), fieldRealName, value));
}
}
else
else {
this.extensionparams.put(field.toLowerCase(),value);
}
}
/**
......
......@@ -5,24 +5,25 @@ import org.springframework.util.StringUtils;
public class EntityMP extends EntityBase {
public UpdateWrapper getUpdateWrapper(boolean clean) {
UpdateWrapper wrapper=new UpdateWrapper();
for(String nullField:getFocusNull()) {
wrapper.set(nullField,null);
}
if(clean)
if(clean) {
getFocusNull().clear();
}
return wrapper;
}
@Override
public void modify(String field,Object val) {
if(val==null)
if(val==null) {
this.getFocusNull().add(field.toLowerCase());
else
}
else {
this.getFocusNull().remove(field.toLowerCase());
}
}
@Override
......@@ -33,6 +34,5 @@ public class EntityMP extends EntityBase {
getFocusNull().remove(resetField);
}
}
}
......@@ -2,7 +2,5 @@ package cn.ibizlab.util.domain;
public class EntityMongo extends EntityBase {
}
......@@ -44,9 +44,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
*/
private QueryBuilder parseQueryFilter(QueryFilter queryFilter){
if( ObjectUtils.isEmpty(queryFilter.get$and()) && ObjectUtils.isEmpty(queryFilter.get$or()) && ObjectUtils.isEmpty(queryFilter.any()))
if(ObjectUtils.isEmpty(queryFilter.get$and()) && ObjectUtils.isEmpty(queryFilter.get$or()) && ObjectUtils.isEmpty(queryFilter.any())) {
return null;
}
QueryBuilder rsBuilder=QueryBuilder.start();
QueryBuilder fieldBuilder=parseFieldMap(queryFilter.any());
QueryBuilder orBuilder=parseOrQueryFilter(queryFilter.get$or());
......@@ -107,8 +107,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
* @return
*/
private QueryBuilder parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) {
if(fieldMap.size()==0)
if(fieldMap.size()==0) {
return null;
}
QueryBuilder fieldBuilders=QueryBuilder.start();
for(Map.Entry<String, QueryFilter.SegmentCond> entry: fieldMap.entrySet()){
getSegmentCondSql(entry.getKey(),entry.getValue(),fieldBuilders);
......
......@@ -63,8 +63,9 @@ public class QueryFilter {
private Map<String,SegmentCond> getMap()
{
if(map==null)
if(map==null) {
map=new LinkedHashMap<>();
}
return map;
}
......@@ -132,11 +133,12 @@ public class QueryFilter {
}
private QueryFilter op(String column, SegmentCond segmentCond) {
if(this.getMap().containsKey(column))
if(this.getMap().containsKey(column)) {
((SegmentCond)this.getMap().get(column)).getMap().putAll(segmentCond.getMap());
else
}
else {
this.getMap().put(column,segmentCond);
}
return this;
}
......@@ -155,8 +157,9 @@ public class QueryFilter {
private Map<String,Object> getMap()
{
if(map==null)
if(map==null) {
map=new LinkedHashMap<>();
}
return map;
}
......
......@@ -37,17 +37,20 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
int pageSize=getPageable().getPageSize();
//构造mybatis-plus分页
if(StringUtils.isEmpty(currentPage) || StringUtils.isEmpty(pageSize))
if(StringUtils.isEmpty(currentPage) || StringUtils.isEmpty(pageSize)) {
page=new Page(1,Short.MAX_VALUE);
else
}
else {
page=new Page(currentPage+1,pageSize);
}
//构造mybatis-plus排序
Sort sort = getPageable().getSort();
Iterator<Sort.Order> it_sort = sort.iterator();
if(ObjectUtils.isEmpty(it_sort))
if(ObjectUtils.isEmpty(it_sort)) {
return page;
}
ParameterizedType parameterizedType = (ParameterizedType) getClass().getGenericSuperclass();
Class<T> type = (Class<T>)parameterizedType.getActualTypeArguments()[0];
......@@ -95,9 +98,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseQueryFilter(QueryFilter queryFilter){
if(queryFilter.any().size()==0 && queryFilter.get$or()==null && queryFilter.get$and()==null)
return null;
if(queryFilter.any().size()==0 && queryFilter.get$or()==null && queryFilter.get$and()==null) {
return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
Consumer fieldConsumer=parseFieldMap(queryFilter.any());
Consumer orConsumer=parseOrQueryFilter(queryFilter.get$or());
......@@ -121,7 +124,6 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseOrQueryFilter(List<QueryFilter> queryFilters) {
if(queryFilters==null || queryFilters.size()==0)
return null;
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
......@@ -139,10 +141,10 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseAndQueryFilter(List<QueryFilter> queryFilters) {
if(queryFilters==null || queryFilters.size()==0)
if(queryFilters==null || queryFilters.size()==0) {
return null;
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
for(QueryFilter queryFilter: queryFilters){
Consumer tempQueryWrapper=parseQueryFilter(queryFilter);
queryWrapper.and(tempQueryWrapper);
......@@ -157,9 +159,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
*/
private Consumer<QueryWrapper<T>> parseFieldMap(Map<String , QueryFilter.SegmentCond> fieldMap) {
if(fieldMap.size()==0)
if(fieldMap.size()==0) {
return null;
}
Consumer<QueryWrapper<T>> consumer = queryWrapper -> {
for(Map.Entry<String, QueryFilter.SegmentCond> field: fieldMap.entrySet()){
String fieldName=field.getKey();
......
......@@ -98,10 +98,12 @@ public class SearchContextBase implements ISearchContext{
* @return
*/
public Pageable getPageable() {
if(ObjectUtils.isEmpty(pageSort))
return PageRequest.of(page,size);
else
return PageRequest.of(page,size,pageSort);
if(ObjectUtils.isEmpty(pageSort)) {
return PageRequest.of(page,size);
}
else {
return PageRequest.of(page,size,pageSort);
}
}
/**
......
......@@ -13,8 +13,9 @@ public class CachedBeanCopier {
}
public static void copy(Object srcObj, Object destObj,boolean useConverter) {
if(srcObj==null||destObj==null)
if(srcObj==null||destObj==null) {
return;
}
getCopier(srcObj,destObj,useConverter).copy(srcObj, destObj, null);
}
......@@ -29,6 +30,4 @@ public class CachedBeanCopier {
}
return copier;
}
}
......@@ -36,13 +36,16 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,Field> getFieldMap(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheMap.containsKey(className))
return cacheMap.get(className);
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
}
if(cacheMap.containsKey(className)) {
return cacheMap.get(className);
}
synchronized (objLock1) {
if(cacheMap.containsKey(className))
return cacheMap.get(className);
if(cacheMap.containsKey(className)) {
return cacheMap.get(className);
}
Hashtable<String,Field> result = new Hashtable<String,Field>();
List<Field> list=new ArrayList<Field>();
Hashtable<String,String> keys=new Hashtable<String,String>();
......@@ -58,8 +61,9 @@ public class DEFieldCacheMap {
Audit auditField=field.getAnnotation(Audit.class);
if(!ObjectUtils.isEmpty(deField)) {
defields.put(field.getName(),deField);
if(deField.isKeyField())
cacheDEKeyField.put(className,field.getName());
if(deField.isKeyField()) {
cacheDEKeyField.put(className,field.getName());
}
}
if(!ObjectUtils.isEmpty(auditField)) {
auditfields.put(field.getName(),auditField);
......@@ -74,10 +78,12 @@ public class DEFieldCacheMap {
}
}
public static Hashtable<String,Field> getFieldMap(String className) {
if(className.indexOf("_$")>0)
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheMap.containsKey(className))
return cacheMap.get(className);
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
}
if(cacheMap.containsKey(className)) {
return cacheMap.get(className);
}
Class clazz = null;
try {
clazz = Class.forName(className);
......@@ -96,10 +102,12 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,DEField> getDEFields(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheDEField.containsKey(className))
}
if(cacheDEField.containsKey(className)) {
return cacheDEField.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheDEField.get(className);
......@@ -113,10 +121,12 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,Audit> getAuditFields(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheAuditField.containsKey(className))
}
if(cacheAuditField.containsKey(className)) {
return cacheAuditField.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheAuditField.get(className);
......@@ -130,10 +140,12 @@ public class DEFieldCacheMap {
*/
public static <T> String getDEKeyField(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheDEKeyField.containsKey(className))
}
if(cacheDEKeyField.containsKey(className)) {
return cacheDEKeyField.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheDEKeyField.get(className);
......@@ -148,10 +160,12 @@ public class DEFieldCacheMap {
*/
public static <T> List<Field> getFields(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheList.containsKey(className))
}
if(cacheList.containsKey(className)) {
return cacheList.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheList.get(className);
......@@ -159,10 +173,12 @@ public class DEFieldCacheMap {
}
public static List<Field> getFields(String className) {
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheList.containsKey(className))
}
if(cacheList.containsKey(className)) {
return cacheList.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheList.get(className);
......@@ -176,10 +192,12 @@ public class DEFieldCacheMap {
*/
public static <T> Hashtable<String,String> getFieldKeys(Class<T> clazz) {
String className=clazz.getName();
if(className.indexOf("_$")>0)
if(className.indexOf("_$")>0) {
className=className.substring(0, className.lastIndexOf("_$"));
if(cacheKey.containsKey(className))
}
if(cacheKey.containsKey(className)) {
return cacheKey.get(className);
}
else{
DEFieldCacheMap.getFieldMap(className);
return cacheKey.get(className);
......@@ -189,20 +207,25 @@ public class DEFieldCacheMap {
public static <T> String getFieldRealName(Class<T> clazz,String fieldname) {
fieldname=fieldname.toLowerCase();
Hashtable<String,String> keys=DEFieldCacheMap.getFieldKeys(clazz);
if(keys.containsKey(fieldname))
if(keys.containsKey(fieldname)) {
return keys.get(fieldname);
else if(keys.containsKey(fieldname.replace("_","")))
}
else if(keys.containsKey(fieldname.replace("_",""))) {
return keys.get(fieldname.replace("_",""));
else
}
else {
return "";
}
}
public static <T> Field getField(Class<T> clazz,String fieldname) {
String fieldRealName=DEFieldCacheMap.getFieldRealName(clazz,fieldname);
if(!StringUtils.isEmpty(fieldRealName))
if(!StringUtils.isEmpty(fieldRealName)) {
return DEFieldCacheMap.getFieldMap(clazz).get(fieldRealName);
else
}
else {
return null;
}
}
public static <T> String getFieldColumnName(Class<T> clazz,String fieldname) {
......@@ -226,6 +249,4 @@ public class DEFieldCacheMap {
}
return resultValue;
}
}
\ No newline at end of file
......@@ -19,30 +19,34 @@ public class DataObject {
final static public DateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
final static public String getStringValue(Object objValue, String strDefault) {
if (objValue == null) return strDefault;
if (objValue instanceof String) return (String) objValue;
if (objValue == null) {
return strDefault;
}
if (objValue instanceof String) {
return (String) objValue;
}
if (objValue instanceof java.sql.Timestamp||objValue instanceof java.sql.Date||objValue instanceof java.util.Date) {
String rt=datetimeFormat.format(objValue);
if(rt.endsWith(" 00:00:00"))
if(rt.endsWith(" 00:00:00")) {
rt=dayFormat.format(objValue);
else if(rt.endsWith(":00"))
}
else if(rt.endsWith(":00")) {
rt=datetimeFormat2.format(objValue);
}
return rt;
}
return objValue.toString();
}
public static <T> Object objectValueOf(Class<T> type,Object fieldValue) {
if(fieldValue==null)
if(fieldValue==null) {
return null;
}
Object resultValue=fieldValue;
String targetType=type.getSimpleName();
if(targetType.equalsIgnoreCase(fieldValue.getClass().getSimpleName()))
if(targetType.equalsIgnoreCase(fieldValue.getClass().getSimpleName())){
return resultValue;
}
if(targetType.equals("Boolean")){
resultValue=getBooleanValue(fieldValue,false);
}
......@@ -79,10 +83,9 @@ public class DataObject {
else if(targetType.equals("String")) {
resultValue= getStringValue(fieldValue,null);
}
if(resultValue==null)
if(resultValue==null) {
return null;
}
return resultValue;
}
......@@ -95,8 +98,9 @@ public class DataObject {
if (objValue == null) {
return jDefault;
}
if(objValue instanceof JSONObject)
if(objValue instanceof JSONObject) {
return (JSONObject)objValue;
}
String strValue = objValue.toString();
try {
return JSONObject.parseObject(strValue);
......@@ -111,8 +115,9 @@ public class DataObject {
if (objValue == null) {
return jDefault;
}
if(objValue instanceof JSONArray)
if(objValue instanceof JSONArray) {
return (JSONArray)objValue;
}
String strValue = objValue.toString();
try {
return JSONArray.parseArray(strValue);
......@@ -133,8 +138,9 @@ public class DataObject {
List<String> chk1=new ArrayList<>();
for(int i=0;i<arr.size();i++)
{
if(arr.get(i) instanceof String)
if(arr.get(i) instanceof String) {
chk1.add(arr.getString(i));
}
}
return chk1;
}
......@@ -146,8 +152,9 @@ public class DataObject {
}
final static public Boolean getBooleanValue(Object objValue,Boolean bDefault) {
if (objValue == null) return bDefault;
if (objValue == null) {
return bDefault;
}
if (objValue instanceof Boolean) {
return (Boolean) objValue;
}
......@@ -155,20 +162,24 @@ public class DataObject {
}
final static public char[] getCharacterValue(Object objValue,char[] cDefault) {
if (objValue == null) return cDefault;
if (objValue == null) {
return cDefault;
}
return objValue.toString().toCharArray();
}
final static public Double getDoubleValue(Object objValue,Double dDefault) {
if (objValue == null) return dDefault;
if (objValue == null) {
return dDefault;
}
if (objValue instanceof Double) {
return (Double) objValue;
}
String strValue = objValue.toString();
if (StringUtils.isEmpty(strValue)) return null;
if (StringUtils.isEmpty(strValue)) {
return null;
}
strValue = strValue.replace(",", "");
return Double.parseDouble(strValue);
}
......@@ -179,8 +190,9 @@ public class DataObject {
return nDefault;
}
if(objValue instanceof Integer)
if(objValue instanceof Integer) {
return (Integer)objValue;
}
if (objValue instanceof Double) {
return ((Double) objValue).intValue();
......@@ -191,8 +203,9 @@ public class DataObject {
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return nDefault;
}
strValue = strValue.replace(",", "");
return Integer.parseInt(strValue);
}
......@@ -204,12 +217,13 @@ public class DataObject {
}
try {
if(objValue instanceof Float)
if(objValue instanceof Float) {
return (Float)objValue;
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return fDefault;
}
strValue = strValue.replace(",", "");
return Float.parseFloat(strValue);
} catch (Exception ex) {
......@@ -233,8 +247,9 @@ public class DataObject {
return BigDecimal.valueOf((Long)objValue);
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return fDefault;
}
strValue = strValue.replace(",", "");
return BigDecimal.valueOf(Double.parseDouble(strValue));
} catch (Exception ex) {
......@@ -253,8 +268,9 @@ public class DataObject {
}
else {
Long l=getLongValue(objValue,null);
if(l!=null)
if(l!=null) {
return BigInteger.valueOf(l);
}
}
} catch (Exception ex) {
......@@ -283,8 +299,9 @@ public class DataObject {
}
String strValue = objValue.toString();
if(StringUtils.isEmpty(strValue))
if(StringUtils.isEmpty(strValue)) {
return nDefault;
}
strValue = strValue.replace(",", "");
return Long.parseLong(strValue);
} catch (Exception ex) {
......@@ -294,7 +311,9 @@ public class DataObject {
final static public byte[] getBinaryValue(Object objValue, byte[] def) {
if (objValue == null) return def;
if (objValue == null) {
return def;
}
if(objValue instanceof byte[]){
return (byte[])objValue;
}
......@@ -312,7 +331,9 @@ public class DataObject {
* @
*/
final static public java.sql.Timestamp getTimestampValue(Object objValue,java.sql.Timestamp tDefault) {
if (objValue == null) return tDefault;
if (objValue == null) {
return tDefault;
}
if (objValue instanceof java.sql.Timestamp) {
java.sql.Timestamp ti = (java.sql.Timestamp) objValue;
......@@ -332,7 +353,9 @@ public class DataObject {
if (objValue instanceof String) {
String strValue = (String) objValue;
strValue = strValue.trim();
if (StringUtils.isEmpty(strValue)) return null;
if (StringUtils.isEmpty(strValue)) {
return null;
}
try {
java.util.Date date = parse((String) objValue);
......@@ -373,7 +396,9 @@ public class DataObject {
* @
*/
public static Object testDateTime(String strInput, TimeZone timeZone) throws Exception{
if (StringUtils.isEmpty(strInput)) return null;
if (StringUtils.isEmpty(strInput)) {
return null;
}
Date dtDate = parse(strInput, timeZone);
java.sql.Timestamp retDate = new java.sql.Timestamp(dtDate.getTime());
return retDate;
......@@ -425,8 +450,9 @@ public class DataObject {
if(strTimeString.indexOf("T")!=-1){
strPart = strTimeString.split("[T]");
}
else
else{
strPart = strTimeString.split(" ");
}
if (strPart.length == 2) {
// 两个部分
String strDate = "";
......@@ -589,6 +615,4 @@ public class DataObject {
return new Timestamp(cl.getTime().getTime());
}
}
......@@ -18,8 +18,9 @@ public class RuleUtils
public static Object getObj(Object object, String members)
{
if(object==null)
if(object==null) {
return null;
}
Object currentObj = object;
String[] arrayOfString = members.split("\\.");
int i = arrayOfString.length;
......@@ -31,20 +32,23 @@ public class RuleUtils
if(currentObj instanceof EntityBase)
{
currentObj=((EntityBase) currentObj).get(methodName);
if (currentObj == null)
if (currentObj == null) {
return null;
}
}
else if(currentObj instanceof JSONObject)
{
currentObj=((JSONObject) currentObj).get(methodName);
if (currentObj == null)
if (currentObj == null) {
return null;
}
}
else if(currentObj instanceof Map)
{
currentObj=((Map) currentObj).get(methodName);
if (currentObj == null)
if (currentObj == null) {
return null;
}
}
else
{
......@@ -60,10 +64,10 @@ public class RuleUtils
}
currentObj = method.invoke(currentObj, methodName);
if (currentObj == null)
if (currentObj == null){
return null;
}
}
}
catch (Exception e)
{
......@@ -77,44 +81,63 @@ public class RuleUtils
public static boolean test(Object finalObject,String option,Object exp)
{
if(option.equalsIgnoreCase("eq")||option.equalsIgnoreCase("equal")||option.equalsIgnoreCase("="))
if(option.equalsIgnoreCase("eq")||option.equalsIgnoreCase("equal")||option.equalsIgnoreCase("=")){
return equal(exp,finalObject);
else if (option.equalsIgnoreCase("noteq")||option.equalsIgnoreCase("notequal")||option.equalsIgnoreCase("<>")||option.equalsIgnoreCase("!="))
}
else if (option.equalsIgnoreCase("noteq")||option.equalsIgnoreCase("notequal")||option.equalsIgnoreCase("<>")||option.equalsIgnoreCase("!=")){
return !equal(exp,finalObject);
else if (option.equalsIgnoreCase("gt")||option.equalsIgnoreCase(">"))
}
else if (option.equalsIgnoreCase("gt")||option.equalsIgnoreCase(">")){
return gt(exp,finalObject);
else if (option.equalsIgnoreCase("lt")||option.equalsIgnoreCase("<"))
}
else if (option.equalsIgnoreCase("lt")||option.equalsIgnoreCase("<")){
return lt(exp,finalObject);
else if (option.equalsIgnoreCase("gtandeq")||option.equalsIgnoreCase("ge")||option.equalsIgnoreCase(">="))
}
else if (option.equalsIgnoreCase("gtandeq")||option.equalsIgnoreCase("ge")||option.equalsIgnoreCase(">=")){
return ge(exp,finalObject);
else if (option.equalsIgnoreCase("ltandeq")||option.equalsIgnoreCase("le")||option.equalsIgnoreCase("<="))
}
else if (option.equalsIgnoreCase("ltandeq")||option.equalsIgnoreCase("le")||option.equalsIgnoreCase("<=")){
return le(exp,finalObject);
else if (option.equalsIgnoreCase("null")||option.equalsIgnoreCase("isnull"))
}
else if (option.equalsIgnoreCase("null")||option.equalsIgnoreCase("isnull")){
return isNull(finalObject);
else if (option.equalsIgnoreCase("notnull")||option.equalsIgnoreCase("isnotnull"))
}
else if (option.equalsIgnoreCase("notnull")||option.equalsIgnoreCase("isnotnull")){
return isNotNull(finalObject);
else if (option.equalsIgnoreCase("like")||option.equalsIgnoreCase("matchor"))
}
else if (option.equalsIgnoreCase("like")||option.equalsIgnoreCase("matchor")){
return matchor(exp,finalObject);
else if (option.equalsIgnoreCase("leftlike")||option.equalsIgnoreCase("startswith")||option.equalsIgnoreCase("begin"))
}
else if (option.equalsIgnoreCase("leftlike")||option.equalsIgnoreCase("startswith")||option.equalsIgnoreCase("begin")){
return leftmatchor(exp,finalObject);
else if (option.equalsIgnoreCase("rightlike")||option.equalsIgnoreCase("endswith")||option.equalsIgnoreCase("end"))
}
else if (option.equalsIgnoreCase("rightlike")||option.equalsIgnoreCase("endswith")||option.equalsIgnoreCase("end")){
return rightmatchor(exp,finalObject);
else if (option.equalsIgnoreCase("match")||option.equalsIgnoreCase("matchand")||option.equalsIgnoreCase("matches"))
}
else if (option.equalsIgnoreCase("match")||option.equalsIgnoreCase("matchand")||option.equalsIgnoreCase("matches")){
return matchand(exp,finalObject);
else if (option.equalsIgnoreCase("in"))
}
else if (option.equalsIgnoreCase("in")){
return in(exp,finalObject);
else if (option.equalsIgnoreCase("notin"))
}
else if (option.equalsIgnoreCase("notin")){
return notin(exp,finalObject);
else if (option.equalsIgnoreCase("NOTLIKE"))
}
else if (option.equalsIgnoreCase("NOTLIKE")){
return notmatchor(exp,finalObject);
else if (option.equalsIgnoreCase("LEFTNOTLIKE"))
}
else if (option.equalsIgnoreCase("LEFTNOTLIKE")){
return !leftmatchor(exp,finalObject);
else if (option.equalsIgnoreCase("RIGHTNOTLIKE"))
}
else if (option.equalsIgnoreCase("RIGHTNOTLIKE")){
return !rightmatchor(exp,finalObject);
else if (option.equalsIgnoreCase("NOTMATCHES"))
}
else if (option.equalsIgnoreCase("NOTMATCHES")){
return notmatchand(exp,finalObject);
else
}
else{
return false;
}
}
......@@ -125,10 +148,12 @@ public class RuleUtils
public static boolean equal(Object exp, Object finalObject)
{
if(exp==null)
if(exp==null){
return false;
if(finalObject ==null)
}
if(finalObject ==null){
return false;
}
if(exp instanceof String && ((String) exp).length()==10 && finalObject instanceof Timestamp)
{
......@@ -145,10 +170,12 @@ public class RuleUtils
return ObjectUtils.nullSafeEquals(tm,finalObject);
}
if(ObjectUtils.nullSafeEquals(exp,finalObject))
if(ObjectUtils.nullSafeEquals(exp,finalObject)){
return true;
if(exp.toString().equalsIgnoreCase(finalObject.toString()))
}
if(exp.toString().equalsIgnoreCase(finalObject.toString())){
return true;
}
return false;
}
......@@ -158,10 +185,12 @@ public class RuleUtils
}
public static boolean gt(Object exp, Object finalObject)
{
if(ObjectUtils.isEmpty(exp))
if(ObjectUtils.isEmpty(exp)){
return false;
if(ObjectUtils.isEmpty(finalObject))
}
if(ObjectUtils.isEmpty(finalObject)){
return false;
}
try
{
if(finalObject instanceof java.sql.Timestamp)
......@@ -176,8 +205,9 @@ public class RuleUtils
else
{
tm=DataObject.getTimestampValue(exp,null);
if(tm==null)
if(tm==null){
return false;
}
}
return finalTime.getTime()>tm.getTime();
}
......@@ -209,15 +239,14 @@ public class RuleUtils
{
return finalObject.toString().compareToIgnoreCase(exp.toString())>0;
}
else
else{
return false;
}
}
catch(Exception ex)
{
return false;
}
}
public static boolean lt(Object exp, Object object, String members)
......@@ -226,10 +255,12 @@ public class RuleUtils
}
public static boolean lt(Object exp, Object finalObject)
{
if(ObjectUtils.isEmpty(exp))
if(ObjectUtils.isEmpty(exp)){
return false;
if(ObjectUtils.isEmpty(finalObject))
}
if(ObjectUtils.isEmpty(finalObject)){
return false;
}
try
{
if(finalObject instanceof java.sql.Timestamp)
......@@ -311,8 +342,9 @@ public class RuleUtils
return false;
String tvs=expObj.toString().trim();
if(StringUtils.isEmpty(tvs))
if(StringUtils.isEmpty(tvs)){
return false;
}
if (finalObject instanceof Integer)
{
......@@ -352,8 +384,9 @@ public class RuleUtils
}
public static boolean isNull(Object finalObject)
{
if(finalObject instanceof String)
if(finalObject instanceof String){
return StringUtils.isEmpty(finalObject.toString().trim());
}
return (ObjectUtils.isEmpty(finalObject));
}
......@@ -382,11 +415,13 @@ public class RuleUtils
}
public static boolean matchor(Object expObj, Object obj)
{
if(obj==null)
if(obj==null){
return false;
}
String exp=expObj.toString().trim();
if(StringUtils.isEmpty(exp))
if(StringUtils.isEmpty(exp)){
return false;
}
exp=exp.replace(";", ",");
exp=exp.replace(";", ",");
exp=exp.replace(",", ",");
......@@ -403,11 +438,13 @@ public class RuleUtils
public static boolean leftmatchor(Object expObj, Object obj)
{
if(obj==null)
if(obj==null){
return false;
}
String exp=expObj.toString().trim();
if(StringUtils.isEmpty(exp))
if(StringUtils.isEmpty(exp)){
return false;
}
exp=exp.replace(";", ",");
exp=exp.replace(";", ",");
exp=exp.replace(",", ",");
......@@ -416,19 +453,22 @@ public class RuleUtils
for(String strExp:arr)
{
bRt=obj.toString().matches(strExp+"(.*)");
if(bRt)
if(bRt){
return true;
}
}
return bRt;
}
public static boolean rightmatchor(Object expObj, Object obj)
{
if(obj==null)
if(obj==null){
return false;
}
String exp=expObj.toString().trim();
if(StringUtils.isEmpty(exp))
if(StringUtils.isEmpty(exp)){
return false;
}
exp=exp.replace(";", ",");
exp=exp.replace(";", ",");
exp=exp.replace(",", ",");
......@@ -437,8 +477,9 @@ public class RuleUtils
for(String strExp:arr)
{
bRt=obj.toString().matches("(.*)"+strExp);
if(bRt)
if(bRt){
return true;
}
}
return bRt;
}
......@@ -449,13 +490,16 @@ public class RuleUtils
}
public static boolean matchand(Object expObj,Object obj)
{
if(obj==null)
if(obj==null){
return false;
if(expObj==null)
}
if(expObj==null){
return false;
}
String exp=expObj.toString().trim();
if(StringUtils.isEmpty(exp))
if(StringUtils.isEmpty(exp)){
return false;
}
exp=exp.replace(";", ",");
exp=exp.replace(";", ",");
exp=exp.replace(",", ",");
......@@ -464,11 +508,13 @@ public class RuleUtils
boolean bRt=true;
for(String strExp:arr)
{
if(strExp.trim().length()==0)
if(strExp.trim().length()==0){
continue;
}
bRt=(obj.toString()).matches("(.*)"+(strExp)+"(.*)");
if(!bRt)
if(!bRt){
return false;
}
}
return bRt;
}
......@@ -503,12 +549,14 @@ public class RuleUtils
switch (str1.hashCode())
{
case 105:
if (str1.equals("i"))
if (str1.equals("i")){
i = 0;
}
break;
case 115:
if (str1.equals("s"))
if (str1.equals("s")){
i = 1;
}
}
switch (i)
{
......
......@@ -42,10 +42,12 @@ public class AppController {
while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next();
String strAuthority=authority.getAuthority();
if(strAuthority.startsWith("UNIRES_"+systemId))
if(strAuthority.startsWith("UNIRES_"+systemId)) {
uniRes.add(strAuthority.substring(systemId.length()+8));
else if(strAuthority.startsWith("APPMENU_"+systemId))
}
else if(strAuthority.startsWith("APPMENU_"+systemId)){
appMenu.add(strAuthority.substring(systemId.length()+9));
}
}
}
Map<String,Object> context = new HashMap<>();
......@@ -55,10 +57,12 @@ public class AppController {
appData.put("unires",uniRes);
appData.put("appmenu",appMenu);
appData.put("enablepermissionvalid",enablePermissionValid);
if(curUser.getSuperuser()==1)
if(curUser.getSuperuser()==1){
appData.put("enablepermissionvalid",false);
else
}
else{
appData.put("enablepermissionvalid",enablePermissionValid);
}
fillAppData(appData);
return ResponseEntity.status(HttpStatus.OK).body(appData);
}
......@@ -76,16 +80,18 @@ public class AppController {
@RequestMapping(method = RequestMethod.PUT, value = "/configs/{configType}/{targetType}")
public ResponseEntity<Boolean> saveConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType, @RequestBody JSONObject config) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
if(StringUtils.isEmpty(userId)){
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",configType);
}
return ResponseEntity.ok(ibzConfigService.saveConfig(configType,targetType,userId,config));
}
@RequestMapping(method = RequestMethod.GET, value = "/configs/{configType}/{targetType}")
public ResponseEntity<JSONObject> getConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
if(StringUtils.isEmpty(userId)){
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
}
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
......
......@@ -56,5 +56,5 @@ public class AuthenticationController
authuserdetail= userDetailsService.loadUserByUsername(userDetails.getUsername());
}
return ResponseEntity.ok().body(authuserdetail);
}
}
}
......@@ -38,18 +38,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
@Override
@SneakyThrows
public boolean hasPermission(Authentication authentication, Object entity, Object action) {
if(!enablePermissionValid)
if(!enablePermissionValid){
return true;
}
Object principal = authentication.getPrincipal();
if(ObjectUtils.isEmpty(principal))
if(ObjectUtils.isEmpty(principal)){
return false;
}
AuthenticationUser authenticationUser= (AuthenticationUser) authentication.getPrincipal();
if(authenticationUser.getSuperuser()==1)
if(authenticationUser.getSuperuser()==1){
return true;
}
String strAction=String.valueOf(action);
Set<String> userAuthorities = getAuthorities(authentication,strAction);
if(userAuthorities.size()==0)
if(userAuthorities.size()==0){
return false;
}
if(isAllData(strAction,userAuthorities)){
return true;
}
......@@ -102,8 +106,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
*/
@SneakyThrows
private void setPermissionCondToSearchContext(EntityBase entity, QueryWrapperContext qc , Set<String> userAuthorities ,AuthenticationUser authenticationUser){
if(entity==null)
if(entity==null){
return ;
}
Map<String,String> permissionField=getPermissionField(entity);//获取组织、部门预置属性
String orgField=permissionField.get("orgfield");
String orgDeptField=permissionField.get("orgsecfield");
......@@ -185,8 +190,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Iterator it = authorities.iterator();
while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next();
if(authority.getAuthority().contains(action))
if(authority.getAuthority().contains(action)){
userAuthorities.add(authority.getAuthority());
}
}
return userAuthorities;
}
......@@ -253,23 +259,27 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
}
if(action.endsWith("Create") || action.endsWith("Save")){
if(!ObjectUtils.isEmpty(orgFieldValue) && !userOrg.contains(orgFieldValue))
if(!ObjectUtils.isEmpty(orgFieldValue) && !userOrg.contains(orgFieldValue)){
return false;
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && !userOrgDept.contains(orgDeptFieldValue))
}
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && !userOrgDept.contains(orgDeptFieldValue)){
return false;
if(!ObjectUtils.isEmpty(crateManFieldValue) && !authenticationUser.getUserid().equals(crateManFieldValue))
}
if(!ObjectUtils.isEmpty(crateManFieldValue) && !authenticationUser.getUserid().equals(crateManFieldValue)){
return false;
}
return true;
}
else{
if(!ObjectUtils.isEmpty(orgFieldValue) && userOrg.contains(orgFieldValue))
if(!ObjectUtils.isEmpty(orgFieldValue) && userOrg.contains(orgFieldValue)){
return true;
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && userOrgDept.contains(orgDeptFieldValue))
}
if(!ObjectUtils.isEmpty(orgDeptFieldValue) && userOrgDept.contains(orgDeptFieldValue)){
return true;
if(!ObjectUtils.isEmpty(crateManFieldValue) && authenticationUser.getUserid().equals(crateManFieldValue))
}
if(!ObjectUtils.isEmpty(crateManFieldValue) && authenticationUser.getUserid().equals(crateManFieldValue)){
return true;
}
return false;
}
}
......@@ -293,12 +303,18 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
String fieldName=entry.getKey();//获取注解字段
DEField fieldAnnotation=entry.getValue();//获取注解值
DEPredefinedFieldType prefieldType=fieldAnnotation.preType();
if(prefieldType==prefieldType.ORGID)//用户配置系统预置属性-组织机构标识
//用户配置系统预置属性-组织机构标识
if(prefieldType==prefieldType.ORGID){
orgField=fieldName;
if(prefieldType==prefieldType.ORGSECTORID)//用户配置系统预置属性-部门标识
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.ORGSECTORID){
orgDeptField=fieldName;
if(prefieldType==prefieldType.CREATEMAN)//用户配置系统预置属性-部门标识
}
//用户配置系统预置属性-部门标识
if(prefieldType==prefieldType.CREATEMAN){
createManField=fieldName;
}
}
permissionFiled.put("orgfield",orgField);
permissionFiled.put("orgsecfield",orgDeptField);
......
......@@ -260,10 +260,12 @@ public class AuthenticationUser implements UserDetails
return this.sessionParams;
}
private Map<String, Object> getUserSessionParam() {
if(userSessionParam!=null)
if(userSessionParam!=null){
return userSessionParam;
else
}
else{
return new HashMap<>();
}
}
public void setOrgInfo(Map<String, Set<String>> orgInfo) {
......
......@@ -29,8 +29,9 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType);
}
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false);
if(config==null) {
config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(adminuserid).build()),false);
......@@ -44,19 +45,22 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType);
}
String cfg="{}";
if(config!=null)
if(config!=null){
cfg=JSONObject.toJSONString(config);
}
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
}
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType)){
throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType);
}
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
}
......
......@@ -26,10 +26,10 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override
public AuthenticationUser loadUserByUsername(String username) {
AuthenticationUser user=uaaFeignClient.loginByUsername(username);
if(user==null)
if(user==null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
}
return user;
}
......@@ -48,8 +48,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo.setLoginname(loginname);
logininfo.setPassword(password);
AuthenticationUser user=uaaFeignClient.login(logininfo);
if(user==null)
if(user==null){
throw new BadRequestAlertException("登录失败","IBZUAAUser",username);
}
return user;
}
......
......@@ -34,14 +34,18 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
String[] data=username.split("[|]");
String loginname="";
String domains="";
if(data.length>0)
if(data.length>0){
loginname=data[0].trim();
if(data.length>1)
}
if(data.length>1){
domains=data[1].trim();
if(!StringUtils.isEmpty(loginname))
}
if(!StringUtils.isEmpty(loginname)){
conds.eq("loginname",loginname);
if(!StringUtils.isEmpty(domains))
}
if(!StringUtils.isEmpty(domains)){
conds.eq("domains",domains);
}
IBZUSER user = this.getOne(conds);
if (user == null) {
throw new UsernameNotFoundException("用户" + username + "未找到");
......@@ -55,10 +59,12 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override
public AuthenticationUser loadUserByLogin(String username, String password){
AuthenticationUser authuserdetail = loadUserByUsername(username);
if(pwencrymode==1)
if(pwencrymode==1){
password = DigestUtils.md5DigestAsHex(password.getBytes());
else if(pwencrymode==2)
}
else if(pwencrymode==2){
password = DigestUtils.md5DigestAsHex(String.format("%1$s||%2$s", username, password).getBytes());
}
if(!authuserdetail.getPassword().equals( password )){
throw new BadRequestAlertException("用户名密码错误","IBZUSER",username);
}
......
......@@ -45,10 +45,12 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
if(cacheMap.size()>0){
log.info(String.format("正在保存审计数据,当前审计集合数量为[%s]",cacheMap.size()));
List temp=new ArrayList();
if(cacheMap.size()<500)
if(cacheMap.size()<500){
temp.addAll(cacheMap);
else
}
else{
temp.addAll(cacheMap.subList(0,500));
}
this.saveBatch(temp);
cacheMap.removeAll(temp);
log.info(String.format("保存完成,当前审计集合数量为[%s]",cacheMap.size()));
......@@ -71,8 +73,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
dataAudit.setAuditobject(entity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue);
dataAudit.setOptime(new Timestamp(new Date().getTime()));
if(request!=null)
if(request!=null){
dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser()));
}
dataAudit.setAuditinfo(getAuditInfo(entity,auditFields));
dataAudit.setIsdatachanged(1);
cacheMap.add(dataAudit);
......@@ -93,9 +96,10 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
//获取更新后的审计内容
String auditInfo=getUpdateAuditInfo(beforeEntity,afterEntity,auditFields);//比较更新前后差异内容
int isDataChanged=1;
if(StringUtils.isEmpty(auditInfo))//审计内容是否发生变化
//审计内容是否发生变化
if(StringUtils.isEmpty(auditInfo)){
isDataChanged=0;
}
IBZDataAudit dataAudit =new IBZDataAudit();
dataAudit.setOppersonid(AuthenticationUser.getAuthenticationUser().getUserid());
dataAudit.setOppersonname(String.format("%s[%s]",AuthenticationUser.getAuthenticationUser().getPersonname(),AuthenticationUser.getAuthenticationUser().getOrgname()));
......@@ -103,8 +107,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
dataAudit.setAuditobject(afterEntity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue);
dataAudit.setOptime(new Timestamp(new Date().getTime()));
if(request!=null)
if(request!=null){
dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser()));
}
dataAudit.setAuditinfo(auditInfo);
dataAudit.setIsdatachanged(isDataChanged);
cacheMap.add(dataAudit);
......@@ -125,8 +130,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
dataAudit.setAuditobject(entity.getClass().getSimpleName());
dataAudit.setAuditobjectdata(idValue);
dataAudit.setOptime(new Timestamp(new Date().getTime()));
if(request!=null)
if(request!=null){
dataAudit.setIpaddress(getIpAddress(request, AuthenticationUser.getAuthenticationUser()));
}
dataAudit.setAuditinfo(getAuditInfo(entity,auditFields));
dataAudit.setIsdatachanged(1);
cacheMap.add(dataAudit);
......@@ -134,13 +140,13 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
private String getAuditInfo(EntityBase entity, Map<String, Audit> auditFields){
String auditResult="";
if(auditFields.size()==0)
if(auditFields.size()==0){
return auditResult;
}
Map<String, DEField> deFields= DEFieldCacheMap.getDEFields(entity.getClass());
if(deFields.size()==0)
if(deFields.size()==0){
return auditResult;
}
JSONArray auditFieldArray=new JSONArray();
for (Map.Entry<String, Audit> auditField : auditFields.entrySet()) {
Object objFieldName=auditField.getKey();
......@@ -149,8 +155,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
if(deFields.containsKey(fieldName)){
deField= deFields.get(fieldName);
}
if(ObjectUtils.isEmpty(deField))
if(ObjectUtils.isEmpty(deField)){
continue;
}
Object value=dataTransfer(entity.get(fieldName),deField.fieldType(),deField.format());
if(!StringUtils.isEmpty(value)){
JSONObject auditFieldObj=new JSONObject();
......@@ -178,12 +185,14 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
private String getUpdateAuditInfo(EntityBase oldData, EntityBase newData, Map<String, Audit> auditFields){
String auditResult="";
JSONArray auditFieldArray=new JSONArray();
if(auditFields.size()==0)
if(auditFields.size()==0){
return auditResult;
}
Map<String, DEField> deFields= DEFieldCacheMap.getDEFields(oldData.getClass());
if(deFields.size()==0)
if(deFields.size()==0){
return auditResult;
}
for (Map.Entry<String, Audit> auditField : auditFields.entrySet()) {
Object objFieldName=auditField.getKey();//获取注解字段
......@@ -192,8 +201,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
if(deFields.containsKey(fieldName)){
deField= deFields.get(fieldName);
}
if(ObjectUtils.isEmpty(deField))
if(ObjectUtils.isEmpty(deField)){
continue;
}
Object oldValue=oldData.get(fieldName);//老属性值
Object newValue=newData.get(fieldName);//新属性值
if(!compare(oldValue,newValue)){
......@@ -223,8 +233,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @return
*/
private String dataTransfer(Object value,String dataType, String strFormat){
if(value==null)
if(value==null){
return "";
}
String transResult=value.toString();
if((dataType.equals("DATE") || dataType.equals("DATETIME") || dataType.equals("TIME")) && (!StringUtils.isEmpty(strFormat))){ //时间类型转换
Timestamp timestamp =(Timestamp)value;
......@@ -242,10 +253,12 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
* @return
*/
private boolean compare(Object sourceObj,Object targetObj){
if(sourceObj==null && targetObj==null)
if(sourceObj==null && targetObj==null){
return true;
if(sourceObj==null && targetObj!=null)
}
if(sourceObj==null && targetObj!=null){
return false;
}
return sourceObj.equals(targetObj);
}
......@@ -278,8 +291,9 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
if(authenticationUser != null && !StringUtils.isEmpty(authenticationUser.getAddr())){
return authenticationUser.getAddr();
}
if(request == null)
if(request == null){
return "";
}
String Xip = request.getHeader("X-Real-IP");
String XFor = request.getHeader("X-Forwarded-For");
if(!StringUtils.isEmpty(XFor) && !"unKnown".equalsIgnoreCase(XFor)){
......
......@@ -33,8 +33,9 @@ public class SimpleFileService implements FileService {
String fileFullPath = this.fileRoot+"ibizutil"+File.separator+fileid+File.separator+fileName;
File file = new File(fileFullPath);
File parent = new File(file.getParent());
if(!parent.exists())
if(!parent.exists()){
parent.mkdirs();
}
FileCopyUtils.copy(multipartFile.getInputStream(),Files.newOutputStream(file.toPath()));
item=new FileItem(fileid,fileName,fileid,fileName,(int)multipartFile.getSize(),extname);
} catch (IOException e) {
......
......@@ -29,8 +29,9 @@ public class FeignRequestInterceptor implements RequestInterceptor {
if (headerNames != null) {
while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding"))
if(name.equalsIgnoreCase("transfer-encoding")){
continue;
}
String values = request.getHeader(name);
requestTemplate.header(name, values);
}
......
......@@ -49,19 +49,19 @@ public class IBZOperationParameterReader implements OperationBuilderPlugin {
public IBZOperationParameterReader(
ModelAttributeParameterExpander expander,
EnumTypeDeterminer enumTypeDeterminer) {
this.expander = expander;
this.enumTypeDeterminer = enumTypeDeterminer;
this.expander = expander;
this.enumTypeDeterminer = enumTypeDeterminer;
}
@Override
public void apply(OperationContext context) {
context.operationBuilder().parameters(context.getGlobalOperationParameters());
context.operationBuilder().parameters(readParameters(context));
context.operationBuilder().parameters(context.getGlobalOperationParameters());
context.operationBuilder().parameters(readParameters(context));
}
@Override
public boolean supports(DocumentationType delimiter) {
return true;
return true;
}
private List<Parameter> readParameters(final OperationContext context) {
......
......@@ -41,7 +41,4 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
String json=objectMapper.writeValueAsString(set);
return objectMapper.readValue(json,parameter.getParameterType());
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册