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

xignzi006 发布系统代码

上级 8fa3fa17
......@@ -139,6 +139,16 @@
"viewtag": "0dff48c04927315f77dd70a9a2767b59",
"memo": "系统自动添加"
},
"contacttabexpview": {
"title": "联系人状态分页视图",
"caption": "联系人",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Base",
"viewname": "ContactTabExpView",
"viewfilename": "contact-tab-exp-view",
"viewtag": "0e4d8b949764a2c40c2b93261aed6fd8",
"memo": ""
},
"quotedetaileditview": {
"title": "报价单产品编辑视图",
"caption": "报价单产品",
......@@ -919,6 +929,16 @@
"viewtag": "631a4276161c551802f3aaf4bd7e607c",
"memo": ""
},
"contactstopgridview": {
"title": "联系人信息",
"caption": "联系人信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Base",
"viewname": "ContactStopGridView",
"viewfilename": "contact-stop-grid-view",
"viewtag": "64d89dce67b0136bef31d6ff25eeb89a",
"memo": "系统自动添加"
},
"campaignlistgridview": {
"title": "市场活动-营销列表表格视图",
"caption": "市场活动-营销列表",
......
......@@ -217,6 +217,10 @@ export default {
caption: "市场营销信息",
title: "联系人选项操作视图",
},
tabexpview: {
caption: "联系人",
title: "联系人状态分页视图",
},
info_person: {
caption: "联系人",
title: "联系人编辑视图",
......@@ -237,6 +241,10 @@ export default {
caption: "联系人",
title: "联系人数据看板视图",
},
stopgridview: {
caption: "联系人信息",
title: "联系人信息",
},
editaddress: {
caption: "地址信息",
title: "联系人选项操作视图",
......@@ -699,6 +707,106 @@ export default {
tip: "Filter",
},
},
stopgridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
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: "",
},
tbitem14_active: {
caption: "激活",
tip: "激活",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
usablegridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
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: "",
},
tbitem14_inactive: {
caption: "停用",
tip: "停用",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
......
......@@ -216,6 +216,10 @@ export default {
caption: "市场营销信息",
title: "联系人选项操作视图",
},
tabexpview: {
caption: "联系人",
title: "联系人状态分页视图",
},
info_person: {
caption: "联系人",
title: "联系人编辑视图",
......@@ -236,6 +240,10 @@ export default {
caption: "联系人",
title: "联系人数据看板视图",
},
stopgridview: {
caption: "联系人信息",
title: "联系人信息",
},
editaddress: {
caption: "地址信息",
title: "联系人选项操作视图",
......@@ -698,6 +706,106 @@ export default {
tip: "过滤",
},
},
stopgridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem14_active: {
caption: "激活",
tip: "激活",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
usablegridviewtoolbar_toolbar: {
tbitem1_openquickcreateview: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem14_inactive: {
caption: "停用",
tip: "停用",
},
tbitem15: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
......
......@@ -776,6 +776,184 @@ mock.onGet(new RegExp(/^\/contacts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
return [status, records ? records : []];
});
// FetchStop
mock.onGet(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/fetchstop$/)).reply((config: any) => {
console.groupCollapsed("实体:contact 方法: FetchStop");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['accountid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/fetchstop$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchStop
mock.onGet(new RegExp(/^\/contacts\/fetchstop$/)).reply((config: any) => {
console.groupCollapsed("实体:contact 方法: FetchStop");
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 : []];
});
// FetchStop
mock.onGet(new RegExp(/^\/contacts\/fetchstop(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:contact 方法: FetchStop");
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 : []];
});
// FetchUsable
mock.onGet(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/fetchusable$/)).reply((config: any) => {
console.groupCollapsed("实体:contact 方法: FetchUsable");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['accountid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/fetchusable$/).exec(config.url);
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
if (items.length > 0 && paramArray.length > 0) {
paramArray.forEach((paramkey: any) => {
if (tempValue[paramkey] && tempValue[paramkey].indexOf(";") > 0) {
let keysGrounp: Array<any> = tempValue[paramkey].split(new RegExp(/[\;]/));
let tempArray: Array<any> = [];
keysGrounp.forEach((singlekey: any) => {
let _items = items.filter((item: any) => { return item[paramkey] == singlekey });
if(_items.length >0){
tempArray.push(..._items);
}
})
items = tempArray;
} else {
items = items.filter((item: any) => { return item[paramkey] == tempValue[paramkey] });
}
})
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(items);
console.groupEnd();
console.groupEnd();
return [status, items];
});
// FetchUsable
mock.onGet(new RegExp(/^\/contacts\/fetchusable$/)).reply((config: any) => {
console.groupCollapsed("实体:contact 方法: FetchUsable");
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 : []];
});
// FetchUsable
mock.onGet(new RegExp(/^\/contacts\/fetchusable(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:contact 方法: FetchUsable");
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参数传递情况未实现
......
......@@ -119,6 +119,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "EntitlementPickupView",
"viewtag": "0dff48c04927315f77dd70a9a2767b59"
},
"contacttabexpview": {
"title": "联系人状态分页视图",
"caption": "联系人",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Base",
"viewname": "ContactTabExpView",
"viewtag": "0e4d8b949764a2c40c2b93261aed6fd8"
},
"quotedetaileditview": {
"title": "报价单产品编辑视图",
"caption": "报价单产品",
......@@ -743,6 +751,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "GoalGridView",
"viewtag": "631a4276161c551802f3aaf4bd7e607c"
},
"contactstopgridview": {
"title": "联系人信息",
"caption": "联系人信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Base",
"viewname": "ContactStopGridView",
"viewtag": "64d89dce67b0136bef31d6ff25eeb89a"
},
"campaignlistgridview": {
"title": "市场活动-营销列表表格视图",
"caption": "市场活动-营销列表",
......
<studio-view-style2 viewName="contactgridview" viewTitle="联系人信息" class='degridview contact-grid-view'>
<template slot='title'>
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</template>
<i-input slot="quickSearch" v-show="!isExpandSearchForm" v-model="query" search @on-search="onSearch($event)"/>
<template slot="toolbar">
<view-toolbar mode="STYLE2" :model="toolBarModels" @item-click="toolbar_click($event)"/> </template>
......
import AccountService from '@/service/account/account-service';
import { Verify } from '@/utils/verify/verify';
/**
* 激活
*
* @export
* @class ActiveLogicBase
*/
export default class ActiveLogicBase {
/**
* 名称
*
* @memberof ActiveLogicBase
*/
private name:string ="Active";
/**
* 唯一标识
*
* @memberof ActiveLogicBase
*/
private id:string = "7B4AA729-6972-48F1-933C-1FC7B9D3EC89";
/**
* 默认参数名称
*
* @memberof ActiveLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof ActiveLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of ActiveLogicBase.
*
* @param {*} [opts={}]
* @memberof ActiveLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof ActiveLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(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 executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('Default');
const targetService:AccountService = new AccountService();
if (targetService['Update'] && targetService['Update'] instanceof Function) {
result = await targetService['Update'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(actionParam.data,result.data);
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);
}
}
/**
* 准备参数
*
* @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:{};
Object.assign(tempDstParam0Data,{statuscode:"1"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute1Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import ActiveLogicBase from './active-logic-base';
/**
* 激活
*
* @export
* @class ActiveLogic
*/
export default class ActiveLogic extends ActiveLogicBase{
/**
* Creates an instance of ActiveLogic
*
* @param {*} [opts={}]
* @memberof ActiveLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
import ActiveLogic from '@/service/contact/active-logic';
import InactiveLogic from '@/service/contact/inactive-logic';
......@@ -380,61 +382,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Active(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/active`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
return Http.getInstance().post(`/contacts/${context.contact}/active`,data,isloading);
let appLogic:ActiveLogic = new ActiveLogic({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};
}
/**
......@@ -581,61 +531,9 @@ export default class ContactServiceBase extends EntityService {
* @memberof ContactServiceBase
*/
public async Inactive(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact){
let masterData:any = {};
let leadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leads'),'undefined')){
leadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leads') as any);
if(leadsData && leadsData.length && leadsData.length > 0){
leadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.leadid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leads = leadsData;
let opportunitiesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_opportunities'),'undefined')){
opportunitiesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_opportunities') as any);
if(opportunitiesData && opportunitiesData.length && opportunitiesData.length > 0){
opportunitiesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.opportunityid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.opportunities = opportunitiesData;
let listcontactsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts'),'undefined')){
listcontactsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listcontacts') as any);
if(listcontactsData && listcontactsData.length && listcontactsData.length > 0){
listcontactsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/inactive`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_opportunities',JSON.stringify(res.data.opportunities));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
return Http.getInstance().post(`/contacts/${context.contact}/inactive`,data,isloading);
let appLogic:InactiveLogic = new InactiveLogic({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};
}
/**
......@@ -840,4 +738,40 @@ export default class ContactServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/fetchdefault`,tempData,isloading);
}
/**
* FetchStop接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ContactServiceBase
*/
public async FetchStop(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/fetchstop`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/fetchstop`,tempData,isloading);
}
/**
* FetchUsable接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ContactServiceBase
*/
public async FetchUsable(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/fetchusable`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/fetchusable`,tempData,isloading);
}
}
\ No newline at end of file
import ContactService from '@/service/contact/contact-service';
import { Verify } from '@/utils/verify/verify';
/**
* 停用
*
* @export
* @class InactiveLogicBase
*/
export default class InactiveLogicBase {
/**
* 名称
*
* @memberof InactiveLogicBase
*/
private name:string ="Inactive";
/**
* 唯一标识
*
* @memberof InactiveLogicBase
*/
private id:string = "099C8D9A-D098-439E-9917-5BFDC26C95D6";
/**
* 默认参数名称
*
* @memberof InactiveLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof InactiveLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of InactiveLogicBase.
*
* @param {*} [opts={}]
* @memberof InactiveLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof InactiveLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(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 executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('Default');
const targetService:ContactService = new ContactService();
if (targetService['Update'] && targetService['Update'] instanceof Function) {
result = await targetService['Update'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(actionParam.data,result.data);
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);
}
}
/**
* 准备参数
*
* @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:{};
Object.assign(tempDstParam0Data,{statuscode:"2"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute1Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import InactiveLogicBase from './inactive-logic-base';
/**
* 停用
*
* @export
* @class InactiveLogic
*/
export default class InactiveLogic extends InactiveLogicBase{
/**
* Creates an instance of InactiveLogic
*
* @param {*} [opts={}]
* @memberof InactiveLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import LeadService from '@/service/lead/lead-service';
import { Verify } from '@/utils/verify/verify';
/**
* 取消
*
* @export
* @class CancelLogicBase
*/
export default class CancelLogicBase {
/**
* 名称
*
* @memberof CancelLogicBase
*/
private name:string ="Cancel";
/**
* 唯一标识
*
* @memberof CancelLogicBase
*/
private id:string = "E7A13186-E375-4465-9C43-97EE1E9B3F7E";
/**
* 默认参数名称
*
* @memberof CancelLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof CancelLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of CancelLogicBase.
*
* @param {*} [opts={}]
* @memberof CancelLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof CancelLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(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 executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('Default');
const targetService:LeadService = new LeadService();
if (targetService['Update'] && targetService['Update'] instanceof Function) {
result = await targetService['Update'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(actionParam.data,result.data);
return this.paramsMap.get(this.defaultParamName).data;
}
}
/**
* 准备参数
*
* @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:{};
Object.assign(tempDstParam0Data,{statuscode:"7"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute0Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
/**
* 开始
*
* @param params 传入参数
*/
private async executeBegin(context:any,params:any,isloading:boolean){
//开始节点
if(this.compute1Cond(params)){
return this.executePrepareparam1(context,params,isloading);
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import CancelLogicBase from './cancel-logic-base';
/**
* 取消
*
* @export
* @class CancelLogic
*/
export default class CancelLogic extends CancelLogicBase{
/**
* Creates an instance of CancelLogic
*
* @param {*} [opts={}]
* @memberof CancelLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
import CancelLogic from '@/service/lead/cancel-logic';
import LostOrderLogic from '@/service/lead/lost-order-logic';
import NoInterestedLogic from '@/service/lead/no-interested-logic';
import UnableLogic from '@/service/lead/unable-logic';
......@@ -528,6 +532,21 @@ export default class LeadServiceBase extends EntityService {
return Http.getInstance().post(`/leads/${context.lead}/addlist`,data,isloading);
}
/**
* Cancel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof LeadServiceBase
*/
public async Cancel(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let appLogic:CancelLogic = new CancelLogic({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};
}
/**
* CheckKey接口方法
*
......@@ -686,6 +705,36 @@ export default class LeadServiceBase extends EntityService {
return Http.getInstance().post(`/leads/${context.lead}/disqualification`,data,isloading);
}
/**
* LostOrder接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof LeadServiceBase
*/
public async LostOrder(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let appLogic:LostOrderLogic = new LostOrderLogic({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};
}
/**
* NoInterested接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof LeadServiceBase
*/
public async NoInterested(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let appLogic:NoInterestedLogic = new NoInterestedLogic({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};
}
/**
* Qualification接口方法
*
......@@ -863,6 +912,21 @@ export default class LeadServiceBase extends EntityService {
return res;
}
/**
* Unable接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof LeadServiceBase
*/
public async Unable(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let appLogic:UnableLogic = new UnableLogic({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};
}
/**
* FetchDefault接口方法
*
......@@ -888,4 +952,30 @@ export default class LeadServiceBase extends EntityService {
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/leads/fetchdefault`,tempData,isloading);
}
/**
* FetchOn接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof LeadServiceBase
*/
public async FetchOn(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/accounts/${context.account}/contacts/${context.contact}/leads/fetchon`,tempData,isloading);
}
if(context.contact && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/contacts/${context.contact}/leads/fetchon`,tempData,isloading);
}
if(context.campaign && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/campaigns/${context.campaign}/leads/fetchon`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/leads/fetchon`,tempData,isloading);
}
}
\ No newline at end of file
import LeadService from '@/service/lead/lead-service';
import { Verify } from '@/utils/verify/verify';
/**
* 丢单
*
* @export
* @class LostOrderLogicBase
*/
export default class LostOrderLogicBase {
/**
* 名称
*
* @memberof LostOrderLogicBase
*/
private name:string ="LostOrder";
/**
* 唯一标识
*
* @memberof LostOrderLogicBase
*/
private id:string = "63185870-51D3-44A6-9AF3-597939AAD2A1";
/**
* 默认参数名称
*
* @memberof LostOrderLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof LostOrderLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of LostOrderLogicBase.
*
* @param {*} [opts={}]
* @memberof LostOrderLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof LostOrderLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(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:{};
Object.assign(tempDstParam0Data,{statuscode:"4"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute1Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
/**
* 开始
*
* @param params 传入参数
*/
private async executeBegin(context:any,params:any,isloading:boolean){
//开始节点
if(this.compute0Cond(params)){
return this.executePrepareparam1(context,params,isloading);
}
}
/**
* 更新潜在顾客状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private async executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('Default');
const targetService:LeadService = new LeadService();
if (targetService['Update'] && targetService['Update'] instanceof Function) {
result = await targetService['Update'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(actionParam.data,result.data);
return this.paramsMap.get(this.defaultParamName).data;
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import LostOrderLogicBase from './lost-order-logic-base';
/**
* 丢单
*
* @export
* @class LostOrderLogic
*/
export default class LostOrderLogic extends LostOrderLogicBase{
/**
* Creates an instance of LostOrderLogic
*
* @param {*} [opts={}]
* @memberof LostOrderLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import LeadService from '@/service/lead/lead-service';
import { Verify } from '@/utils/verify/verify';
/**
* 不再感兴趣
*
* @export
* @class NoInterestedLogicBase
*/
export default class NoInterestedLogicBase {
/**
* 名称
*
* @memberof NoInterestedLogicBase
*/
private name:string ="NoInterested";
/**
* 唯一标识
*
* @memberof NoInterestedLogicBase
*/
private id:string = "BB624316-E550-4F56-8252-1F6CFB971A30";
/**
* 默认参数名称
*
* @memberof NoInterestedLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof NoInterestedLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of NoInterestedLogicBase.
*
* @param {*} [opts={}]
* @memberof NoInterestedLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof NoInterestedLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(params:any):boolean{
return true;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public onExecute(context:any,params:any,isloading:boolean){
return this.executeBegin(context,params,isloading);
}
/**
* 开始
*
* @param params 传入参数
*/
private async executeBegin(context:any,params:any,isloading:boolean){
//开始节点
if(this.compute1Cond(params)){
return this.executePrepareparam1(context,params,isloading);
}
}
/**
* 更新潜在顾客状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private async executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('Default');
const targetService:LeadService = new LeadService();
if (targetService['Update'] && targetService['Update'] instanceof Function) {
result = await targetService['Update'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(actionParam.data,result.data);
return this.paramsMap.get(this.defaultParamName).data;
}
}
/**
* 准备参数
*
* @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:{};
Object.assign(tempDstParam0Data,{statuscode:"6"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute0Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import NoInterestedLogicBase from './no-interested-logic-base';
/**
* 不再感兴趣
*
* @export
* @class NoInterestedLogic
*/
export default class NoInterestedLogic extends NoInterestedLogicBase{
/**
* Creates an instance of NoInterestedLogic
*
* @param {*} [opts={}]
* @memberof NoInterestedLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import LeadService from '@/service/lead/lead-service';
import { Verify } from '@/utils/verify/verify';
/**
* 无法联系
*
* @export
* @class UnableLogicBase
*/
export default class UnableLogicBase {
/**
* 名称
*
* @memberof UnableLogicBase
*/
private name:string ="Unable";
/**
* 唯一标识
*
* @memberof UnableLogicBase
*/
private id:string = "72A13FF7-8B2B-4BBC-B297-7E09A766E0E4";
/**
* 默认参数名称
*
* @memberof UnableLogicBase
*/
private defaultParamName:string = "Default";
/**
* 参数集合
*
* @memberof UnableLogicBase
*/
private paramsMap:Map<string,any> = new Map();
/**
* Creates an instance of UnableLogicBase.
*
* @param {*} [opts={}]
* @memberof UnableLogicBase
*/
constructor(opts: any = {}) {
this.initParams(opts);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof UnableLogicBase
*/
public initParams(opts:any){
this.paramsMap.set('Default',opts);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(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 executeDeaction1(context:any,params:any,isloading:boolean){
// 行为处理节点
let result: any;
let actionParam:any = this.paramsMap.get('Default');
const targetService:LeadService = new LeadService();
if (targetService['Update'] && targetService['Update'] instanceof Function) {
result = await targetService['Update'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(actionParam.data,result.data);
return this.paramsMap.get(this.defaultParamName).data;
}
}
/**
* 准备参数
*
* @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:{};
Object.assign(tempDstParam0Data,{statuscode:"5"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute1Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
/**
* 开始
*
* @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 UnableLogicBase from './unable-logic-base';
/**
* 无法联系
*
* @export
* @class UnableLogic
*/
export default class UnableLogic extends UnableLogicBase{
/**
* Creates an instance of UnableLogic
*
* @param {*} [opts={}]
* @memberof UnableLogic
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
......@@ -82,11 +82,13 @@ export default class ContactUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'editabstract',srfappde:'contacts'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'editmarket',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'tabexpview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'info_person',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'info_book',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'info_abstract',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'info_market',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'summaryview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'stopgridview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'editaddress',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'pickupgridview',srfappde:'contacts'});
this.allViewMap.set(':',{viewname:'byaccount',srfappde:'contacts'});
......
......@@ -20,6 +20,8 @@ import com.alibaba.fastjson.JSONObject;
public interface ContactMapper extends BaseMapper<Contact>{
Page<Contact> searchDefault(IPage page, @Param("srf") ContactSearchContext context, @Param("ew") Wrapper<Contact> wrapper) ;
Page<Contact> searchStop(IPage page, @Param("srf") ContactSearchContext context, @Param("ew") Wrapper<Contact> wrapper) ;
Page<Contact> searchUsable(IPage page, @Param("srf") ContactSearchContext context, @Param("ew") Wrapper<Contact> wrapper) ;
@Override
Contact selectById(Serializable id);
@Override
......
......@@ -41,6 +41,8 @@ public interface IContactService extends IService<Contact>{
void saveBatch(List<Contact> list) ;
Contact setPrimary(Contact et) ;
Page<Contact> searchDefault(ContactSearchContext context) ;
Page<Contact> searchStop(ContactSearchContext context) ;
Page<Contact> searchUsable(ContactSearchContext context) ;
List<Contact> selectByCustomerid(String accountid) ;
void removeByCustomerid(String accountid) ;
List<Contact> selectByPreferredequipmentid(String equipmentid) ;
......
......@@ -81,6 +81,14 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
@Lazy
protected cn.ibizlab.businesscentral.core.base.service.ITransactionCurrencyService transactioncurrencyService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.base.service.logic.IContactActiveLogic activeLogic;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.base.service.logic.IContactInactiveLogic inactiveLogic;
protected int batchSize = 500;
@Override
......@@ -149,8 +157,8 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
@Override
@Transactional
public Contact active(Contact et) {
//自定义代码
return et;
activeLogic.execute(et);
return et ;
}
@Override
......@@ -167,8 +175,8 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
@Override
@Transactional
public Contact inactive(Contact et) {
//自定义代码
return et;
inactiveLogic.execute(et);
return et ;
}
@Override
......@@ -292,6 +300,24 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
return new PageImpl<Contact>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 停用联系人
*/
@Override
public Page<Contact> searchStop(ContactSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Contact> pages=baseMapper.searchStop(context.getPages(),context,context.getSelectCond());
return new PageImpl<Contact>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 可用联系人
*/
@Override
public Page<Contact> searchUsable(ContactSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Contact> pages=baseMapper.searchUsable(context.getPages(),context,context.getSelectCond());
return new PageImpl<Contact>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
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.Contact;
/**
* 关系型数据实体[Active] 对象
*/
public interface IContactActiveLogic {
void execute(Contact contact ) ;
}
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.Contact;
/**
* 关系型数据实体[Inactive] 对象
*/
public interface IContactInactiveLogic {
void execute(Contact contact ) ;
}
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.IContactActiveLogic;
import cn.ibizlab.businesscentral.core.base.domain.Contact;
/**
* 关系型数据实体[Active] 对象
*/
@Slf4j
@Service
public class ContactActiveLogicImpl implements IContactActiveLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IAccountService accountservice;
public cn.ibizlab.businesscentral.core.base.service.IAccountService getAccountService() {
return this.accountservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IContactService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.base.service.IContactService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Contact et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("contactactivedefault",et);
kieSession.setGlobal("accountservice",accountservice);
kieSession.setGlobal("iBzSysContactDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.base.service.logic.contactactive");
}catch(Exception e){
throw new RuntimeException("执行[激活]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
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.IContactInactiveLogic;
import cn.ibizlab.businesscentral.core.base.domain.Contact;
/**
* 关系型数据实体[Inactive] 对象
*/
@Slf4j
@Service
public class ContactInactiveLogicImpl implements IContactInactiveLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IContactService contactservice;
public cn.ibizlab.businesscentral.core.base.service.IContactService getContactService() {
return this.contactservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.base.service.IContactService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.base.service.IContactService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Contact et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("contactinactivedefault",et);
kieSession.setGlobal("contactservice",contactservice);
kieSession.setGlobal("iBzSysContactDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.base.service.logic.contactinactive");
}catch(Exception e){
throw new RuntimeException("执行[停用]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
......@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public interface LeadMapper extends BaseMapper<Lead>{
Page<Lead> searchDefault(IPage page, @Param("srf") LeadSearchContext context, @Param("ew") Wrapper<Lead> wrapper) ;
Page<Lead> searchOn(IPage page, @Param("srf") LeadSearchContext context, @Param("ew") Wrapper<Lead> wrapper) ;
@Override
Lead selectById(Serializable id);
@Override
......
......@@ -35,12 +35,17 @@ public interface ILeadService extends IService<Lead>{
Lead getDraft(Lead et) ;
Lead active(Lead et) ;
Lead addList(Lead et) ;
Lead cancel(Lead et) ;
boolean checkKey(Lead et) ;
Lead disQualification(Lead et) ;
Lead lostOrder(Lead et) ;
Lead noInterested(Lead et) ;
Lead qualification(Lead et) ;
boolean save(Lead et) ;
void saveBatch(List<Lead> list) ;
Lead unable(Lead et) ;
Page<Lead> searchDefault(LeadSearchContext context) ;
Page<Lead> searchOn(LeadSearchContext context) ;
List<Lead> selectByParentaccountid(String accountid) ;
void removeByParentaccountid(String accountid) ;
List<Lead> selectByRelatedobjectid(String activityid) ;
......
......@@ -78,6 +78,22 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
@Lazy
protected cn.ibizlab.businesscentral.core.base.service.ITransactionCurrencyService transactioncurrencyService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.ILeadCancelLogic cancelLogic;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.ILeadLostOrderLogic lostorderLogic;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.ILeadNoInterestedLogic nointerestedLogic;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.ILeadUnableLogic unableLogic;
protected int batchSize = 500;
@Override
......@@ -157,6 +173,13 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
return et;
}
@Override
@Transactional
public Lead cancel(Lead et) {
cancelLogic.execute(et);
return et ;
}
@Override
public boolean checkKey(Lead et) {
return (!ObjectUtils.isEmpty(et.getLeadid()))&&(!Objects.isNull(this.getById(et.getLeadid())));
......@@ -168,6 +191,20 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
return et;
}
@Override
@Transactional
public Lead lostOrder(Lead et) {
lostorderLogic.execute(et);
return et ;
}
@Override
@Transactional
public Lead noInterested(Lead et) {
nointerestedLogic.execute(et);
return et ;
}
@Override
@Transactional
public Lead qualification(Lead et) {
......@@ -208,6 +245,13 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
saveOrUpdateBatch(list,batchSize);
}
@Override
@Transactional
public Lead unable(Lead et) {
unableLogic.execute(et);
return et ;
}
@Override
public List<Lead> selectByParentaccountid(String accountid) {
......@@ -299,6 +343,15 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
return new PageImpl<Lead>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 已开启潜在顾客
*/
@Override
public Page<Lead> searchOn(LeadSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Lead> pages=baseMapper.searchOn(context.getPages(),context,context.getSelectCond());
return new PageImpl<Lead>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
package cn.ibizlab.businesscentral.core.sales.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.sales.domain.Lead;
/**
* 关系型数据实体[Cancel] 对象
*/
public interface ILeadCancelLogic {
void execute(Lead lead ) ;
}
package cn.ibizlab.businesscentral.core.sales.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.sales.domain.Lead;
/**
* 关系型数据实体[LostOrder] 对象
*/
public interface ILeadLostOrderLogic {
void execute(Lead lead ) ;
}
package cn.ibizlab.businesscentral.core.sales.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.sales.domain.Lead;
/**
* 关系型数据实体[NoInterested] 对象
*/
public interface ILeadNoInterestedLogic {
void execute(Lead lead ) ;
}
package cn.ibizlab.businesscentral.core.sales.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.sales.domain.Lead;
/**
* 关系型数据实体[Unable] 对象
*/
public interface ILeadUnableLogic {
void execute(Lead lead ) ;
}
package cn.ibizlab.businesscentral.core.sales.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.sales.service.logic.ILeadCancelLogic;
import cn.ibizlab.businesscentral.core.sales.domain.Lead;
/**
* 关系型数据实体[Cancel] 对象
*/
@Slf4j
@Service
public class LeadCancelLogicImpl implements ILeadCancelLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getLeadService() {
return this.leadservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Lead et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("leadcanceldefault",et);
kieSession.setGlobal("leadservice",leadservice);
kieSession.setGlobal("iBzSysLeadDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.sales.service.logic.leadcancel");
}catch(Exception e){
throw new RuntimeException("执行[取消]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
package cn.ibizlab.businesscentral.core.sales.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.sales.service.logic.ILeadLostOrderLogic;
import cn.ibizlab.businesscentral.core.sales.domain.Lead;
/**
* 关系型数据实体[LostOrder] 对象
*/
@Slf4j
@Service
public class LeadLostOrderLogicImpl implements ILeadLostOrderLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getLeadService() {
return this.leadservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Lead et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("leadlostorderdefault",et);
kieSession.setGlobal("leadservice",leadservice);
kieSession.setGlobal("iBzSysLeadDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.sales.service.logic.leadlostorder");
}catch(Exception e){
throw new RuntimeException("执行[丢单]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
package cn.ibizlab.businesscentral.core.sales.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.sales.service.logic.ILeadNoInterestedLogic;
import cn.ibizlab.businesscentral.core.sales.domain.Lead;
/**
* 关系型数据实体[NoInterested] 对象
*/
@Slf4j
@Service
public class LeadNoInterestedLogicImpl implements ILeadNoInterestedLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getLeadService() {
return this.leadservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Lead et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("leadnointeresteddefault",et);
kieSession.setGlobal("leadservice",leadservice);
kieSession.setGlobal("iBzSysLeadDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.sales.service.logic.leadnointerested");
}catch(Exception e){
throw new RuntimeException("执行[不再感兴趣]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
package cn.ibizlab.businesscentral.core.sales.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.sales.service.logic.ILeadUnableLogic;
import cn.ibizlab.businesscentral.core.sales.domain.Lead;
/**
* 关系型数据实体[Unable] 对象
*/
@Slf4j
@Service
public class LeadUnableLogicImpl implements ILeadUnableLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getLeadService() {
return this.leadservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysDefaultService;
public cn.ibizlab.businesscentral.core.sales.service.ILeadService getIBzSysDefaultService() {
return this.iBzSysDefaultService;
}
public void execute(Lead et){
KieSession kieSession = null;
try{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("leadunabledefault",et);
kieSession.setGlobal("leadservice",leadservice);
kieSession.setGlobal("iBzSysLeadDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.sales.service.logic.leadunable");
}catch(Exception e){
throw new RuntimeException("执行[无法联系]处理逻辑发生异常"+e);
}finally {
if(kieSession!=null)
kieSession.destroy();
}
}
}
......@@ -127,8 +127,8 @@
"dename":"Lead",
"delogicname":"潜在顾客",
"sysmoudle":{"id":"SALES","name":"Sales"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"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":"Active" , "name":"重新激活" , "type":"USERCUSTOM" },{"id":"AddList" , "name":"添加到市场营销列表" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"DisQualification" , "name":"取消资格" , "type":"USERCUSTOM" },{"id":"Qualification" , "name":"授予资格" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"On" , "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":"Active" , "name":"重新激活" , "type":"USERCUSTOM" },{"id":"AddList" , "name":"添加到市场营销列表" , "type":"USERCUSTOM" },{"id":"Cancel" , "name":"取消" , "type":"DELOGIC" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"DisQualification" , "name":"取消资格" , "type":"USERCUSTOM" },{"id":"LostOrder" , "name":"丢单" , "type":"DELOGIC" },{"id":"NoInterested" , "name":"不再感兴趣" , "type":"DELOGIC" },{"id":"Qualification" , "name":"授予资格" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Unable" , "name":"无法联系" , "type":"DELOGIC" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
......@@ -343,8 +343,8 @@
"dename":"Contact",
"delogicname":"联系人",
"sysmoudle":{"id":"BASE","name":"Base"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"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":"Active" , "name":"激活" , "type":"USERCUSTOM" },{"id":"AddList" , "name":"添加到市场营销列表" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Inactive" , "name":"停用" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"SetPrimary" , "name":"SetPrimary" , "type":"USERCUSTOM" }],
"dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"Stop" , "name":"停用联系人"},{"id":"Usable" , "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":"Active" , "name":"激活" , "type":"DELOGIC" },{"id":"AddList" , "name":"添加到市场营销列表" , "type":"USERCUSTOM" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Inactive" , "name":"停用" , "type":"DELOGIC" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"SetPrimary" , "name":"SetPrimary" , "type":"USERCUSTOM" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
......
package cn.ibizlab.businesscentral.base.logic.contactlogic.active;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.base.domain.Contact contactactivedefault;
global cn.ibizlab.businesscentral.core.base.service.IAccountService accountservice;
global cn.ibizlab.businesscentral.core.base.service.IContactService iBzSysContactDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[更新联系人状态]
rule "deaction1"
ruleflow-group "contactactivedeaction1"
when
then
accountservice.update(contactactivedefault);
update(contactactivedefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "contactactivebegin"
when
then
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "contactactiveprepareparam1"
when
then
contactactivedefault.set("statuscode","1");
update(contactactivedefault);//更新fact中变量值
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.contactactive" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.base.service.logic.contactactive">
<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="contactactivedefault" type="cn.ibizlab.businesscentral.core.base.domain.Contact" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="contactactivedeaction1" id="F830E301-B2A3-4F0D-84D5-35F3CB0BEE99" implementation="http://www.jboss.org/drools/rule" name="更新联系人状态"/>
<endEvent id="F830E301-B2A3-4F0D-84D5-35F3CB0BEE99_End" name="End"/>
<sequenceFlow id="F830E301-B2A3-4F0D-84D5-35F3CB0BEE99_End_Line" sourceRef="F830E301-B2A3-4F0D-84D5-35F3CB0BEE99" targetRef="F830E301-B2A3-4F0D-84D5-35F3CB0BEE99_End"/>
<startEvent id="7B4AA729-6972-48F1-933C-1FC7B9D3EC89" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="contactactiveprepareparam1" id="F20F4110-20C2-4569-967F-F7F9EB07C8A6" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<sequenceFlow id="6E2C3541-489A-4683-A215-AD061968ADA1" sourceRef="7B4AA729-6972-48F1-933C-1FC7B9D3EC89" targetRef="F20F4110-20C2-4569-967F-F7F9EB07C8A6">
</sequenceFlow>
<sequenceFlow id="FE201EA4-B862-4EA6-ADAF-3E323B539B18" sourceRef="F20F4110-20C2-4569-967F-F7F9EB07C8A6" targetRef="F830E301-B2A3-4F0D-84D5-35F3CB0BEE99">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.businesscentral.base.logic.contactlogic.inactive;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.base.domain.Contact contactinactivedefault;
global cn.ibizlab.businesscentral.core.base.service.IContactService contactservice;
global cn.ibizlab.businesscentral.core.base.service.IContactService iBzSysContactDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[更新联系人状态]
rule "deaction1"
ruleflow-group "contactinactivedeaction1"
when
then
contactservice.update(contactinactivedefault);
update(contactinactivedefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "contactinactivebegin"
when
then
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "contactinactiveprepareparam1"
when
then
contactinactivedefault.set("statuscode","2");
update(contactinactivedefault);//更新fact中变量值
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.contactinactive" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.base.service.logic.contactinactive">
<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="contactinactivedefault" type="cn.ibizlab.businesscentral.core.base.domain.Contact" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="contactinactivedeaction1" id="645935B6-23A7-4E3B-9E0D-2A30628970A8" implementation="http://www.jboss.org/drools/rule" name="更新联系人状态"/>
<endEvent id="645935B6-23A7-4E3B-9E0D-2A30628970A8_End" name="End"/>
<sequenceFlow id="645935B6-23A7-4E3B-9E0D-2A30628970A8_End_Line" sourceRef="645935B6-23A7-4E3B-9E0D-2A30628970A8" targetRef="645935B6-23A7-4E3B-9E0D-2A30628970A8_End"/>
<startEvent id="099C8D9A-D098-439E-9917-5BFDC26C95D6" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="contactinactiveprepareparam1" id="EACE880A-D43C-4DBD-A332-08C7FE8FB3E5" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<sequenceFlow id="B38B1B1F-0588-4B18-8066-CA6450CBC244" sourceRef="099C8D9A-D098-439E-9917-5BFDC26C95D6" targetRef="EACE880A-D43C-4DBD-A332-08C7FE8FB3E5">
</sequenceFlow>
<sequenceFlow id="0E9A3B79-B300-42A3-8888-F101411ABD80" sourceRef="EACE880A-D43C-4DBD-A332-08C7FE8FB3E5" targetRef="645935B6-23A7-4E3B-9E0D-2A30628970A8">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.businesscentral.sales.logic.leadlogic.cancel;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.sales.domain.Lead leadcanceldefault;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysLeadDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[更新潜在顾客状态]
rule "deaction1"
ruleflow-group "leadcanceldeaction1"
when
then
leadservice.update(leadcanceldefault);
update(leadcanceldefault);//更新fact中变量值
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "leadcancelprepareparam1"
when
then
leadcanceldefault.set("statuscode","7");
update(leadcanceldefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "leadcancelbegin"
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.sales.service.logic.leadcancel" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.sales.service.logic.leadcancel">
<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="leadcanceldefault" type="cn.ibizlab.businesscentral.core.sales.domain.Lead" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadcanceldeaction1" id="051BDFBC-EB1B-41D5-A8B6-A201D4AF8D99" implementation="http://www.jboss.org/drools/rule" name="更新潜在顾客状态"/>
<endEvent id="051BDFBC-EB1B-41D5-A8B6-A201D4AF8D99_End" name="End"/>
<sequenceFlow id="051BDFBC-EB1B-41D5-A8B6-A201D4AF8D99_End_Line" sourceRef="051BDFBC-EB1B-41D5-A8B6-A201D4AF8D99" targetRef="051BDFBC-EB1B-41D5-A8B6-A201D4AF8D99_End"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadcancelprepareparam1" id="9958B33F-3BCD-4F90-AD73-4391E1FE908A" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<startEvent id="E7A13186-E375-4465-9C43-97EE1E9B3F7E" isInterrupting="true"/>
<sequenceFlow id="EC506760-B4D4-47A7-8351-8FDE7AEC61BA" sourceRef="9958B33F-3BCD-4F90-AD73-4391E1FE908A" targetRef="051BDFBC-EB1B-41D5-A8B6-A201D4AF8D99">
</sequenceFlow>
<sequenceFlow id="40309FEA-E803-42B1-932B-BBBDDB1E49D0" sourceRef="E7A13186-E375-4465-9C43-97EE1E9B3F7E" targetRef="9958B33F-3BCD-4F90-AD73-4391E1FE908A">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.businesscentral.sales.logic.leadlogic.lostorder;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.sales.domain.Lead leadlostorderdefault;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysLeadDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "leadlostorderprepareparam1"
when
then
leadlostorderdefault.set("statuscode","4");
update(leadlostorderdefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "leadlostorderbegin"
when
then
end
//逻辑处理节点[更新潜在顾客状态]
rule "deaction1"
ruleflow-group "leadlostorderdeaction1"
when
then
leadservice.update(leadlostorderdefault);
update(leadlostorderdefault);//更新fact中变量值
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.sales.service.logic.leadlostorder" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.sales.service.logic.leadlostorder">
<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="leadlostorderdefault" type="cn.ibizlab.businesscentral.core.sales.domain.Lead" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadlostorderprepareparam1" id="D8C76659-B2A3-4692-9562-C1B83DAE564C" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<startEvent id="63185870-51D3-44A6-9AF3-597939AAD2A1" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadlostorderdeaction1" id="C55AF761-3CC5-4408-B049-651126C368B2" implementation="http://www.jboss.org/drools/rule" name="更新潜在顾客状态"/>
<endEvent id="C55AF761-3CC5-4408-B049-651126C368B2_End" name="End"/>
<sequenceFlow id="C55AF761-3CC5-4408-B049-651126C368B2_End_Line" sourceRef="C55AF761-3CC5-4408-B049-651126C368B2" targetRef="C55AF761-3CC5-4408-B049-651126C368B2_End"/>
<sequenceFlow id="8B1D4F88-0A83-4BD7-9644-4624258DAC78" sourceRef="63185870-51D3-44A6-9AF3-597939AAD2A1" targetRef="D8C76659-B2A3-4692-9562-C1B83DAE564C">
</sequenceFlow>
<sequenceFlow id="09F595B7-9588-4C3C-82C8-1AFDDD7CF43E" sourceRef="D8C76659-B2A3-4692-9562-C1B83DAE564C" targetRef="C55AF761-3CC5-4408-B049-651126C368B2">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.businesscentral.sales.logic.leadlogic.nointerested;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.sales.domain.Lead leadnointeresteddefault;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysLeadDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "leadnointerestedbegin"
when
then
end
//逻辑处理节点[更新潜在顾客状态]
rule "deaction1"
ruleflow-group "leadnointeresteddeaction1"
when
then
leadservice.update(leadnointeresteddefault);
update(leadnointeresteddefault);//更新fact中变量值
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "leadnointerestedprepareparam1"
when
then
leadnointeresteddefault.set("statuscode","6");
update(leadnointeresteddefault);//更新fact中变量值
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.sales.service.logic.leadnointerested" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.sales.service.logic.leadnointerested">
<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="leadnointeresteddefault" type="cn.ibizlab.businesscentral.core.sales.domain.Lead" />
</extensionElements>
<startEvent id="BB624316-E550-4F56-8252-1F6CFB971A30" isInterrupting="true"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadnointeresteddeaction1" id="8CA9CFB0-C941-4FDC-8ABC-628EC4420715" implementation="http://www.jboss.org/drools/rule" name="更新潜在顾客状态"/>
<endEvent id="8CA9CFB0-C941-4FDC-8ABC-628EC4420715_End" name="End"/>
<sequenceFlow id="8CA9CFB0-C941-4FDC-8ABC-628EC4420715_End_Line" sourceRef="8CA9CFB0-C941-4FDC-8ABC-628EC4420715" targetRef="8CA9CFB0-C941-4FDC-8ABC-628EC4420715_End"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadnointerestedprepareparam1" id="A8A42D06-F633-494F-926B-863DD1F9636E" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<sequenceFlow id="C41E650C-D362-404E-AF6F-3A36DE312682" sourceRef="A8A42D06-F633-494F-926B-863DD1F9636E" targetRef="8CA9CFB0-C941-4FDC-8ABC-628EC4420715">
</sequenceFlow>
<sequenceFlow id="7D7224F6-023C-4E51-AC38-CF5EC677F736" sourceRef="BB624316-E550-4F56-8252-1F6CFB971A30" targetRef="A8A42D06-F633-494F-926B-863DD1F9636E">
</sequenceFlow>
</process>
</definitions>
package cn.ibizlab.businesscentral.sales.logic.leadlogic.unable;
import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.sales.domain.Lead leadunabledefault;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService leadservice;
global cn.ibizlab.businesscentral.core.sales.service.ILeadService iBzSysLeadDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[更新潜在顾客状态]
rule "deaction1"
ruleflow-group "leadunabledeaction1"
when
then
leadservice.update(leadunabledefault);
update(leadunabledefault);//更新fact中变量值
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "leadunableprepareparam1"
when
then
leadunabledefault.set("statuscode","5");
update(leadunabledefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "leadunablebegin"
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.sales.service.logic.leadunable" isClosed="false" isExecutable="true" name="ScoreRule" processType="Private" tns:packageName="cn.ibizlab.businesscentral.core.sales.service.logic.leadunable">
<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="leadunabledefault" type="cn.ibizlab.businesscentral.core.sales.domain.Lead" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadunabledeaction1" id="FF2DD092-CFBB-4CEB-860C-FBDD2A95DA5F" implementation="http://www.jboss.org/drools/rule" name="更新潜在顾客状态"/>
<endEvent id="FF2DD092-CFBB-4CEB-860C-FBDD2A95DA5F_End" name="End"/>
<sequenceFlow id="FF2DD092-CFBB-4CEB-860C-FBDD2A95DA5F_End_Line" sourceRef="FF2DD092-CFBB-4CEB-860C-FBDD2A95DA5F" targetRef="FF2DD092-CFBB-4CEB-860C-FBDD2A95DA5F_End"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadunableprepareparam1" id="9D433311-9582-4F1D-A7BC-BE26D0F1BFAC" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<startEvent id="72A13FF7-8B2B-4BBC-B297-7E09A766E0E4" isInterrupting="true"/>
<sequenceFlow id="7CCD721B-4E58-46E9-AF88-FF901A207DB8" sourceRef="72A13FF7-8B2B-4BBC-B297-7E09A766E0E4" targetRef="9D433311-9582-4F1D-A7BC-BE26D0F1BFAC">
</sequenceFlow>
<sequenceFlow id="23F3CD83-4D7E-42D0-8325-1012709BD30A" sourceRef="9D433311-9582-4F1D-A7BC-BE26D0F1BFAC" targetRef="FF2DD092-CFBB-4CEB-860C-FBDD2A95DA5F">
</sequenceFlow>
</process>
</definitions>
......@@ -208,6 +208,48 @@ public class ContactResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-searchStop-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "获取停用联系人", tags = {"联系人" } ,notes = "获取停用联系人")
@RequestMapping(method= RequestMethod.GET , value="/contacts/fetchstop")
public ResponseEntity<List<ContactDTO>> fetchStop(ContactSearchContext context) {
Page<Contact> domains = contactService.searchStop(context) ;
List<ContactDTO> list = contactMapping.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','iBizBusinessCentral-Contact-searchStop-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "查询停用联系人", tags = {"联系人" } ,notes = "查询停用联系人")
@RequestMapping(method= RequestMethod.POST , value="/contacts/searchstop")
public ResponseEntity<Page<ContactDTO>> searchStop(@RequestBody ContactSearchContext context) {
Page<Contact> domains = contactService.searchStop(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-searchUsable-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "获取可用联系人", tags = {"联系人" } ,notes = "获取可用联系人")
@RequestMapping(method= RequestMethod.GET , value="/contacts/fetchusable")
public ResponseEntity<List<ContactDTO>> fetchUsable(ContactSearchContext context) {
Page<Contact> domains = contactService.searchUsable(context) ;
List<ContactDTO> list = contactMapping.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','iBizBusinessCentral-Contact-searchUsable-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "查询可用联系人", tags = {"联系人" } ,notes = "查询可用联系人")
@RequestMapping(method= RequestMethod.POST , value="/contacts/searchusable")
public ResponseEntity<Page<ContactDTO>> searchUsable(@RequestBody ContactSearchContext context) {
Page<Contact> domains = contactService.searchUsable(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Create')")
@ApiOperation(value = "根据客户建立联系人", tags = {"联系人" }, notes = "根据客户建立联系人")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts")
......@@ -389,5 +431,51 @@ public class ContactResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-searchStop-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "根据客户获取停用联系人", tags = {"联系人" } ,notes = "根据客户获取停用联系人")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/fetchstop")
public ResponseEntity<List<ContactDTO>> fetchContactStopByAccount(@PathVariable("account_id") String account_id,ContactSearchContext context) {
context.setN_customerid_eq(account_id);
Page<Contact> domains = contactService.searchStop(context) ;
List<ContactDTO> list = contactMapping.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','iBizBusinessCentral-Contact-searchStop-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "根据客户查询停用联系人", tags = {"联系人" } ,notes = "根据客户查询停用联系人")
@RequestMapping(method= RequestMethod.POST , value="/accounts/{account_id}/contacts/searchstop")
public ResponseEntity<Page<ContactDTO>> searchContactStopByAccount(@PathVariable("account_id") String account_id, @RequestBody ContactSearchContext context) {
context.setN_customerid_eq(account_id);
Page<Contact> domains = contactService.searchStop(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-searchUsable-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "根据客户获取可用联系人", tags = {"联系人" } ,notes = "根据客户获取可用联系人")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/fetchusable")
public ResponseEntity<List<ContactDTO>> fetchContactUsableByAccount(@PathVariable("account_id") String account_id,ContactSearchContext context) {
context.setN_customerid_eq(account_id);
Page<Contact> domains = contactService.searchUsable(context) ;
List<ContactDTO> list = contactMapping.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','iBizBusinessCentral-Contact-searchUsable-all') and hasPermission(#context,'iBizBusinessCentral-Contact-Get')")
@ApiOperation(value = "根据客户查询可用联系人", tags = {"联系人" } ,notes = "根据客户查询可用联系人")
@RequestMapping(method= RequestMethod.POST , value="/accounts/{account_id}/contacts/searchusable")
public ResponseEntity<Page<ContactDTO>> searchContactUsableByAccount(@PathVariable("account_id") String account_id, @RequestBody ContactSearchContext context) {
context.setN_customerid_eq(account_id);
Page<Contact> domains = contactService.searchUsable(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(contactMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册