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

xignzi006 发布系统代码

上级 c7b38aa1
......@@ -261,4 +261,20 @@ export interface Connection {
* @memberof Connection
*/
record2roleid?: any;
/**
* 角色(源)
*
* @returns {*}
* @memberof Connection
*/
record1rolename?: any;
/**
* 角色(目标)
*
* @returns {*}
* @memberof Connection
*/
record2rolename?: any;
}
\ No newline at end of file
......@@ -33,6 +33,8 @@ export default {
record1roleid: "角色(源)",
transactioncurrencyid: "货币",
record2roleid: "角色(目标)",
record1rolename: "角色(源)",
record2rolename: "角色(目标)",
},
views: {
byparentkey: {
......@@ -85,6 +87,8 @@ export default {
connectionname: "关联名称",
statecode: "状态",
statuscode: "状态描述",
record1rolename: "角色(源)",
record2rolename: "角色(目标)",
},
uiactions: {
},
......
......@@ -32,6 +32,8 @@ export default {
record1roleid: "角色(源)",
transactioncurrencyid: "货币",
record2roleid: "角色(目标)",
record1rolename: "角色(源)",
record2rolename: "角色(目标)",
},
views: {
byparentkey: {
......@@ -84,6 +86,8 @@ export default {
connectionname: "关联名称",
statecode: "状态",
statuscode: "状态描述",
record1rolename: "角色(源)",
record2rolename: "角色(目标)",
},
uiactions: {
},
......
......@@ -59,6 +59,17 @@ export class ConnectionByParentKeyBase extends GridViewBase {
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航上下文集合
*
* @protected
* @type {*}
* @memberof ConnectionByParentKeyBase
*/
protected customViewNavContexts: any = {
'RECORD1ID': { isRawValue: false, value: 'lead' }
};
/**
* 视图模型数据
*
......
......@@ -56,6 +56,17 @@ export class ConnectionEditViewBase extends EditViewBase {
*/
protected counterServiceArray: Array<any> = [];
/**
* 自定义视图导航参数集合
*
* @protected
* @type {*}
* @memberof ConnectionEditViewBase
*/
protected customViewParams: any = {
'record1id': { isRawValue: false, value: 'record1id' }
};
/**
* 视图模型数据
*
......
因为 它太大了无法显示 源差异 。您可以改为 查看blob
......@@ -183,4 +183,14 @@ export class MainEditFormBase extends EditFormControlBase {
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 }] }),
};
/**
* 新建默认值
* @memberof MainEditFormBase
*/
public createDefault(){
if (this.data.hasOwnProperty('record1id')) {
this.data['record1id'] = this.viewparams['record1id'];
}
}
}
\ No newline at end of file
......@@ -86,6 +86,20 @@ export class MainGridBase extends GridControllerBase {
show: true,
util: 'PX'
},
{
name: 'record1rolename',
label: '角色(源)',
langtag: 'entities.connection.main_grid.columns.record1rolename',
show: true,
util: 'PX'
},
{
name: 'record2rolename',
label: '角色(目标)',
langtag: 'entities.connection.main_grid.columns.record2rolename',
show: true,
util: 'PX'
},
]
/**
......@@ -123,6 +137,8 @@ export class MainGridBase extends GridControllerBase {
'connectionname':false,
'statecode':false,
'statuscode':false,
'record1rolename':false,
'record2rolename':false,
};
/**
......
......@@ -26,6 +26,11 @@ export default class MainModel {
]
}else{
return [
{
name: 'record2rolename',
prop: 'record2rolename',
dataType: 'PICKUPTEXT',
},
{
name: 'statecode',
prop: 'statecode',
......@@ -36,6 +41,11 @@ export default class MainModel {
prop: 'record1roleid',
dataType: 'PICKUP',
},
{
name: 'record1rolename',
prop: 'record1rolename',
dataType: 'PICKUPTEXT',
},
{
name: 'record2roleid',
prop: 'record2roleid',
......
......@@ -63,6 +63,30 @@
</template>
</el-table-column>
</template>
<template v-if="getColumnState('record1rolename')">
<el-table-column show-overflow-tooltip :prop="'record1rolename'" :label="$t('entities.connection.main_grid.columns.record1rolename')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.connection.main_grid.columns.record1rolename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.record1rolename}}</span>
</template>
</el-table-column>
</template>
<template v-if="getColumnState('record2rolename')">
<el-table-column show-overflow-tooltip :prop="'record2rolename'" :label="$t('entities.connection.main_grid.columns.record2rolename')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.connection.main_grid.columns.record2rolename')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<span>{{row.record2rolename}}</span>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState">
<el-table-column></el-table-column>
</template>
......
......@@ -276,6 +276,20 @@ public class Connection extends EntityMP implements Serializable {
@JSONField(name = "record2roleid")
@JsonProperty("record2roleid")
private String record2roleid;
/**
* 角色(源)
*/
@TableField(value = "record1rolename")
@JSONField(name = "record1rolename")
@JsonProperty("record1rolename")
private String record1rolename;
/**
* 角色(目标)
*/
@TableField(value = "record2rolename")
@JSONField(name = "record2rolename")
@JsonProperty("record2rolename")
private String record2rolename;
/**
*
......@@ -549,6 +563,22 @@ public class Connection extends EntityMP implements Serializable {
this.modify("record2roleid",record2roleid);
}
/**
* 设置 [角色(源)]
*/
public void setRecord1rolename(String record1rolename){
this.record1rolename = record1rolename ;
this.modify("record1rolename",record1rolename);
}
/**
* 设置 [角色(目标)]
*/
public void setRecord2rolename(String record2rolename){
this.record2rolename = record2rolename ;
this.modify("record2rolename",record2rolename);
}
}
......
......@@ -83,6 +83,34 @@ public class ConnectionSearchContext extends QueryWrapperContext<Connection> {
this.getSearchCond().eq("record2roleid", n_record2roleid_eq);
}
}
private String n_record1rolename_eq;//[角色(源)]
public void setN_record1rolename_eq(String n_record1rolename_eq) {
this.n_record1rolename_eq = n_record1rolename_eq;
if(!ObjectUtils.isEmpty(this.n_record1rolename_eq)){
this.getSearchCond().eq("record1rolename", n_record1rolename_eq);
}
}
private String n_record1rolename_like;//[角色(源)]
public void setN_record1rolename_like(String n_record1rolename_like) {
this.n_record1rolename_like = n_record1rolename_like;
if(!ObjectUtils.isEmpty(this.n_record1rolename_like)){
this.getSearchCond().like("record1rolename", n_record1rolename_like);
}
}
private String n_record2rolename_eq;//[角色(目标)]
public void setN_record2rolename_eq(String n_record2rolename_eq) {
this.n_record2rolename_eq = n_record2rolename_eq;
if(!ObjectUtils.isEmpty(this.n_record2rolename_eq)){
this.getSearchCond().eq("record2rolename", n_record2rolename_eq);
}
}
private String n_record2rolename_like;//[角色(目标)]
public void setN_record2rolename_like(String n_record2rolename_like) {
this.n_record2rolename_like = n_record2rolename_like;
if(!ObjectUtils.isEmpty(this.n_record2rolename_like)){
this.getSearchCond().like("record2rolename", n_record2rolename_like);
}
}
/**
* 启用快速搜索
......
......@@ -56,6 +56,7 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
@Override
@Transactional
public boolean create(Connection et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getConnectionid()),et);
......@@ -64,12 +65,14 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
@Override
public void createBatch(List<Connection> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Connection et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("connectionid",et.getConnectionid())))
return false;
CachedBeanCopier.copy(get(et.getConnectionid()),et);
......@@ -78,6 +81,7 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
@Override
public void updateBatch(List<Connection> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
......@@ -108,6 +112,7 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
@Override
public Connection getDraft(Connection et) {
fillParentData(et);
return et;
}
......@@ -137,12 +142,14 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
@Override
public boolean saveBatch(Collection<Connection> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<Connection> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
......@@ -198,6 +205,32 @@ public class ConnectionServiceImpl extends ServiceImpl<ConnectionMapper, Connect
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(Connection et){
//实体关系[DER1N_CONNECTION__CONNECTIONROLE__RECORD1ROLEID]
if(!ObjectUtils.isEmpty(et.getRecord1roleid())){
cn.ibizlab.businesscentral.core.runtime.domain.ConnectionRole record1role=et.getRecord1role();
if(ObjectUtils.isEmpty(record1role)){
cn.ibizlab.businesscentral.core.runtime.domain.ConnectionRole majorEntity=connectionroleService.get(et.getRecord1roleid());
et.setRecord1role(majorEntity);
record1role=majorEntity;
}
et.setRecord1rolename(record1role.getConnectionrolename());
}
//实体关系[DER1N_CONNECTION__CONNECTIONROLE__RECORD2ROLEID]
if(!ObjectUtils.isEmpty(et.getRecord2roleid())){
cn.ibizlab.businesscentral.core.runtime.domain.ConnectionRole record2role=et.getRecord2role();
if(ObjectUtils.isEmpty(record2role)){
cn.ibizlab.businesscentral.core.runtime.domain.ConnectionRole majorEntity=connectionroleService.get(et.getRecord2roleid());
et.setRecord2role(majorEntity);
record2role=majorEntity;
}
et.setRecord2rolename(record2role.getConnectionrolename());
}
}
......
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="ConnectionResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1 ) t1 where connectionid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD1ROLENAME`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`RECORD2ROLENAME`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1 ) t1 where connectionid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......@@ -68,18 +68,18 @@
<!--数据查询[ByParentKey]-->
<sql id="ByParentKey" databaseId="mysql">
<![CDATA[ SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1
<![CDATA[ SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD1ROLENAME`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`RECORD2ROLENAME`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1
WHERE ( t1.`RECORD1ID` = #{srf.datacontext.srfparentkey} )
]]>
</sql>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1
<![CDATA[ SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD1ROLENAME`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`RECORD2ROLENAME`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1
<![CDATA[ SELECT t1.`CONNECTIONID`, t1.`CONNECTIONNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`DESCRIPTION`, t1.`EFFECTIVEEND`, t1.`EFFECTIVESTART`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`IMPORTSEQUENCENUMBER`, t1.`MASTER`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`RECORD1ID`, t1.`RECORD1IDOBJECTTYPECODE`, t1.`RECORD1OBJECTTYPECODE`, t1.`RECORD1ROLEID`, t1.`RECORD1ROLENAME`, t1.`RECORD2ID`, t1.`RECORD2IDOBJECTTYPECODE`, t1.`RECORD2OBJECTTYPECODE`, t1.`RECORD2ROLEID`, t1.`RECORD2ROLENAME`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`TRANSACTIONCURRENCYID`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`VERSIONNUMBER` FROM `CONNECTION` t1
]]>
</sql>
</mapper>
......
......@@ -284,6 +284,22 @@ public class ConnectionDTO extends DTOBase implements Serializable {
@JsonProperty("record2roleid")
private String record2roleid;
/**
* 属性 [RECORD1ROLENAME]
*
*/
@JSONField(name = "record1rolename")
@JsonProperty("record1rolename")
private String record1rolename;
/**
* 属性 [RECORD2ROLENAME]
*
*/
@JSONField(name = "record2rolename")
@JsonProperty("record2rolename")
private String record2rolename;
/**
* 设置 [RECORD2OBJECTTYPECODE]
......@@ -501,6 +517,22 @@ public class ConnectionDTO extends DTOBase implements Serializable {
this.modify("record2roleid",record2roleid);
}
/**
* 设置 [RECORD1ROLENAME]
*/
public void setRecord1rolename(String record1rolename){
this.record1rolename = record1rolename ;
this.modify("record1rolename",record1rolename);
}
/**
* 设置 [RECORD2ROLENAME]
*/
public void setRecord2rolename(String record2rolename){
this.record2rolename = record2rolename ;
this.modify("record2rolename",record2rolename);
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册