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

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

上级 3457e391
......@@ -143,6 +143,14 @@
"viewname": "MetaRelationshipEditView",
"viewtag": "3c4651b0fddbda6565cce70dbada576a"
},
"metadynamicmodelusr2gridview": {
"title": "动态模型表格视图",
"caption": "动态模型实体表格视图(查副本)",
"viewtype": "DEGRIDVIEW",
"viewmodule": "lite",
"viewname": "MetaDynamicModelUsr2GridView",
"viewtag": "409f7ea81d15d2e2f1ee295d189d965b"
},
"metarelationshippickupgridview": {
"title": "实体关系选择表格视图",
"caption": "实体关系",
......
......@@ -16,6 +16,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型编辑视图",null),
},
usr2gridview: {
caption: commonLogic.appcommonhandle("动态模型实体表格视图(查副本)",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
},
gridview: {
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
......@@ -193,6 +197,64 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("帮助",null),
},
},
usr2gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("编辑",null),
tip: commonLogic.appcommonhandle("编辑",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("拷贝",null),
tip: commonLogic.appcommonhandle("拷贝",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("删除",null),
tip: commonLogic.appcommonhandle("删除",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("导出",null),
tip: commonLogic.appcommonhandle("导出",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("导出数据模型",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
tbitem17: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem19: {
caption: commonLogic.appcommonhandle("过滤",null),
tip: commonLogic.appcommonhandle("过滤",null),
},
tbitem18: {
caption: commonLogic.appcommonhandle("帮助",null),
tip: commonLogic.appcommonhandle("帮助",null),
},
},
};
return data;
}
......
......@@ -16,6 +16,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型编辑视图",null),
},
usr2gridview: {
caption: commonLogic.appcommonhandle("动态模型实体表格视图(查副本)",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
},
gridview: {
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
......@@ -193,6 +197,64 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("Help",null),
},
},
usr2gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("New",null),
tip: commonLogic.appcommonhandle("New",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("Edit",null),
tip: commonLogic.appcommonhandle("Edit {0}",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("Copy",null),
tip: commonLogic.appcommonhandle("Copy {0}",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("Remove",null),
tip: commonLogic.appcommonhandle("Remove {0}",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("Export",null),
tip: commonLogic.appcommonhandle("Export {0} Data To Excel",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("Export Data Model",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
tbitem17: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem19: {
caption: commonLogic.appcommonhandle("Filter",null),
tip: commonLogic.appcommonhandle("Filter",null),
},
tbitem18: {
caption: commonLogic.appcommonhandle("Help",null),
tip: commonLogic.appcommonhandle("Help",null),
},
},
};
return data;
}
......
......@@ -16,6 +16,10 @@ function getLocaleResourceBase(){
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型编辑视图",null),
},
usr2gridview: {
caption: commonLogic.appcommonhandle("动态模型实体表格视图(查副本)",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
},
gridview: {
caption: commonLogic.appcommonhandle("动态模型",null),
title: commonLogic.appcommonhandle("动态模型表格视图",null),
......@@ -193,6 +197,64 @@ function getLocaleResourceBase(){
tip: commonLogic.appcommonhandle("帮助",null),
},
},
usr2gridviewtoolbar_toolbar: {
tbitem3: {
caption: commonLogic.appcommonhandle("新建",null),
tip: commonLogic.appcommonhandle("新建",null),
},
tbitem4: {
caption: commonLogic.appcommonhandle("编辑",null),
tip: commonLogic.appcommonhandle("编辑",null),
},
tbitem6: {
caption: commonLogic.appcommonhandle("拷贝",null),
tip: commonLogic.appcommonhandle("拷贝",null),
},
tbitem7: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem8: {
caption: commonLogic.appcommonhandle("删除",null),
tip: commonLogic.appcommonhandle("删除",null),
},
tbitem9: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem13: {
caption: commonLogic.appcommonhandle("导出",null),
tip: commonLogic.appcommonhandle("导出",null),
},
tbitem10: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem16: {
caption: commonLogic.appcommonhandle("其它",null),
tip: commonLogic.appcommonhandle("其它",null),
},
tbitem21: {
caption: commonLogic.appcommonhandle("导出数据模型",null),
tip: commonLogic.appcommonhandle("导出数据模型",null),
},
tbitem23: {
caption: commonLogic.appcommonhandle("数据导入",null),
tip: commonLogic.appcommonhandle("数据导入",null),
},
tbitem17: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem19: {
caption: commonLogic.appcommonhandle("过滤",null),
tip: commonLogic.appcommonhandle("过滤",null),
},
tbitem18: {
caption: commonLogic.appcommonhandle("帮助",null),
tip: commonLogic.appcommonhandle("帮助",null),
},
},
};
return data;
}
......
......@@ -352,6 +352,50 @@ mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).
console.groupEnd();
return [status, records ? records : []];
});
// FetchFindbak
mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchfindbak$/)).reply((config: any) => {
console.groupCollapsed("实体:metadynamicmodel 方法: FetchFindbak");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(mockDatas);
console.groupEnd();
console.groupEnd();
return [status, mockDatas ? mockDatas : []];
});
// FetchFindbak
mock.onGet(new RegExp(/^\/metadynamicmodels\/fetchfindbak(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:metadynamicmodel 方法: FetchFindbak");
console.table({url:config.url, method: config.method, data:config.data});
if(config.url.includes('page')){
let url = config.url.split('?')[1];
let params = qs.parse(url);
Object.assign(config, params);
}
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
let total = mockDatas.length;
let records: Array<any> = [];
if(!config.page || !config.size){
records = mockDatas;
}else{
if((config.page-1)*config.size < total){
records = mockDatas.slice(config.page,config.size);
}
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(records ? records : []);
console.groupEnd();
console.groupEnd();
return [status, records ? records : []];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
......
......@@ -151,6 +151,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "MetaRelationshipEditView",
"viewtag": "3c4651b0fddbda6565cce70dbada576a"
},
"metadynamicmodelusr2gridview": {
"title": "动态模型表格视图",
"caption": "动态模型实体表格视图(查副本)",
"viewtype": "DEGRIDVIEW",
"viewmodule": "lite",
"viewname": "MetaDynamicModelUsr2GridView",
"viewtag": "409f7ea81d15d2e2f1ee295d189d965b"
},
"metarelationshippickupgridview": {
"title": "实体关系选择表格视图",
"caption": "实体关系",
......
......@@ -226,4 +226,33 @@ export default class MetaDynamicModelServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metadynamicmodels/searchdefault`,tempData,isloading);
}
/**
* FetchFindbak接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaDynamicModelServiceBase
*/
public async FetchFindbak(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/metadynamicmodels/fetchfindbak`,tempData,isloading);
return res;
}
/**
* searchFindbak接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaDynamicModelServiceBase
*/
public async searchFindbak(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metadynamicmodels/searchfindbak`,tempData,isloading);
}
}
\ No newline at end of file
......@@ -97,6 +97,7 @@ export default class MetaDynamicModelUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-edit-view'});
this.allViewMap.set(':',{viewname:'usr2gridview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-usr2-grid-view'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'metadynamicmodels',component:'meta-dynamic-model-grid-view'});
}
......
......@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface MetaDynamicModelMapper extends BaseMapper<MetaDynamicModel> {
Page<MetaDynamicModel> searchDefault(IPage page, @Param("srf") MetaDynamicModelSearchContext context, @Param("ew") Wrapper<MetaDynamicModel> wrapper);
Page<MetaDynamicModel> searchFindbak(IPage page, @Param("srf") MetaDynamicModelSearchContext context, @Param("ew") Wrapper<MetaDynamicModel> wrapper);
@Override
MetaDynamicModel selectById(Serializable id);
@Override
......
......@@ -39,6 +39,7 @@ public interface IMetaDynamicModelService extends IService<MetaDynamicModel> {
boolean save(MetaDynamicModel et);
void saveBatch(List<MetaDynamicModel> list);
Page<MetaDynamicModel> searchDefault(MetaDynamicModelSearchContext context);
Page<MetaDynamicModel> searchFindbak(MetaDynamicModelSearchContext context);
List<MetaDynamicModel> selectBySystemId(String pssystemid);
void removeBySystemId(String pssystemid);
List<MetaDynamicModel> selectByPdynainstid(String configid);
......
......@@ -228,6 +228,15 @@ public class MetaDynamicModelServiceImpl extends ServiceImpl<MetaDynamicModelMap
return new PageImpl<MetaDynamicModel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 查询副本
*/
@Override
public Page<MetaDynamicModel> searchFindbak(MetaDynamicModelSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<MetaDynamicModel> pages=baseMapper.searchFindbak(context.getPages(),context,context.getSelectCond());
return new PageImpl<MetaDynamicModel>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
......
......@@ -244,7 +244,7 @@
<!--输出实体[META_DYNAMICMODEL]数据结构 -->
<changeSet author="root" id="tab-meta_dynamicmodel-36-12">
<changeSet author="root" id="tab-meta_dynamicmodel-44-12">
<createTable tableName="IBZDYNAMICMODEL">
<column name="DYNAINSTID" remarks="" type="VARCHAR(100)">
</column>
......@@ -448,10 +448,10 @@
<!--输出实体[DST_VIEW]外键关系 -->
<!--输出实体[META_DATASET]外键关系 -->
<!--输出实体[META_DYNAMICMODEL]外键关系 -->
<changeSet author="root" id="fk-meta_dynamicmodel-36-18">
<changeSet author="root" id="fk-meta_dynamicmodel-44-18">
<addForeignKeyConstraint baseColumnNames="SYSTEMID" baseTableName="IBZDYNAMICMODEL" constraintName="DER1N_META_DYNAMICMODEL_DST_SY" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PSSYSTEMID" referencedTableName="IBZPSSYSTEM" validate="true"/>
</changeSet>
<changeSet author="root" id="fk-meta_dynamicmodel-36-19">
<changeSet author="root" id="fk-meta_dynamicmodel-44-19">
<addForeignKeyConstraint baseColumnNames="PDYNAINSTID" baseTableName="IBZDYNAMICMODEL" constraintName="DER1N_META_DYNAMICMODEL_META_D" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONFIGID" referencedTableName="IBZDYNAMICMODEL" validate="true"/>
</changeSet>
<!--输出实体[META_ENTITY]外键关系 -->
......
......@@ -48,6 +48,15 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Findbak]-->
<select id="searchFindbak" parameterType="cn.ibizlab.core.lite.filter.MetaDynamicModelSearchContext" resultMap="MetaDynamicModelResultMap">
select t1.* from (
<include refid="FINDDYNAMICS" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CONFIGID`, t1.`CONFIGNAME`, t1.`DYNAINSTID`, t1.`MODELFILE`, t1.`PDYNAINSTID`, t1.`STATUS`, t1.`SYSTEMID` FROM `IBZDYNAMICMODEL` t1
......@@ -58,6 +67,22 @@
<![CDATA[ SELECT t1.CONFIGID, t1.CONFIGNAME, t1.DYNAINSTID, t1.MODELFILE, t1.PDYNAINSTID, t1.STATUS, t1.SYSTEMID FROM IBZDYNAMICMODEL t1
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="mysql">
<![CDATA[ SELECT t1.`CONFIGID`, t1.`CONFIGNAME`, t1.`DYNAINSTID`, t1.`MODELFILE`, t1.`PDYNAINSTID`, t1.`STATUS`, t1.`SYSTEMID` FROM `IBZDYNAMICMODEL` t1
WHERE t1.`PDYNAINSTID` = #{srf.datacontext.configid}
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="oracle">
<![CDATA[ SELECT t1.CONFIGID, t1.CONFIGNAME, t1.DYNAINSTID, t1.MODELFILE, t1.PDYNAINSTID, t1.STATUS, t1.SYSTEMID FROM IBZDYNAMICMODEL t1
]]>
</sql>
<!--数据查询[FINDDYNAMICS]-->
<sql id="FINDDYNAMICS" databaseId="postgresql">
<![CDATA[ SELECT t1.CONFIGID, t1.CONFIGNAME, t1.DYNAINSTID, t1.MODELFILE, t1.PDYNAINSTID, t1.STATUS, t1.SYSTEMID FROM IBZDYNAMICMODEL t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CONFIGID`, t1.`CONFIGNAME`, t1.`DYNAINSTID`, t1.`MODELFILE`, t1.`PDYNAINSTID`, t1.`STATUS`, t1.`SYSTEMID` FROM `IBZDYNAMICMODEL` t1
......
......@@ -119,7 +119,7 @@
"dename":"MetaDynamicModel",
"delogicname":"动态模型",
"sysmoudle":{"id":"LITE","name":"lite"},
"dedataset":[{"id":"Default" , "name":"数据集"}],
"dedataset":[{"id":"Default" , "name":"数据集"},{"id":"Findbak" , "name":"查询副本"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Publish" , "name":"发布模型" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
......
......@@ -179,6 +179,28 @@ public class MetaDynamicModelResource {
.body(new PageImpl(metadynamicmodelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaDynamicModel-searchFindbak-all')")
@ApiOperation(value = "获取查询副本", tags = {"动态模型" } ,notes = "获取查询副本")
@RequestMapping(method= RequestMethod.GET , value="/metadynamicmodels/fetchfindbak")
public ResponseEntity<List<MetaDynamicModelDTO>> fetchFindbak(MetaDynamicModelSearchContext context) {
Page<MetaDynamicModel> domains = metadynamicmodelService.searchFindbak(context) ;
List<MetaDynamicModelDTO> list = metadynamicmodelMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaDynamicModel-searchFindbak-all')")
@ApiOperation(value = "查询查询副本", tags = {"动态模型" } ,notes = "查询查询副本")
@RequestMapping(method= RequestMethod.POST , value="/metadynamicmodels/searchfindbak")
public ResponseEntity<Page<MetaDynamicModelDTO>> searchFindbak(@RequestBody MetaDynamicModelSearchContext context) {
Page<MetaDynamicModel> domains = metadynamicmodelService.searchFindbak(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(metadynamicmodelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册