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

xignzi006 发布系统代码

上级 1b394dd5
......@@ -269,6 +269,16 @@
"viewtag": "7FCD2E75-E34A-493C-922E-8AE47BCE08CA",
"memo": ""
},
"taskquickcreate": {
"title": "任务",
"caption": "任务",
"viewtype": "DEOPTVIEW",
"viewmodule": "Base",
"viewname": "TaskQuickCreate",
"viewfilename": "task-quick-create",
"viewtag": "893e62d6fbdc4580de7e3e802aec9108",
"memo": ""
},
"central": {
"title": "企业中心",
"caption": "企业中心",
......@@ -379,6 +389,16 @@
"viewtag": "a95d7d9111bc13a8b73a11ee1e4ff92a",
"memo": "系统自动添加"
},
"appointmentquickcreate": {
"title": "约会",
"caption": "约会",
"viewtype": "DEOPTVIEW",
"viewmodule": "Base",
"viewname": "AppointmentQuickCreate",
"viewfilename": "appointment-quick-create",
"viewtag": "aa79d35850f36fbc1a5085353ecd5af5",
"memo": ""
},
"quoteeditview": {
"title": "quote编辑视图",
"caption": "报价单",
......
......@@ -70,6 +70,28 @@ export default {
caption: "约会",
title: 'appointment编辑视图',
},
quickcreate: {
caption: "约会",
title: '约会',
},
},
quickcreate_form: {
details: {
group1: "appointment基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "约会",
srfmajortext: "主题",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
subject: "主题",
activityid: "约会",
},
uiactions: {
},
},
main_form: {
details: {
......
......@@ -69,6 +69,28 @@ export default {
caption: '约会',
title: 'appointment编辑视图',
},
quickcreate: {
caption: '约会',
title: '约会',
},
},
quickcreate_form: {
details: {
group1: 'appointment基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '约会',
srfmajortext: '主题',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
subject: '主题',
activityid: '约会',
},
uiactions: {
},
},
main_form: {
details: {
......
......@@ -51,11 +51,39 @@ export default {
serviceid: '服务',
},
views: {
quickcreate: {
caption: "任务",
title: '任务',
},
editview: {
caption: "任务",
title: 'task编辑视图',
},
},
quickcreate_form: {
details: {
group1: "task基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "任务​​",
srfmajortext: "主题",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
subject: "主题",
ownerid: "负责人",
owneridtype: "OwnerIdType",
owneridyominame: "OwnerIdYomiName",
regardingobjectid: "关于",
regardingobjectidyominame: "RegardingObjectIdYomiName",
regardingobjecttypecode: "RegardingObjectTypeCode",
activityid: "任务​​",
},
uiactions: {
},
},
main_form: {
details: {
group1: "task基本信息",
......
......@@ -50,11 +50,39 @@ export default {
serviceid: '服务',
},
views: {
quickcreate: {
caption: '任务',
title: '任务',
},
editview: {
caption: '任务',
title: 'task编辑视图',
},
},
quickcreate_form: {
details: {
group1: 'task基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '任务​​',
srfmajortext: '主题',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
subject: '主题',
ownerid: '负责人',
owneridtype: 'OwnerIdType',
owneridyominame: 'OwnerIdYomiName',
regardingobjectid: '关于',
regardingobjectidyominame: 'RegardingObjectIdYomiName',
regardingobjecttypecode: 'RegardingObjectTypeCode',
activityid: '任务​​',
},
uiactions: {
},
},
main_form: {
details: {
group1: 'task基本信息',
......
......@@ -321,6 +321,7 @@ mock.onGet(new RegExp(/^\/tasks\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((confi
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
......
......@@ -223,6 +223,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "CenteralPortal",
"viewtag": "7FCD2E75-E34A-493C-922E-8AE47BCE08CA"
},
"taskquickcreate": {
"title": "任务",
"caption": "任务",
"viewtype": "DEOPTVIEW",
"viewmodule": "Base",
"viewname": "TaskQuickCreate",
"viewtag": "893e62d6fbdc4580de7e3e802aec9108"
},
"central": {
"title": "企业中心",
"caption": "企业中心",
......@@ -311,6 +319,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "PhoneCallEditView",
"viewtag": "a95d7d9111bc13a8b73a11ee1e4ff92a"
},
"appointmentquickcreate": {
"title": "约会",
"caption": "约会",
"viewtype": "DEOPTVIEW",
"viewmodule": "Base",
"viewname": "AppointmentQuickCreate",
"viewtag": "aa79d35850f36fbc1a5085353ecd5af5"
},
"quoteeditview": {
"title": "quote编辑视图",
"caption": "报价单",
......
.option-view {
--option-view: 0;
}
// 避免空文件,后台不让空文件过
.appointment-quick-create {
--appointment-quick-create: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import AppointmentQuickCreateBase from './appointment-quick-create-base.vue';
import view_form from '@widgets/appointment/quick-create-form/quick-create-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class AppointmentQuickCreate extends AppointmentQuickCreateBase {
}
</script>
\ No newline at end of file
.option-view {
--option-view: 0;
}
// 避免空文件,后台不让空文件过
.task-quick-create {
--task-quick-create: 0;
}
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import TaskQuickCreateBase from './task-quick-create-base.vue';
import view_form from '@widgets/task/quick-create-form/quick-create-form.vue';
@Component({
components: {
view_form,
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
vm.$store.commit('addCurPageViewtag', { route: to, viewtag: vm.viewtag });
});
},
})
export default class TaskQuickCreate extends TaskQuickCreateBase {
}
</script>
\ No newline at end of file
export const PageComponents = {
install(Vue: any, opt: any) {
Vue.component('account-option-view', () => import('@pages/base/account-option-view/account-option-view.vue'));
Vue.component('appointment-quick-create', () => import('@pages/base/appointment-quick-create/appointment-quick-create.vue'));
Vue.component('account-introduction', () => import('@pages/base/account-introduction/account-introduction.vue'));
Vue.component('campaign-response-edit-view', () => import('@pages/marketing/campaign-response-edit-view/campaign-response-edit-view.vue'));
Vue.component('sales-order-edit-view', () => import('@pages/sales/sales-order-edit-view/sales-order-edit-view.vue'));
......@@ -14,8 +15,9 @@ export const PageComponents = {
Vue.component('centeral-portal', () => import('@pages/ungroup/centeral-portal/centeral-portal.vue'));
Vue.component('product-edit-view', () => import('@pages/product/product-edit-view/product-edit-view.vue'));
Vue.component('quote-grid-view', () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'));
Vue.component('invoice-edit-view', () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'));
Vue.component('task-quick-create', () => import('@pages/base/task-quick-create/task-quick-create.vue'));
Vue.component('account-account-info', () => import('@pages/base/account-account-info/account-account-info.vue'));
Vue.component('invoice-edit-view', () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'));
Vue.component('account-summary', () => import('@pages/base/account-summary/account-summary.vue'));
Vue.component('account-contact-setting', () => import('@pages/base/account-contact-setting/account-contact-setting.vue'));
Vue.component('opportunity-grid-view', () => import('@pages/sales/opportunity-grid-view/opportunity-grid-view.vue'));
......
......@@ -49,6 +49,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-option-view/account-option-view.vue'),
},
{
path: 'appointments/:appointment?/quickcreate/:quickcreate?',
meta: {
caption: 'entities.appointment.views.quickcreate.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'appointments', parameterName: 'appointment' },
{ pathName: 'quickcreate', parameterName: 'quickcreate' },
],
requireAuth: true,
},
component: () => import('@pages/base/appointment-quick-create/appointment-quick-create.vue'),
},
{
path: 'accounts/:account?/introduction/:introduction?',
meta: {
......@@ -231,18 +245,18 @@ const router = new Router({
component: () => import('@pages/sales/quote-grid-view/quote-grid-view.vue'),
},
{
path: 'invoices/:invoice?/editview/:editview?',
path: 'tasks/:task?/quickcreate/:quickcreate?',
meta: {
caption: 'entities.invoice.views.editview.title',
caption: 'entities.task.views.quickcreate.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'editview', parameterName: 'editview' },
{ pathName: 'tasks', parameterName: 'task' },
{ pathName: 'quickcreate', parameterName: 'quickcreate' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'),
component: () => import('@pages/base/task-quick-create/task-quick-create.vue'),
},
{
path: 'accounts/:account?/accountinfo/:accountinfo?',
......@@ -258,6 +272,20 @@ const router = new Router({
},
component: () => import('@pages/base/account-account-info/account-account-info.vue'),
},
{
path: 'invoices/:invoice?/editview/:editview?',
meta: {
caption: 'entities.invoice.views.editview.title',
info:'',
parameters: [
{ pathName: 'central', parameterName: 'central' },
{ pathName: 'invoices', parameterName: 'invoice' },
{ pathName: 'editview', parameterName: 'editview' },
],
requireAuth: true,
},
component: () => import('@pages/finance/invoice-edit-view/invoice-edit-view.vue'),
},
{
path: 'accounts/:account?/summary/:summary?',
meta: {
......@@ -1115,6 +1143,19 @@ const router = new Router({
},
component: () => import('@pages/ungroup/centeral-portal/centeral-portal.vue'),
},
{
path: '/tasks/:task?/quickcreate/:quickcreate?',
meta: {
caption: 'entities.task.views.quickcreate.title',
info:'',
parameters: [
{ pathName: 'tasks', parameterName: 'task' },
{ pathName: 'quickcreate', parameterName: 'quickcreate' },
],
requireAuth: true,
},
component: () => import('@pages/base/task-quick-create/task-quick-create.vue'),
},
{
path: '/pricelevels/:pricelevel?/pickupview/:pickupview?',
meta: {
......@@ -1245,6 +1286,19 @@ const router = new Router({
},
component: () => import('@pages/base/phone-call-edit-view/phone-call-edit-view.vue'),
},
{
path: '/appointments/:appointment?/quickcreate/:quickcreate?',
meta: {
caption: 'entities.appointment.views.quickcreate.title',
info:'',
parameters: [
{ pathName: 'appointments', parameterName: 'appointment' },
{ pathName: 'quickcreate', parameterName: 'quickcreate' },
],
requireAuth: true,
},
component: () => import('@pages/base/appointment-quick-create/appointment-quick-create.vue'),
},
{
path: '/quotes/:quote?/editview/:editview?',
meta: {
......
import { Verify } from '@/utils/verify/verify';
/**
* 根据父获取草稿
*
* @export
* @class DraftByParentLogicBase
*/
export default class DraftByParentLogicBase {
/**
* 名称
*
* @memberof DraftByParentLogicBase
*/
private name:string ="DraftByParent";
/**
* 唯一标识
*
* @memberof DraftByParentLogicBase
*/
private id:string = "353407EB-4915-406A-90B8-E6CAB8338687";
/**
* 默认参数名称
*
* @memberof DraftByParentLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof DraftByParentLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of DraftByParentLogicBase.
*
* @param {*} [opts={}]
* @memberof DraftByParentLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof DraftByParentLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public onExecute(context:any,params:any,isloading:boolean){
return this.executeBegin(context,params,isloading);
}
/**
* 获取父数据
*
* @param context 应用上下文
* @param params 传入参数
*/
private async executePrepareparam1(context:any,params:any,isloading:boolean){
// 准备参数节点
let tempDstParam0Context:any = this.paramsMap.get('Default').context?this.paramsMap.get('Default').context:{};
let tempDstParam0Data:any = this.paramsMap.get('Default').data?this.paramsMap.get('Default').data:{};
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
return this.paramsMap.get(this.defaultParamName).data;
}
/**
* 开始
*
* @param params 传入参数
*/
private async executeBegin(context:any,params:any,isloading:boolean){
//开始节点
if(this.compute0Cond(params)){
return this.executePrepareparam1(context,params,isloading);
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import DraftByParentLogicBase from './draft-by-parent-logic-base';
/**
* 根据父获取草稿
*
* @export
* @class DraftByParentLogic
*/
export default class DraftByParentLogic extends DraftByParentLogicBase{
/**
* Creates an instance of DraftByParentLogic
*
* @param {*} [opts={}]
* @memberof DraftByParentLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
import DraftByParentLogic from '@/service/task/draft-by-parent-logic';
......@@ -176,4 +177,19 @@ export default class TaskServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/tasks/fetchdefault`,tempData,isloading);
}
/**
* DraftByParent接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof TaskServiceBase
*/
public async DraftByParent(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let appLogic:DraftByParentLogic = new DraftByParentLogic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
const result = await appLogic.onExecute(context,data,isloading?true:false);
return {status:200,data:result};
}
}
\ No newline at end of file
......@@ -178,10 +178,12 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'aa79d35850f36fbc1a5085353ecd5af5',
'24e222a530526aab94ed4ed22cfedf9a',
'99d4a530c13b03a98cd143f341394354',
'b3cfac5362b3bfb70d1471932f120fa5',
'3d538df4ca389d372347f7b53d67269f',
'893e62d6fbdc4580de7e3e802aec9108',
'a50134133db91e46c8434ad0ebff22c7',
'a95d7d9111bc13a8b73a11ee1e4ff92a',
'3f78dcc732a7a8ba6d959dcf6007b225',
......@@ -275,6 +277,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: '893e62d6fbdc4580de7e3e802aec9108',
viewmodule: 'Base',
viewname: 'TaskQuickCreate',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: '8b173077897bf865fe035e56073b763d',
viewmodule: 'Ungroup',
......@@ -393,6 +404,15 @@ export const viewstate: any = {
refviews: [
],
},
{
viewtag: 'aa79d35850f36fbc1a5085353ecd5af5',
viewmodule: 'Base',
viewname: 'AppointmentQuickCreate',
viewaction: '',
viewdatachange: false,
refviews: [
],
},
{
viewtag: 'ad6abf83dc1bc466b988194cd868d98a',
viewmodule: 'Sales',
......@@ -428,10 +448,12 @@ export const viewstate: any = {
viewaction: '',
viewdatachange: false,
refviews: [
'aa79d35850f36fbc1a5085353ecd5af5',
'24e222a530526aab94ed4ed22cfedf9a',
'99d4a530c13b03a98cd143f341394354',
'b3cfac5362b3bfb70d1471932f120fa5',
'3d538df4ca389d372347f7b53d67269f',
'893e62d6fbdc4580de7e3e802aec9108',
'a50134133db91e46c8434ad0ebff22c7',
'a95d7d9111bc13a8b73a11ee1e4ff92a',
'3f78dcc732a7a8ba6d959dcf6007b225',
......
......@@ -80,6 +80,7 @@ export default class AppointmentUIServiceBase extends UIService {
*/
public initViewMap(){
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'appointments'});
this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'appointments'});
}
/**
......@@ -141,10 +142,10 @@ export default class AppointmentUIServiceBase extends UIService {
});
}
const view: any = {
viewname: 'appointment-edit-view',
viewname: 'appointment-quick-create',
height: 0,
width: 450,
title: actionContext.$t('entities.appointment.views.editview.title'),
title: actionContext.$t('entities.appointment.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
......
......@@ -79,6 +79,7 @@ export default class TaskUIServiceBase extends UIService {
* @memberof TaskUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'tasks'});
this.allViewMap.set('EDITVIEW:',{viewname:'editview',srfappde:'tasks'});
}
......@@ -141,10 +142,10 @@ export default class TaskUIServiceBase extends UIService {
});
}
const view: any = {
viewname: 'task-edit-view',
viewname: 'task-quick-create',
height: 0,
width: 450,
title: actionContext.$t('entities.task.views.editview.title'),
title: actionContext.$t('entities.task.views.quickcreate.title'),
placement: 'DRAWER_RIGHT',
};
openDrawer(view, data);
......
/**
* QuickCreate 部件模型
*
* @export
* @class QuickCreateModel
*/
export default class QuickCreateModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof QuickCreateModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'activityid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'subject',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'subject',
prop: 'subject',
dataType: 'TEXT',
},
{
name: 'activityid',
prop: 'activityid',
dataType: 'GUID',
},
{
name: 'appointment',
prop: 'activityid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import QuickCreateBase from './quick-create-form-base.vue';
@Component({
components: {
}
})
export default class QuickCreate extends QuickCreateBase {
}
</script>
\ No newline at end of file
/**
* QuickCreate 部件模型
*
* @export
* @class QuickCreateModel
*/
export default class QuickCreateModel {
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof QuickCreateModel
*/
public getDataItems(): any[] {
return [
{
name: 'srfwfmemo',
prop: 'srfwfmemo',
dataType: 'TEXT',
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'srfupdatedate',
prop: 'updatedate',
dataType: 'DATETIME',
},
{
name: 'srforikey',
},
{
name: 'srfkey',
prop: 'activityid',
dataType: 'GUID',
},
{
name: 'srfmajortext',
prop: 'subject',
dataType: 'TEXT',
},
{
name: 'srftempmode',
},
{
name: 'srfuf',
},
{
name: 'srfdeid',
},
{
name: 'srfsourcekey',
},
{
name: 'subject',
prop: 'subject',
dataType: 'TEXT',
},
{
name: 'ownerid',
prop: 'ownerid',
dataType: 'TEXT',
},
{
name: 'owneridtype',
prop: 'owneridtype',
dataType: 'TEXT',
},
{
name: 'owneridyominame',
prop: 'owneridyominame',
dataType: 'TEXT',
},
{
name: 'regardingobjectid',
prop: 'regardingobjectid',
dataType: 'TEXT',
},
{
name: 'regardingobjectidyominame',
prop: 'regardingobjectidyominame',
dataType: 'TEXT',
},
{
name: 'regardingobjecttypecode',
prop: 'regardingobjecttypecode',
dataType: 'TEXT',
},
{
name: 'activityid',
prop: 'activityid',
dataType: 'GUID',
},
{
name: 'task',
prop: 'activityid',
dataType: 'FONTKEY',
},
]
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import QuickCreateBase from './quick-create-form-base.vue';
@Component({
components: {
}
})
export default class QuickCreate extends QuickCreateBase {
}
</script>
\ No newline at end of file
......@@ -54,6 +54,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
@Lazy
private cn.ibizlab.businesscentral.core.base.service.ITransactionCurrencyService transactioncurrencyService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.base.service.logic.ITaskDraftByParentLogic draftbyparentLogic;
private int batchSize = 500;
@Override
......
package cn.ibizlab.businesscentral.core.base.service.logic;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import cn.ibizlab.businesscentral.core.base.domain.Task;
/**
* 关系型数据实体[DraftByParent] 对象
*/
public interface ITaskDraftByParentLogic {
void execute(Task task ) ;
}
package cn.ibizlab.businesscentral.core.base.service.logic.impl;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.KieContainer;
import cn.ibizlab.businesscentral.core.base.service.logic.ITaskDraftByParentLogic;
import cn.ibizlab.businesscentral.core.base.domain.Task;
/**
* 关系型数据实体[DraftByParent] 对象
*/
@Slf4j
@Service
public class TaskDraftByParentLogicImpl implements ITaskDraftByParentLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.base.service.ITaskService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.base.service.ITaskService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Task et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("taskdraftbyparentdefault",et);
kieSession.setGlobal("iBzSysTaskDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.base.service.logic.taskdraftbyparent");
}catch(Exception e){
throw new RuntimeException("执行[根据父获取草稿]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
......@@ -1418,7 +1418,7 @@
<!--输出实体[APPOINTMENT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-appointment-6-20">
<changeSet author="a_LAB01_e85d8801c" id="tab-appointment-13-20">
<createTable tableName="APPOINTMENT">
<column name="IMPORTSEQUENCENUMBER" remarks="" type="INT">
</column>
......@@ -2610,7 +2610,7 @@
<!--输出实体[TASK]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-task-6-34">
<changeSet author="a_LAB01_e85d8801c" id="tab-task-28-34">
<createTable tableName="TASK">
<column name="WORKFLOWCREATED" remarks="" type="INT">
</column>
......@@ -5216,7 +5216,7 @@
<!--输出实体[EMAIL]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-email-7-58">
<changeSet author="a_LAB01_e85d8801c" id="tab-email-8-58">
<createTable tableName="EMAIL">
<column name="MIMETYPE" remarks="" type="VARCHAR(256)">
</column>
......@@ -8998,7 +8998,7 @@
<!--输出实体[ACTIVITYPOINTER]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-activitypointer-48-95">
<changeSet author="a_LAB01_e85d8801c" id="tab-activitypointer-52-95">
<createTable tableName="ACTIVITYPOINTER">
<column name="SERIESID" remarks="" type="VARCHAR(60)">
</column>
......@@ -10804,13 +10804,13 @@
<addForeignKeyConstraint baseColumnNames="UOMID" baseTableName="PRODUCTPRICELEVEL" constraintName="DER1N_PRODUCTPRICELEVEL__UOM__" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="UOMID" referencedTableName="UOM" validate="true"/>
</changeSet>
<!--输出实体[APPOINTMENT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-appointment-6-152">
<changeSet author="a_LAB01_e85d8801c" id="fk-appointment-13-152">
<addForeignKeyConstraint baseColumnNames="SERVICEID" baseTableName="APPOINTMENT" constraintName="DER1N_APPOINTMENT__SERVICE__SE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-appointment-6-153">
<changeSet author="a_LAB01_e85d8801c" id="fk-appointment-13-153">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="APPOINTMENT" constraintName="DER1N_APPOINTMENT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-appointment-6-154">
<changeSet author="a_LAB01_e85d8801c" id="fk-appointment-13-154">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="APPOINTMENT" constraintName="DER1N_APPOINTMENT__TRANSACTION" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[TIMEZONELOCALIZEDNAME]外键关系 -->
......@@ -10908,13 +10908,13 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="INVOICE" constraintName="DER1N_INVOICE__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[TASK]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-task-6-186">
<changeSet author="a_LAB01_e85d8801c" id="fk-task-28-186">
<addForeignKeyConstraint baseColumnNames="SERVICEID" baseTableName="TASK" constraintName="DER1N_TASK__SERVICE__SERVICEID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-task-6-187">
<changeSet author="a_LAB01_e85d8801c" id="fk-task-28-187">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="TASK" constraintName="DER1N_TASK__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-task-6-188">
<changeSet author="a_LAB01_e85d8801c" id="fk-task-28-188">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="TASK" constraintName="DER1N_TASK__TRANSACTIONCURRENC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[UOM]外键关系 -->
......@@ -11130,19 +11130,19 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ENTITLEMENTTEMPLATE" constraintName="DER1N_ENTITLEMENTTEMPLATE__TRA" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[EMAIL]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-email-7-263">
<changeSet author="a_LAB01_e85d8801c" id="fk-email-8-263">
<addForeignKeyConstraint baseColumnNames="PARENTACTIVITYID" baseTableName="EMAIL" constraintName="DER1N_EMAIL__EMAIL__PARENTACTI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACTIVITYID" referencedTableName="EMAIL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-email-7-264">
<changeSet author="a_LAB01_e85d8801c" id="fk-email-8-264">
<addForeignKeyConstraint baseColumnNames="SERVICEID" baseTableName="EMAIL" constraintName="DER1N_EMAIL__SERVICE__SERVICEI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-email-7-265">
<changeSet author="a_LAB01_e85d8801c" id="fk-email-8-265">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="EMAIL" constraintName="DER1N_EMAIL__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-email-7-266">
<changeSet author="a_LAB01_e85d8801c" id="fk-email-8-266">
<addForeignKeyConstraint baseColumnNames="TEMPLATEID" baseTableName="EMAIL" constraintName="DER1N_EMAIL__TEMPLATE__TEMPLAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TEMPLATEID" referencedTableName="TEMPLATE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-email-7-267">
<changeSet author="a_LAB01_e85d8801c" id="fk-email-8-267">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="EMAIL" constraintName="DER1N_EMAIL__TRANSACTIONCURREN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[KNOWLEDGEARTICLEINCIDENT]外键关系 -->
......@@ -11434,13 +11434,13 @@
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="PRODUCTSUBSTITUTE" constraintName="DER1N_PRODUCTSUBSTITUTE__TRANS" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYPOINTER]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-48-363">
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-52-363">
<addForeignKeyConstraint baseColumnNames="SERVICEID" baseTableName="ACTIVITYPOINTER" constraintName="DER1N_ACTIVITYPOINTER__SERVICE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-48-364">
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-52-364">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="ACTIVITYPOINTER" constraintName="DER1N_ACTIVITYPOINTER__SLA__SL" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-48-365">
<changeSet author="a_LAB01_e85d8801c" id="fk-activitypointer-52-365">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ACTIVITYPOINTER" constraintName="DER1N_ACTIVITYPOINTER__TRANSAC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[BULKDELETEFAILURE]外键关系 -->
......
......@@ -8,7 +8,7 @@
"delogicname":"任务",
"sysmoudle":{"id":"BASE","name":"Base"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"DraftByParent" , "name":"DraftByParent" , "type":"DELOGIC" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
......
package cn.ibizlab.businesscentral.base.logic.tasklogic.draftbyparent;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.base.domain.Task taskdraftbyparentdefault;
global cn.ibizlab.businesscentral.core.base.service.ITaskService iBzSysTaskDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[获取父数据]
rule "prepareparam1"
ruleflow-group "taskdraftbyparentprepareparam1"
when
then
update(taskdraftbyparentdefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "taskdraftbyparentbegin"
when
then
end
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:g="http://www.jboss.org/drools/flow/gpd" xmlns:tns="http://www.jboss.org/drools" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.mvel.org/2.0" id="Definition" name="" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
<process id="cn.ibizlab.businesscentral.core.base.service.logic.taskdraftbyparent" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.base.service.logic.taskdraftbyparent">
<extensionElements>
<tns:import name="java.util.Map" />
<tns:import name="org.springframework.util.StringUtils"/>
<tns:import name="cn.ibizlab.businesscentral.util.helper.RuleUtils"/>
<tns:global identifier="taskdraftbyparentdefault" type="cn.ibizlab.businesscentral.core.base.domain.Task" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="taskdraftbyparentprepareparam1" id="792DF49A-6F1E-493C-92C6-2C120116ACA9" implementation="http://www.jboss.org/drools/rule" name="获取父数据"/>
<endEvent id="792DF49A-6F1E-493C-92C6-2C120116ACA9_End" name="End"/>
<sequenceFlow id="792DF49A-6F1E-493C-92C6-2C120116ACA9_End_Line" sourceRef="792DF49A-6F1E-493C-92C6-2C120116ACA9" targetRef="792DF49A-6F1E-493C-92C6-2C120116ACA9_End"/>
<startEvent id="353407EB-4915-406A-90B8-E6CAB8338687" isInterrupting="true"/>
<sequenceFlow id="3B39E324-D783-44B5-A019-38D48E458FA3" sourceRef="353407EB-4915-406A-90B8-E6CAB8338687" targetRef="792DF49A-6F1E-493C-92C6-2C120116ACA9">
</sequenceFlow>
</process>
</definitions>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册