提交 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参数传递情况未实现
......
......@@ -740,6 +740,125 @@ mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/addlist$/)).reply((c
});
// Cancel
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Cancel");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Cancel
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Cancel");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Cancel
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Cancel");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// Cancel
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/cancel$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Cancel");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/cancel$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.leadid, tempValue.leadid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['leadid'] == tempValue['leadid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// CheckKey
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
......@@ -749,7 +868,364 @@ mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z
return [status, null];
}
const paramArray:Array<any> = ['accountid','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.leadid, tempValue.leadid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['leadid'] == tempValue['leadid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// DisQualification
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// DisQualification
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// DisQualification
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// DisQualification
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.leadid, tempValue.leadid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['leadid'] == tempValue['leadid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// LostOrder
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: LostOrder");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// LostOrder
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: LostOrder");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// LostOrder
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: LostOrder");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/).exec(config.url);
let tempValue: any = {};
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]
});
});
}
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table({});
console.groupEnd();
console.groupEnd();
return [status, {}];
});
// LostOrder
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/lostorder$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: LostOrder");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/lostorder$/).exec(config.url);
let tempValue: any = {};
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 : [];
//let _items = items.find((item: any) => Object.is(item.leadid, tempValue.leadid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['leadid'] == tempValue['leadid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// NoInterested
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: NoInterested");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -767,16 +1243,16 @@ mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z
});
// CheckKey
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
// NoInterested
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: NoInterested");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -794,16 +1270,16 @@ mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9
});
// CheckKey
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
// NoInterested
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: NoInterested");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -820,16 +1296,16 @@ mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: CheckKey");
// NoInterested
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/nointerested$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: NoInterested");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/nointerested$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -859,16 +1335,16 @@ mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((
});
// DisQualification
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
// Qualification
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -886,16 +1362,16 @@ mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z
});
// DisQualification
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
// Qualification
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -913,16 +1389,16 @@ mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9
});
// DisQualification
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
// Qualification
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -939,16 +1415,16 @@ mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-
return [status, {}];
});
// DisQualification
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/disqualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: DisQualification");
// Qualification
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/disqualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -978,16 +1454,16 @@ mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/disqualification$/))
});
// Qualification
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
// Save
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1005,16 +1481,16 @@ mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z
});
// Qualification
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
// Save
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1032,16 +1508,16 @@ mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9
});
// Qualification
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
// Save
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1058,16 +1534,16 @@ mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-
return [status, {}];
});
// Qualification
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/qualification$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Qualification");
// Save
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/qualification$/).exec(config.url);
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1097,16 +1573,16 @@ mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/qualification$/)).re
});
// Save
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
// Unable
mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Unable");
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','contactid','leadid'];
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1124,16 +1600,16 @@ mock.onPost(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z
});
// Save
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
// Unable
mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Unable");
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> = ['contactid','leadid'];
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1151,16 +1627,16 @@ mock.onPost(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9
});
// Save
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
// Unable
mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Unable");
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> = ['campaignid','leadid'];
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1177,16 +1653,16 @@ mock.onPost(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/([a-zA-Z0-
return [status, {}];
});
// Save
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Save");
// Unable
mock.onPost(new RegExp(/^\/leads\/?([a-zA-Z0-9\-\;]{0,35})\/unable$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: Unable");
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> = ['leadid'];
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/leads\/([a-zA-Z0-9\-\;]{1,35})\/unable$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -1394,6 +1870,185 @@ mock.onGet(new RegExp(/^\/leads\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((confi
return [status, records ? records : []];
});
// FetchOn
mock.onGet(new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/fetchon$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: FetchOn");
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','contactid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/accounts\/([a-zA-Z0-9\-\;]{1,35})\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/fetchon$/).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];
});
// FetchOn
mock.onGet(new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/fetchon$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: FetchOn");
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> = ['contactid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/contacts\/([a-zA-Z0-9\-\;]{1,35})\/leads\/fetchon$/).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];
});
// FetchOn
mock.onGet(new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/fetchon$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: FetchOn");
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> = ['campaignid'];
let tempValue: any = {};
const matchArray:any = new RegExp(/^\/campaigns\/([a-zA-Z0-9\-\;]{1,35})\/leads\/fetchon$/).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];
});
// FetchOn
mock.onGet(new RegExp(/^\/leads\/fetchon$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: FetchOn");
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 : []];
});
// FetchOn
mock.onGet(new RegExp(/^\/leads\/fetchon(\?[\w-./?%&=,]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:lead 方法: FetchOn");
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
......@@ -92,11 +92,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData.listaccounts = listaccountsData;
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) => {
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -106,12 +106,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listcontacts = listcontactsData;
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
masterData.listleads = listleadsData;
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;
......@@ -121,7 +121,7 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listleads = listleadsData;
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -133,8 +133,8 @@ export default class IBizListServiceBase extends EntityService {
let res:any = await Http.getInstance().post(`/ibizlists`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
......@@ -179,11 +179,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData.listaccounts = listaccountsData;
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) => {
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -193,12 +193,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listcontacts = listcontactsData;
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
masterData.listleads = listleadsData;
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;
......@@ -208,13 +208,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listleads = listleadsData;
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizlists/${context.ibizlist}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
......@@ -244,8 +244,8 @@ export default class IBizListServiceBase extends EntityService {
let res:any = await Http.getInstance().get(`/ibizlists/${context.ibizlist}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
......@@ -263,8 +263,8 @@ export default class IBizListServiceBase extends EntityService {
res.data.ibizlist = data.ibizlist;
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
......@@ -322,11 +322,11 @@ export default class IBizListServiceBase extends EntityService {
}
}
masterData.listaccounts = listaccountsData;
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) => {
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
......@@ -336,12 +336,12 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listcontacts = listcontactsData;
let listleadsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_listleads'),'undefined')){
listleadsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_listleads') as any);
if(listleadsData && listleadsData.length && listleadsData.length > 0){
listleadsData.forEach((item:any) => {
masterData.listleads = listleadsData;
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;
......@@ -351,13 +351,13 @@ export default class IBizListServiceBase extends EntityService {
});
}
}
masterData.listleads = listleadsData;
masterData.listcontacts = listcontactsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizlists/${context.ibizlist}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
this.tempStorage.setItem(context.srfsessionkey+'_listaccounts',JSON.stringify(res.data.listaccounts));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads));
this.tempStorage.setItem(context.srfsessionkey+'_listcontacts',JSON.stringify(res.data.listcontacts));
return res;
}
......
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
......@@ -62,6 +62,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
......@@ -92,21 +107,6 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
......@@ -116,9 +116,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/salesliteratures`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(tempContext.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(tempContext.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(tempContext.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
return res;
}
......@@ -133,6 +133,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
......@@ -163,26 +178,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/salesliteratures/${context.salesliterature}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
return res;
}
......@@ -210,9 +210,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/salesliteratures/${context.salesliterature}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
return res;
}
......@@ -228,9 +228,9 @@ export default class SalesLiteratureServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/salesliteratures/getdraft`,isloading);
res.data.salesliterature = data.salesliterature;
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
return res;
}
......@@ -258,6 +258,21 @@ export default class SalesLiteratureServiceBase extends EntityService {
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {};
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
let salesliteratureitemsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems'),'undefined')){
salesliteratureitemsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_salesliteratureitems') as any);
......@@ -288,26 +303,11 @@ export default class SalesLiteratureServiceBase extends EntityService {
}
}
masterData.competitorsalesliteratures = competitorsalesliteraturesData;
let productsalesliteraturesData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures'),'undefined')){
productsalesliteraturesData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_productsalesliteratures') as any);
if(productsalesliteraturesData && productsalesliteraturesData.length && productsalesliteraturesData.length > 0){
productsalesliteraturesData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.productsalesliteratures = productsalesliteraturesData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/salesliteratures/${context.salesliterature}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_salesliteratureitems',JSON.stringify(res.data.salesliteratureitems));
this.tempStorage.setItem(context.srfsessionkey+'_competitorsalesliteratures',JSON.stringify(res.data.competitorsalesliteratures));
this.tempStorage.setItem(context.srfsessionkey+'_productsalesliteratures',JSON.stringify(res.data.productsalesliteratures));
return res;
}
......
......@@ -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();
}
}
}
......@@ -4,7 +4,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-account-422-1">
<changeSet author="a_LAB01_e85d8801c" id="tab-account-426-1">
<createTable tableName="ACCOUNT">
<column name="ADDRESS1_PRIMARYCONTACTNAME" remarks="" type="VARCHAR(100)">
</column>
......@@ -2760,7 +2760,7 @@
<!--输出实体[CONTACT]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-contact-268-37">
<changeSet author="a_LAB01_e85d8801c" id="tab-contact-297-37">
<createTable tableName="CONTACT">
<column name="ADDRESS1_FREIGHTTERMSCODE" remarks="" type="VARCHAR(30)">
</column>
......@@ -5812,7 +5812,7 @@
<!--输出实体[LEAD]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-lead-141-68">
<changeSet author="a_LAB01_e85d8801c" id="tab-lead-165-68">
<createTable tableName="LEAD">
<column name="ADDRESS1_FAX" remarks="" type="VARCHAR(50)">
</column>
......@@ -10978,31 +10978,31 @@
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-132">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-132">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__ACCOUNT__PARENT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-133">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-133">
<addForeignKeyConstraint baseColumnNames="PRIMARYCONTACTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__CONTACT__PRIMAR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-134">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-134">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-135">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-135">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-136">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-136">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-137">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-137">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-138">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-138">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-139">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-139">
<addForeignKeyConstraint baseColumnNames="TERRITORYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TERRITORY__TERR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TERRITORYID" referencedTableName="TERRITORY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-account-422-140">
<changeSet author="a_LAB01_e85d8801c" id="fk-account-426-140">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="ACCOUNT" constraintName="DER1N_ACCOUNT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[ACTIVITYMIMEATTACHMENT]外键关系 -->
......@@ -11170,25 +11170,25 @@
<addForeignKeyConstraint baseColumnNames="BUSINESSUNITID" baseTableName="CONSTRAINTBASEDGROUP" constraintName="DER1N_CONSTRAINTBASEDGROUP__BU" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="BUSINESSUNITID" referencedTableName="BUSINESSUNIT" validate="true"/>
</changeSet>
<!--输出实体[CONTACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-194">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-194">
<addForeignKeyConstraint baseColumnNames="CUSTOMERID" baseTableName="CONTACT" constraintName="DER1N_CONTACT_ACCOUNT_CUSTOMER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-195">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-195">
<addForeignKeyConstraint baseColumnNames="PREFERREDEQUIPMENTID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__EQUIPMENT__PREF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="EQUIPMENTID" referencedTableName="EQUIPMENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-196">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-196">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGLEADID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__LEAD__ORIGINATI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="LEADID" referencedTableName="LEAD" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-197">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-197">
<addForeignKeyConstraint baseColumnNames="DEFAULTPRICELEVELID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__PRICELEVEL__DEF" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="PRICELEVELID" referencedTableName="PRICELEVEL" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-198">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-198">
<addForeignKeyConstraint baseColumnNames="PREFERREDSERVICEID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SERVICE__PREFER" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SERVICEID" referencedTableName="SERVICE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-199">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-199">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-268-200">
<changeSet author="a_LAB01_e85d8801c" id="fk-contact-297-200">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="CONTACT" constraintName="DER1N_CONTACT__TRANSACTIONCURR" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[CONTRACT]外键关系 -->
......@@ -11462,28 +11462,28 @@
</changeSet>
<!--输出实体[LANGUAGELOCALE]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-296">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-296">
<addForeignKeyConstraint baseColumnNames="PARENTACCOUNTID" baseTableName="LEAD" constraintName="DER1N_LEAD__ACCOUNT__PARENTACC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACCOUNTID" referencedTableName="ACCOUNT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-297">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-297">
<addForeignKeyConstraint baseColumnNames="RELATEDOBJECTID" baseTableName="LEAD" constraintName="DER1N_LEAD__CAMPAIGNRESPONSE__" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ACTIVITYID" referencedTableName="CAMPAIGNRESPONSE" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-298">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-298">
<addForeignKeyConstraint baseColumnNames="CAMPAIGNID" baseTableName="LEAD" constraintName="DER1N_LEAD__CAMPAIGN__CAMPAIGN" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CAMPAIGNID" referencedTableName="CAMPAIGN" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-299">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-299">
<addForeignKeyConstraint baseColumnNames="PARENTCONTACTID" baseTableName="LEAD" constraintName="DER1N_LEAD__CONTACT__PARENTCON" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="CONTACTID" referencedTableName="CONTACT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-300">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-300">
<addForeignKeyConstraint baseColumnNames="ORIGINATINGCASEID" baseTableName="LEAD" constraintName="DER1N_LEAD__INCIDENT__ORIGINAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="INCIDENTID" referencedTableName="INCIDENT" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-301">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-301">
<addForeignKeyConstraint baseColumnNames="QUALIFYINGOPPORTUNITYID" baseTableName="LEAD" constraintName="DER1N_LEAD__OPPORTUNITY__QUALI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="OPPORTUNITYID" referencedTableName="OPPORTUNITY" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-302">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-302">
<addForeignKeyConstraint baseColumnNames="SLAID" baseTableName="LEAD" constraintName="DER1N_LEAD__SLA__SLAID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SLAID" referencedTableName="SLA" validate="true"/>
</changeSet>
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-141-303">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-165-303">
<addForeignKeyConstraint baseColumnNames="TRANSACTIONCURRENCYID" baseTableName="LEAD" constraintName="DER1N_LEAD__TRANSACTIONCURRENC" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TRANSACTIONCURRENCYID" referencedTableName="TRANSACTIONCURRENCY" validate="true"/>
</changeSet>
<!--输出实体[LEADADDRESS]外键关系 -->
......
......@@ -176,11 +176,41 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Stop]-->
<select id="searchStop" parameterType="cn.ibizlab.businesscentral.core.base.filter.ContactSearchContext" resultMap="ContactResultMap">
select t1.* from (
<include refid="Stop" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Usable]-->
<select id="searchUsable" parameterType="cn.ibizlab.businesscentral.core.base.filter.ContactSearchContext" resultMap="ContactResultMap">
select t1.* from (
<include refid="Usable" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`ACCOUNTROLECODE`, t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_FREIGHTTERMSCODE`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_PRIMARYCONTACTNAME`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_FREIGHTTERMSCODE`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_PRIMARYCONTACTNAME`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`ADDRESS3_ADDRESSID`, t1.`ADDRESS3_ADDRESSTYPECODE`, t1.`ADDRESS3_CITY`, t1.`ADDRESS3_COMPOSITE`, t1.`ADDRESS3_COUNTRY`, t1.`ADDRESS3_COUNTY`, t1.`ADDRESS3_FAX`, t1.`ADDRESS3_FREIGHTTERMSCODE`, t1.`ADDRESS3_LATITUDE`, t1.`ADDRESS3_LINE1`, t1.`ADDRESS3_LINE2`, t1.`ADDRESS3_LINE3`, t1.`ADDRESS3_LONGITUDE`, t1.`ADDRESS3_NAME`, t1.`ADDRESS3_POSTALCODE`, t1.`ADDRESS3_POSTOFFICEBOX`, t1.`ADDRESS3_PRIMARYCONTACTNAME`, t1.`ADDRESS3_SHIPPINGMETHODCODE`, t1.`ADDRESS3_STATEORPROVINCE`, t1.`ADDRESS3_TELEPHONE1`, t1.`ADDRESS3_TELEPHONE2`, t1.`ADDRESS3_TELEPHONE3`, t1.`ADDRESS3_UPSZONE`, t1.`ADDRESS3_UTCOFFSET`, t1.`AGING30`, t1.`AGING30_BASE`, t1.`AGING60`, t1.`AGING60_BASE`, t1.`AGING90`, t1.`AGING90_BASE`, t1.`ANNIVERSARY`, t1.`ANNUALINCOME`, t1.`ANNUALINCOME_BASE`, t1.`ASSISTANTNAME`, t1.`ASSISTANTPHONE`, t1.`AUTOCREATE`, t1.`BACKOFFICECUSTOMER`, t1.`BIRTHDATE`, t1.`BUSINESS2`, t1.`CALLBACK`, t1.`CHILDRENSNAMES`, t1.`COMPANY`, t1.`CONTACTID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CREDITLIMIT`, t1.`CREDITLIMIT_BASE`, t1.`CREDITONHOLD`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERSIZECODE`, t1.`CUSTOMERTYPECODE`, t1.`DEFAULTPRICELEVELID`, t1.`DEFAULTPRICELEVELNAME`, t1.`DEPARTMENT`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTBULKPOSTALMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EDUCATIONCODE`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`EMPLOYEEID`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`EXTERNALUSERIDENTIFIER`, t1.`FAMILYSTATUSCODE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FTPSITEURL`, t1.`FULLNAME`, t1.`GENDERCODE`, t1.`GOVERNMENTID`, t1.`HASCHILDRENCODE`, t1.`HOME2`, t1.`IMPORTSEQUENCENUMBER`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADSOURCECODE`, t1.`MANAGERNAME`, t1.`MANAGERPHONE`, t1.`MARKETINGONLY`, t1.`MASTERCONTACTIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NICKNAME`, t1.`NUMBEROFCHILDREN`, t1.`ONHOLDTIME`, t1.`ORIGINATINGLEADID`, t1.`ORIGINATINGLEADNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTCONTACTIDYOMINAME`, t1.`PARENTCUSTOMERID`, t1.`PARENTCUSTOMERIDTYPE`, t1.`PARENTCUSTOMERIDYOMINAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PAYMENTTERMSCODE`, t1.`PREFERREDAPPOINTMENTDAYCODE`, t1.`PREFERREDAPPOINTMENTTIMECODE`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PREFERREDEQUIPMENTID`, t1.`PREFERREDEQUIPMENTNAME`, t1.`PREFERREDSERVICEID`, t1.`PREFERREDSERVICENAME`, t1.`PREFERREDSYSTEMUSERID`, t1.`PREFERREDSYSTEMUSERIDYOMINAME`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`SALUTATION`, t1.`SHIPPINGMETHODCODE`, t1.`SLAID`, t1.`SLANAME`, t1.`SPOUSESNAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSCRIPTIONID`, t1.`SUFFIX`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TERRITORYCODE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `CONTACT` t1
]]>
</sql>
<!--数据查询[Stop]-->
<sql id="Stop" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`ACCOUNTROLECODE`, t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_FREIGHTTERMSCODE`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_PRIMARYCONTACTNAME`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_FREIGHTTERMSCODE`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_PRIMARYCONTACTNAME`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`ADDRESS3_ADDRESSID`, t1.`ADDRESS3_ADDRESSTYPECODE`, t1.`ADDRESS3_CITY`, t1.`ADDRESS3_COMPOSITE`, t1.`ADDRESS3_COUNTRY`, t1.`ADDRESS3_COUNTY`, t1.`ADDRESS3_FAX`, t1.`ADDRESS3_FREIGHTTERMSCODE`, t1.`ADDRESS3_LATITUDE`, t1.`ADDRESS3_LINE1`, t1.`ADDRESS3_LINE2`, t1.`ADDRESS3_LINE3`, t1.`ADDRESS3_LONGITUDE`, t1.`ADDRESS3_NAME`, t1.`ADDRESS3_POSTALCODE`, t1.`ADDRESS3_POSTOFFICEBOX`, t1.`ADDRESS3_PRIMARYCONTACTNAME`, t1.`ADDRESS3_SHIPPINGMETHODCODE`, t1.`ADDRESS3_STATEORPROVINCE`, t1.`ADDRESS3_TELEPHONE1`, t1.`ADDRESS3_TELEPHONE2`, t1.`ADDRESS3_TELEPHONE3`, t1.`ADDRESS3_UPSZONE`, t1.`ADDRESS3_UTCOFFSET`, t1.`AGING30`, t1.`AGING30_BASE`, t1.`AGING60`, t1.`AGING60_BASE`, t1.`AGING90`, t1.`AGING90_BASE`, t1.`ANNIVERSARY`, t1.`ANNUALINCOME`, t1.`ANNUALINCOME_BASE`, t1.`ASSISTANTNAME`, t1.`ASSISTANTPHONE`, t1.`AUTOCREATE`, t1.`BACKOFFICECUSTOMER`, t1.`BIRTHDATE`, t1.`BUSINESS2`, t1.`CALLBACK`, t1.`CHILDRENSNAMES`, t1.`COMPANY`, t1.`CONTACTID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CREDITLIMIT`, t1.`CREDITLIMIT_BASE`, t1.`CREDITONHOLD`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERSIZECODE`, t1.`CUSTOMERTYPECODE`, t1.`DEFAULTPRICELEVELID`, t1.`DEFAULTPRICELEVELNAME`, t1.`DEPARTMENT`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTBULKPOSTALMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EDUCATIONCODE`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`EMPLOYEEID`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`EXTERNALUSERIDENTIFIER`, t1.`FAMILYSTATUSCODE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FTPSITEURL`, t1.`FULLNAME`, t1.`GENDERCODE`, t1.`GOVERNMENTID`, t1.`HASCHILDRENCODE`, t1.`HOME2`, t1.`IMPORTSEQUENCENUMBER`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADSOURCECODE`, t1.`MANAGERNAME`, t1.`MANAGERPHONE`, t1.`MARKETINGONLY`, t1.`MASTERCONTACTIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NICKNAME`, t1.`NUMBEROFCHILDREN`, t1.`ONHOLDTIME`, t1.`ORIGINATINGLEADID`, t1.`ORIGINATINGLEADNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTCONTACTIDYOMINAME`, t1.`PARENTCUSTOMERID`, t1.`PARENTCUSTOMERIDTYPE`, t1.`PARENTCUSTOMERIDYOMINAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PAYMENTTERMSCODE`, t1.`PREFERREDAPPOINTMENTDAYCODE`, t1.`PREFERREDAPPOINTMENTTIMECODE`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PREFERREDEQUIPMENTID`, t1.`PREFERREDEQUIPMENTNAME`, t1.`PREFERREDSERVICEID`, t1.`PREFERREDSERVICENAME`, t1.`PREFERREDSYSTEMUSERID`, t1.`PREFERREDSYSTEMUSERIDYOMINAME`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`SALUTATION`, t1.`SHIPPINGMETHODCODE`, t1.`SLAID`, t1.`SLANAME`, t1.`SPOUSESNAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSCRIPTIONID`, t1.`SUFFIX`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TERRITORYCODE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `CONTACT` t1
WHERE ( t1.`STATUSCODE` = 2 )
]]>
</sql>
<!--数据查询[Usable]-->
<sql id="Usable" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`ACCOUNTROLECODE`, t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_FREIGHTTERMSCODE`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_PRIMARYCONTACTNAME`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_FREIGHTTERMSCODE`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_PRIMARYCONTACTNAME`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`ADDRESS3_ADDRESSID`, t1.`ADDRESS3_ADDRESSTYPECODE`, t1.`ADDRESS3_CITY`, t1.`ADDRESS3_COMPOSITE`, t1.`ADDRESS3_COUNTRY`, t1.`ADDRESS3_COUNTY`, t1.`ADDRESS3_FAX`, t1.`ADDRESS3_FREIGHTTERMSCODE`, t1.`ADDRESS3_LATITUDE`, t1.`ADDRESS3_LINE1`, t1.`ADDRESS3_LINE2`, t1.`ADDRESS3_LINE3`, t1.`ADDRESS3_LONGITUDE`, t1.`ADDRESS3_NAME`, t1.`ADDRESS3_POSTALCODE`, t1.`ADDRESS3_POSTOFFICEBOX`, t1.`ADDRESS3_PRIMARYCONTACTNAME`, t1.`ADDRESS3_SHIPPINGMETHODCODE`, t1.`ADDRESS3_STATEORPROVINCE`, t1.`ADDRESS3_TELEPHONE1`, t1.`ADDRESS3_TELEPHONE2`, t1.`ADDRESS3_TELEPHONE3`, t1.`ADDRESS3_UPSZONE`, t1.`ADDRESS3_UTCOFFSET`, t1.`AGING30`, t1.`AGING30_BASE`, t1.`AGING60`, t1.`AGING60_BASE`, t1.`AGING90`, t1.`AGING90_BASE`, t1.`ANNIVERSARY`, t1.`ANNUALINCOME`, t1.`ANNUALINCOME_BASE`, t1.`ASSISTANTNAME`, t1.`ASSISTANTPHONE`, t1.`AUTOCREATE`, t1.`BACKOFFICECUSTOMER`, t1.`BIRTHDATE`, t1.`BUSINESS2`, t1.`CALLBACK`, t1.`CHILDRENSNAMES`, t1.`COMPANY`, t1.`CONTACTID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CREDITLIMIT`, t1.`CREDITLIMIT_BASE`, t1.`CREDITONHOLD`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERSIZECODE`, t1.`CUSTOMERTYPECODE`, t1.`DEFAULTPRICELEVELID`, t1.`DEFAULTPRICELEVELNAME`, t1.`DEPARTMENT`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTBULKPOSTALMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EDUCATIONCODE`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`EMPLOYEEID`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`EXTERNALUSERIDENTIFIER`, t1.`FAMILYSTATUSCODE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FTPSITEURL`, t1.`FULLNAME`, t1.`GENDERCODE`, t1.`GOVERNMENTID`, t1.`HASCHILDRENCODE`, t1.`HOME2`, t1.`IMPORTSEQUENCENUMBER`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADSOURCECODE`, t1.`MANAGERNAME`, t1.`MANAGERPHONE`, t1.`MARKETINGONLY`, t1.`MASTERCONTACTIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NICKNAME`, t1.`NUMBEROFCHILDREN`, t1.`ONHOLDTIME`, t1.`ORIGINATINGLEADID`, t1.`ORIGINATINGLEADNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTCONTACTIDYOMINAME`, t1.`PARENTCUSTOMERID`, t1.`PARENTCUSTOMERIDTYPE`, t1.`PARENTCUSTOMERIDYOMINAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PAYMENTTERMSCODE`, t1.`PREFERREDAPPOINTMENTDAYCODE`, t1.`PREFERREDAPPOINTMENTTIMECODE`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PREFERREDEQUIPMENTID`, t1.`PREFERREDEQUIPMENTNAME`, t1.`PREFERREDSERVICEID`, t1.`PREFERREDSERVICENAME`, t1.`PREFERREDSYSTEMUSERID`, t1.`PREFERREDSYSTEMUSERIDYOMINAME`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`SALUTATION`, t1.`SHIPPINGMETHODCODE`, t1.`SLAID`, t1.`SLANAME`, t1.`SPOUSESNAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSCRIPTIONID`, t1.`SUFFIX`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TERRITORYCODE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `CONTACT` t1
WHERE ( t1.`STATUSCODE` = 1 )
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ACCOUNTIDYOMINAME`, t1.`ACCOUNTROLECODE`, t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_FREIGHTTERMSCODE`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_PRIMARYCONTACTNAME`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_FREIGHTTERMSCODE`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_PRIMARYCONTACTNAME`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`ADDRESS3_ADDRESSID`, t1.`ADDRESS3_ADDRESSTYPECODE`, t1.`ADDRESS3_CITY`, t1.`ADDRESS3_COMPOSITE`, t1.`ADDRESS3_COUNTRY`, t1.`ADDRESS3_COUNTY`, t1.`ADDRESS3_FAX`, t1.`ADDRESS3_FREIGHTTERMSCODE`, t1.`ADDRESS3_LATITUDE`, t1.`ADDRESS3_LINE1`, t1.`ADDRESS3_LINE2`, t1.`ADDRESS3_LINE3`, t1.`ADDRESS3_LONGITUDE`, t1.`ADDRESS3_NAME`, t1.`ADDRESS3_POSTALCODE`, t1.`ADDRESS3_POSTOFFICEBOX`, t1.`ADDRESS3_PRIMARYCONTACTNAME`, t1.`ADDRESS3_SHIPPINGMETHODCODE`, t1.`ADDRESS3_STATEORPROVINCE`, t1.`ADDRESS3_TELEPHONE1`, t1.`ADDRESS3_TELEPHONE2`, t1.`ADDRESS3_TELEPHONE3`, t1.`ADDRESS3_UPSZONE`, t1.`ADDRESS3_UTCOFFSET`, t1.`AGING30`, t1.`AGING30_BASE`, t1.`AGING60`, t1.`AGING60_BASE`, t1.`AGING90`, t1.`AGING90_BASE`, t1.`ANNIVERSARY`, t1.`ANNUALINCOME`, t1.`ANNUALINCOME_BASE`, t1.`ASSISTANTNAME`, t1.`ASSISTANTPHONE`, t1.`AUTOCREATE`, t1.`BACKOFFICECUSTOMER`, t1.`BIRTHDATE`, t1.`BUSINESS2`, t1.`CALLBACK`, t1.`CHILDRENSNAMES`, t1.`COMPANY`, t1.`CONTACTID`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CREDITLIMIT`, t1.`CREDITLIMIT_BASE`, t1.`CREDITONHOLD`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERSIZECODE`, t1.`CUSTOMERTYPECODE`, t1.`DEFAULTPRICELEVELID`, t1.`DEFAULTPRICELEVELNAME`, t1.`DEPARTMENT`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTBULKPOSTALMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EDUCATIONCODE`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`EMPLOYEEID`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`EXCHANGERATE`, t1.`EXTERNALUSERIDENTIFIER`, t1.`FAMILYSTATUSCODE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FTPSITEURL`, t1.`FULLNAME`, t1.`GENDERCODE`, t1.`GOVERNMENTID`, t1.`HASCHILDRENCODE`, t1.`HOME2`, t1.`IMPORTSEQUENCENUMBER`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADSOURCECODE`, t1.`MANAGERNAME`, t1.`MANAGERPHONE`, t1.`MARKETINGONLY`, t1.`MASTERCONTACTIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NICKNAME`, t1.`NUMBEROFCHILDREN`, t1.`ONHOLDTIME`, t1.`ORIGINATINGLEADID`, t1.`ORIGINATINGLEADNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTCONTACTIDYOMINAME`, t1.`PARENTCUSTOMERID`, t1.`PARENTCUSTOMERIDTYPE`, t1.`PARENTCUSTOMERIDYOMINAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PAYMENTTERMSCODE`, t1.`PREFERREDAPPOINTMENTDAYCODE`, t1.`PREFERREDAPPOINTMENTTIMECODE`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PREFERREDEQUIPMENTID`, t1.`PREFERREDEQUIPMENTNAME`, t1.`PREFERREDSERVICEID`, t1.`PREFERREDSERVICENAME`, t1.`PREFERREDSYSTEMUSERID`, t1.`PREFERREDSYSTEMUSERIDYOMINAME`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`SALUTATION`, t1.`SHIPPINGMETHODCODE`, t1.`SLAID`, t1.`SLANAME`, t1.`SPOUSESNAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBSCRIPTIONID`, t1.`SUFFIX`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TERRITORYCODE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `CONTACT` t1
......
......@@ -157,11 +157,32 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[On]-->
<select id="searchOn" parameterType="cn.ibizlab.businesscentral.core.sales.filter.LeadSearchContext" resultMap="LeadResultMap">
select t1.* from (
<include refid="On" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`AUTOCREATE`, t1.`BUDGETAMOUNT`, t1.`BUDGETAMOUNT_BASE`, t1.`BUDGETSTATUS`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`COMPANYNAME`, t1.`CONFIRMINTEREST`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DECISIONMAKER`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`ESTIMATEDAMOUNT`, t1.`ESTIMATEDAMOUNT_BASE`, t1.`ESTIMATEDCLOSEDATE`, t1.`ESTIMATEDVALUE`, t1.`EVALUATEFIT`, t1.`EXCHANGERATE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FULLNAME`, t1.`IMPORTSEQUENCENUMBER`, t1.`INDUSTRYCODE`, t1.`INITIALCOMMUNICATION`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADID`, t1.`LEADQUALITYCODE`, t1.`LEADSOURCECODE`, t1.`MASTERLEADIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NEED`, t1.`NUMBEROFEMPLOYEES`, t1.`ONHOLDTIME`, t1.`ORIGINATINGCASEID`, t1.`ORIGINATINGCASENAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTACCOUNTID`, t1.`PARENTACCOUNTNAME`, t1.`PARENTCONTACTID`, t1.`PARENTCONTACTNAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PRIORITYCODE`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`PURCHASEPROCESS`, t1.`PURCHASETIMEFRAME`, t1.`QUALIFICATIONCOMMENTS`, t1.`QUALIFYINGOPPORTUNITYID`, t1.`QUALIFYINGOPPORTUNITYNAME`, t1.`RELATEDOBJECTID`, t1.`RELATEDOBJECTNAME`, t1.`REVENUE`, t1.`REVENUE_BASE`, t1.`SALESSTAGE`, t1.`SALESSTAGECODE`, t1.`SALUTATION`, t1.`SCHEDULEFOLLOWUP_PROSPECT`, t1.`SCHEDULEFOLLOWUP_QUALIFY`, t1.`SIC`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBJECT`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMICOMPANYNAME`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `LEAD` t1
]]>
</sql>
<!--数据查询[Excluded]-->
<sql id="Excluded" databaseId="mysql">
<![CDATA[ SELECT t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`AUTOCREATE`, t1.`BUDGETAMOUNT`, t1.`BUDGETAMOUNT_BASE`, t1.`BUDGETSTATUS`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`COMPANYNAME`, t1.`CONFIRMINTEREST`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DECISIONMAKER`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`ESTIMATEDAMOUNT`, t1.`ESTIMATEDAMOUNT_BASE`, t1.`ESTIMATEDCLOSEDATE`, t1.`ESTIMATEDVALUE`, t1.`EVALUATEFIT`, t1.`EXCHANGERATE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FULLNAME`, t1.`IMPORTSEQUENCENUMBER`, t1.`INDUSTRYCODE`, t1.`INITIALCOMMUNICATION`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADID`, t1.`LEADQUALITYCODE`, t1.`LEADSOURCECODE`, t1.`MASTERLEADIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NEED`, t1.`NUMBEROFEMPLOYEES`, t1.`ONHOLDTIME`, t1.`ORIGINATINGCASEID`, t1.`ORIGINATINGCASENAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTACCOUNTID`, t1.`PARENTACCOUNTNAME`, t1.`PARENTCONTACTID`, t1.`PARENTCONTACTNAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PRIORITYCODE`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`PURCHASEPROCESS`, t1.`PURCHASETIMEFRAME`, t1.`QUALIFICATIONCOMMENTS`, t1.`QUALIFYINGOPPORTUNITYID`, t1.`QUALIFYINGOPPORTUNITYNAME`, t1.`RELATEDOBJECTID`, t1.`RELATEDOBJECTNAME`, t1.`REVENUE`, t1.`REVENUE_BASE`, t1.`SALESSTAGE`, t1.`SALESSTAGECODE`, t1.`SALUTATION`, t1.`SCHEDULEFOLLOWUP_PROSPECT`, t1.`SCHEDULEFOLLOWUP_QUALIFY`, t1.`SIC`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBJECT`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMICOMPANYNAME`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `LEAD` t1
WHERE ( ( t1.`STATUSCODE` = 4 OR t1.`STATUSCODE` = 5 OR t1.`STATUSCODE` = 6 OR t1.`STATUSCODE` = 7 ) )
]]>
</sql>
<!--数据查询[On]-->
<sql id="On" databaseId="mysql">
<![CDATA[ SELECT t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`AUTOCREATE`, t1.`BUDGETAMOUNT`, t1.`BUDGETAMOUNT_BASE`, t1.`BUDGETSTATUS`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`COMPANYNAME`, t1.`CONFIRMINTEREST`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DECISIONMAKER`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`ESTIMATEDAMOUNT`, t1.`ESTIMATEDAMOUNT_BASE`, t1.`ESTIMATEDCLOSEDATE`, t1.`ESTIMATEDVALUE`, t1.`EVALUATEFIT`, t1.`EXCHANGERATE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FULLNAME`, t1.`IMPORTSEQUENCENUMBER`, t1.`INDUSTRYCODE`, t1.`INITIALCOMMUNICATION`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADID`, t1.`LEADQUALITYCODE`, t1.`LEADSOURCECODE`, t1.`MASTERLEADIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NEED`, t1.`NUMBEROFEMPLOYEES`, t1.`ONHOLDTIME`, t1.`ORIGINATINGCASEID`, t1.`ORIGINATINGCASENAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTACCOUNTID`, t1.`PARENTACCOUNTNAME`, t1.`PARENTCONTACTID`, t1.`PARENTCONTACTNAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PRIORITYCODE`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`PURCHASEPROCESS`, t1.`PURCHASETIMEFRAME`, t1.`QUALIFICATIONCOMMENTS`, t1.`QUALIFYINGOPPORTUNITYID`, t1.`QUALIFYINGOPPORTUNITYNAME`, t1.`RELATEDOBJECTID`, t1.`RELATEDOBJECTNAME`, t1.`REVENUE`, t1.`REVENUE_BASE`, t1.`SALESSTAGE`, t1.`SALESSTAGECODE`, t1.`SALUTATION`, t1.`SCHEDULEFOLLOWUP_PROSPECT`, t1.`SCHEDULEFOLLOWUP_QUALIFY`, t1.`SIC`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBJECT`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMICOMPANYNAME`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `LEAD` t1
WHERE ( ( t1.`STATUSCODE` = 2 OR t1.`STATUSCODE` = 3 ) )
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ADDRESS1_ADDRESSID`, t1.`ADDRESS1_ADDRESSTYPECODE`, t1.`ADDRESS1_CITY`, t1.`ADDRESS1_COMPOSITE`, t1.`ADDRESS1_COUNTRY`, t1.`ADDRESS1_COUNTY`, t1.`ADDRESS1_FAX`, t1.`ADDRESS1_LATITUDE`, t1.`ADDRESS1_LINE1`, t1.`ADDRESS1_LINE2`, t1.`ADDRESS1_LINE3`, t1.`ADDRESS1_LONGITUDE`, t1.`ADDRESS1_NAME`, t1.`ADDRESS1_POSTALCODE`, t1.`ADDRESS1_POSTOFFICEBOX`, t1.`ADDRESS1_SHIPPINGMETHODCODE`, t1.`ADDRESS1_STATEORPROVINCE`, t1.`ADDRESS1_TELEPHONE1`, t1.`ADDRESS1_TELEPHONE2`, t1.`ADDRESS1_TELEPHONE3`, t1.`ADDRESS1_UPSZONE`, t1.`ADDRESS1_UTCOFFSET`, t1.`ADDRESS2_ADDRESSID`, t1.`ADDRESS2_ADDRESSTYPECODE`, t1.`ADDRESS2_CITY`, t1.`ADDRESS2_COMPOSITE`, t1.`ADDRESS2_COUNTRY`, t1.`ADDRESS2_COUNTY`, t1.`ADDRESS2_FAX`, t1.`ADDRESS2_LATITUDE`, t1.`ADDRESS2_LINE1`, t1.`ADDRESS2_LINE2`, t1.`ADDRESS2_LINE3`, t1.`ADDRESS2_LONGITUDE`, t1.`ADDRESS2_NAME`, t1.`ADDRESS2_POSTALCODE`, t1.`ADDRESS2_POSTOFFICEBOX`, t1.`ADDRESS2_SHIPPINGMETHODCODE`, t1.`ADDRESS2_STATEORPROVINCE`, t1.`ADDRESS2_TELEPHONE1`, t1.`ADDRESS2_TELEPHONE2`, t1.`ADDRESS2_TELEPHONE3`, t1.`ADDRESS2_UPSZONE`, t1.`ADDRESS2_UTCOFFSET`, t1.`AUTOCREATE`, t1.`BUDGETAMOUNT`, t1.`BUDGETAMOUNT_BASE`, t1.`BUDGETSTATUS`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`COMPANYNAME`, t1.`CONFIRMINTEREST`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`DECISIONMAKER`, t1.`DESCRIPTION`, t1.`DONOTBULKEMAIL`, t1.`DONOTEMAIL`, t1.`DONOTFAX`, t1.`DONOTPHONE`, t1.`DONOTPOSTALMAIL`, t1.`DONOTSENDMM`, t1.`EMAILADDRESS1`, t1.`EMAILADDRESS2`, t1.`EMAILADDRESS3`, t1.`ENTITYIMAGE`, t1.`ENTITYIMAGEID`, t1.`ENTITYIMAGE_TIMESTAMP`, t1.`ENTITYIMAGE_URL`, t1.`ESTIMATEDAMOUNT`, t1.`ESTIMATEDAMOUNT_BASE`, t1.`ESTIMATEDCLOSEDATE`, t1.`ESTIMATEDVALUE`, t1.`EVALUATEFIT`, t1.`EXCHANGERATE`, t1.`FAX`, t1.`FIRSTNAME`, t1.`FOLLOWEMAIL`, t1.`FULLNAME`, t1.`IMPORTSEQUENCENUMBER`, t1.`INDUSTRYCODE`, t1.`INITIALCOMMUNICATION`, t1.`JOBTITLE`, t1.`LASTNAME`, t1.`LASTONHOLDTIME`, t1.`LASTUSEDINCAMPAIGN`, t1.`LEADID`, t1.`LEADQUALITYCODE`, t1.`LEADSOURCECODE`, t1.`MASTERLEADIDYOMINAME`, t1.`MERGED`, t1.`MIDDLENAME`, t1.`MOBILEPHONE`, t1.`NEED`, t1.`NUMBEROFEMPLOYEES`, t1.`ONHOLDTIME`, t1.`ORIGINATINGCASEID`, t1.`ORIGINATINGCASENAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PAGER`, t1.`PARENTACCOUNTID`, t1.`PARENTACCOUNTNAME`, t1.`PARENTCONTACTID`, t1.`PARENTCONTACTNAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PREFERREDCONTACTMETHODCODE`, t1.`PRIORITYCODE`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`PURCHASEPROCESS`, t1.`PURCHASETIMEFRAME`, t1.`QUALIFICATIONCOMMENTS`, t1.`QUALIFYINGOPPORTUNITYID`, t1.`QUALIFYINGOPPORTUNITYNAME`, t1.`RELATEDOBJECTID`, t1.`RELATEDOBJECTNAME`, t1.`REVENUE`, t1.`REVENUE_BASE`, t1.`SALESSTAGE`, t1.`SALESSTAGECODE`, t1.`SALUTATION`, t1.`SCHEDULEFOLLOWUP_PROSPECT`, t1.`SCHEDULEFOLLOWUP_QUALIFY`, t1.`SIC`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`SUBJECT`, t1.`TEAMSFOLLOWED`, t1.`TELEPHONE1`, t1.`TELEPHONE2`, t1.`TELEPHONE3`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER`, t1.`WEBSITEURL`, t1.`YOMICOMPANYNAME`, t1.`YOMIFIRSTNAME`, t1.`YOMIFULLNAME`, t1.`YOMILASTNAME`, t1.`YOMIMIDDLENAME` FROM `LEAD` t1
......
......@@ -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()));
}
}
......@@ -142,6 +142,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Cancel-all')")
@ApiOperation(value = "取消", tags = {"潜在顾客" }, notes = "取消")
@RequestMapping(method = RequestMethod.POST, value = "/leads/{lead_id}/cancel")
@Transactional
public ResponseEntity<LeadDTO> cancel(@PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setLeadid(lead_id);
domain = leadService.cancel(domain);
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@ApiOperation(value = "检查潜在顾客", tags = {"潜在顾客" }, notes = "检查潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/leads/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody LeadDTO leaddto) {
......@@ -160,6 +172,30 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-LostOrder-all')")
@ApiOperation(value = "丢单", tags = {"潜在顾客" }, notes = "丢单")
@RequestMapping(method = RequestMethod.POST, value = "/leads/{lead_id}/lostorder")
@Transactional
public ResponseEntity<LeadDTO> lostOrder(@PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setLeadid(lead_id);
domain = leadService.lostOrder(domain);
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-NoInterested-all')")
@ApiOperation(value = "不再感兴趣", tags = {"潜在顾客" }, notes = "不再感兴趣")
@RequestMapping(method = RequestMethod.POST, value = "/leads/{lead_id}/nointerested")
@Transactional
public ResponseEntity<LeadDTO> noInterested(@PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setLeadid(lead_id);
domain = leadService.noInterested(domain);
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Qualification-all')")
@ApiOperation(value = "授予资格", tags = {"潜在顾客" }, notes = "授予资格")
@RequestMapping(method = RequestMethod.POST, value = "/leads/{lead_id}/qualification")
......@@ -187,6 +223,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Unable-all')")
@ApiOperation(value = "无法联系", tags = {"潜在顾客" }, notes = "无法联系")
@RequestMapping(method = RequestMethod.POST, value = "/leads/{lead_id}/unable")
@Transactional
public ResponseEntity<LeadDTO> unable(@PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setLeadid(lead_id);
domain = leadService.unable(domain);
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"潜在顾客" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/leads/fetchdefault")
......@@ -208,6 +256,27 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "获取已开启潜在顾客", tags = {"潜在顾客" } ,notes = "获取已开启潜在顾客")
@RequestMapping(method= RequestMethod.GET , value="/leads/fetchon")
public ResponseEntity<List<LeadDTO>> fetchOn(LeadSearchContext context) {
Page<Lead> domains = leadService.searchOn(context) ;
List<LeadDTO> list = leadMapping.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-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "查询已开启潜在顾客", tags = {"潜在顾客" } ,notes = "查询已开启潜在顾客")
@RequestMapping(method= RequestMethod.POST , value="/leads/searchon")
public ResponseEntity<Page<LeadDTO>> searchOn(@RequestBody LeadSearchContext context) {
Page<Lead> domains = leadService.searchOn(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.leadMapping.toDomain(#leaddto),'iBizBusinessCentral-Lead-Create')")
@ApiOperation(value = "根据市场活动建立潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动建立潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads")
......@@ -315,6 +384,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Cancel-all')")
@ApiOperation(value = "根据市场活动潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads/{lead_id}/cancel")
@Transactional
public ResponseEntity<LeadDTO> cancelByCampaign(@PathVariable("campaign_id") String campaign_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setCampaignid(campaign_id);
domain = leadService.cancel(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@ApiOperation(value = "根据市场活动检查潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动检查潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads/checkkey")
public ResponseEntity<Boolean> checkKeyByCampaign(@PathVariable("campaign_id") String campaign_id, @RequestBody LeadDTO leaddto) {
......@@ -333,6 +414,30 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-LostOrder-all')")
@ApiOperation(value = "根据市场活动潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads/{lead_id}/lostorder")
@Transactional
public ResponseEntity<LeadDTO> lostOrderByCampaign(@PathVariable("campaign_id") String campaign_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setCampaignid(campaign_id);
domain = leadService.lostOrder(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-NoInterested-all')")
@ApiOperation(value = "根据市场活动潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads/{lead_id}/nointerested")
@Transactional
public ResponseEntity<LeadDTO> noInterestedByCampaign(@PathVariable("campaign_id") String campaign_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setCampaignid(campaign_id);
domain = leadService.noInterested(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Qualification-all')")
@ApiOperation(value = "根据市场活动潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads/{lead_id}/qualification")
......@@ -366,6 +471,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Unable-all')")
@ApiOperation(value = "根据市场活动潜在顾客", tags = {"潜在顾客" }, notes = "根据市场活动潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/campaigns/{campaign_id}/leads/{lead_id}/unable")
@Transactional
public ResponseEntity<LeadDTO> unableByCampaign(@PathVariable("campaign_id") String campaign_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setCampaignid(campaign_id);
domain = leadService.unable(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据市场活动获取DEFAULT", tags = {"潜在顾客" } ,notes = "根据市场活动获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/campaigns/{campaign_id}/leads/fetchdefault")
......@@ -389,6 +506,29 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据市场活动获取已开启潜在顾客", tags = {"潜在顾客" } ,notes = "根据市场活动获取已开启潜在顾客")
@RequestMapping(method= RequestMethod.GET , value="/campaigns/{campaign_id}/leads/fetchon")
public ResponseEntity<List<LeadDTO>> fetchLeadOnByCampaign(@PathVariable("campaign_id") String campaign_id,LeadSearchContext context) {
context.setN_campaignid_eq(campaign_id);
Page<Lead> domains = leadService.searchOn(context) ;
List<LeadDTO> list = leadMapping.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-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据市场活动查询已开启潜在顾客", tags = {"潜在顾客" } ,notes = "根据市场活动查询已开启潜在顾客")
@RequestMapping(method= RequestMethod.POST , value="/campaigns/{campaign_id}/leads/searchon")
public ResponseEntity<Page<LeadDTO>> searchLeadOnByCampaign(@PathVariable("campaign_id") String campaign_id, @RequestBody LeadSearchContext context) {
context.setN_campaignid_eq(campaign_id);
Page<Lead> domains = leadService.searchOn(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.leadMapping.toDomain(#leaddto),'iBizBusinessCentral-Lead-Create')")
@ApiOperation(value = "根据联系人建立潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人建立潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads")
......@@ -496,6 +636,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Cancel-all')")
@ApiOperation(value = "根据联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads/{lead_id}/cancel")
@Transactional
public ResponseEntity<LeadDTO> cancelByContact(@PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.cancel(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@ApiOperation(value = "根据联系人检查潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人检查潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads/checkkey")
public ResponseEntity<Boolean> checkKeyByContact(@PathVariable("contact_id") String contact_id, @RequestBody LeadDTO leaddto) {
......@@ -514,6 +666,30 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-LostOrder-all')")
@ApiOperation(value = "根据联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads/{lead_id}/lostorder")
@Transactional
public ResponseEntity<LeadDTO> lostOrderByContact(@PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.lostOrder(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-NoInterested-all')")
@ApiOperation(value = "根据联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads/{lead_id}/nointerested")
@Transactional
public ResponseEntity<LeadDTO> noInterestedByContact(@PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.noInterested(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Qualification-all')")
@ApiOperation(value = "根据联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads/{lead_id}/qualification")
......@@ -547,6 +723,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Unable-all')")
@ApiOperation(value = "根据联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/contacts/{contact_id}/leads/{lead_id}/unable")
@Transactional
public ResponseEntity<LeadDTO> unableByContact(@PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.unable(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据联系人获取DEFAULT", tags = {"潜在顾客" } ,notes = "根据联系人获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/contacts/{contact_id}/leads/fetchdefault")
......@@ -570,6 +758,29 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据联系人获取已开启潜在顾客", tags = {"潜在顾客" } ,notes = "根据联系人获取已开启潜在顾客")
@RequestMapping(method= RequestMethod.GET , value="/contacts/{contact_id}/leads/fetchon")
public ResponseEntity<List<LeadDTO>> fetchLeadOnByContact(@PathVariable("contact_id") String contact_id,LeadSearchContext context) {
context.setN_parentcontactid_eq(contact_id);
Page<Lead> domains = leadService.searchOn(context) ;
List<LeadDTO> list = leadMapping.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-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据联系人查询已开启潜在顾客", tags = {"潜在顾客" } ,notes = "根据联系人查询已开启潜在顾客")
@RequestMapping(method= RequestMethod.POST , value="/contacts/{contact_id}/leads/searchon")
public ResponseEntity<Page<LeadDTO>> searchLeadOnByContact(@PathVariable("contact_id") String contact_id, @RequestBody LeadSearchContext context) {
context.setN_parentcontactid_eq(contact_id);
Page<Lead> domains = leadService.searchOn(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission(this.leadMapping.toDomain(#leaddto),'iBizBusinessCentral-Lead-Create')")
@ApiOperation(value = "根据客户联系人建立潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人建立潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads")
......@@ -677,6 +888,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Cancel-all')")
@ApiOperation(value = "根据客户联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads/{lead_id}/cancel")
@Transactional
public ResponseEntity<LeadDTO> cancelByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.cancel(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@ApiOperation(value = "根据客户联系人检查潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人检查潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads/checkkey")
public ResponseEntity<Boolean> checkKeyByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @RequestBody LeadDTO leaddto) {
......@@ -695,6 +918,30 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-LostOrder-all')")
@ApiOperation(value = "根据客户联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads/{lead_id}/lostorder")
@Transactional
public ResponseEntity<LeadDTO> lostOrderByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.lostOrder(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-NoInterested-all')")
@ApiOperation(value = "根据客户联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads/{lead_id}/nointerested")
@Transactional
public ResponseEntity<LeadDTO> noInterestedByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.noInterested(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Qualification-all')")
@ApiOperation(value = "根据客户联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads/{lead_id}/qualification")
......@@ -728,6 +975,18 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-Unable-all')")
@ApiOperation(value = "根据客户联系人潜在顾客", tags = {"潜在顾客" }, notes = "根据客户联系人潜在顾客")
@RequestMapping(method = RequestMethod.POST, value = "/accounts/{account_id}/contacts/{contact_id}/leads/{lead_id}/unable")
@Transactional
public ResponseEntity<LeadDTO> unableByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @PathVariable("lead_id") String lead_id, @RequestBody LeadDTO leaddto) {
Lead domain = leadMapping.toDomain(leaddto);
domain.setParentcontactid(contact_id);
domain = leadService.unable(domain) ;
leaddto = leadMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(leaddto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据客户联系人获取DEFAULT", tags = {"潜在顾客" } ,notes = "根据客户联系人获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/{contact_id}/leads/fetchdefault")
......@@ -751,5 +1010,28 @@ public class LeadResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据客户联系人获取已开启潜在顾客", tags = {"潜在顾客" } ,notes = "根据客户联系人获取已开启潜在顾客")
@RequestMapping(method= RequestMethod.GET , value="/accounts/{account_id}/contacts/{contact_id}/leads/fetchon")
public ResponseEntity<List<LeadDTO>> fetchLeadOnByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id,LeadSearchContext context) {
context.setN_parentcontactid_eq(contact_id);
Page<Lead> domains = leadService.searchOn(context) ;
List<LeadDTO> list = leadMapping.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-Lead-searchOn-all') and hasPermission(#context,'iBizBusinessCentral-Lead-Get')")
@ApiOperation(value = "根据客户联系人查询已开启潜在顾客", tags = {"潜在顾客" } ,notes = "根据客户联系人查询已开启潜在顾客")
@RequestMapping(method= RequestMethod.POST , value="/accounts/{account_id}/contacts/{contact_id}/leads/searchon")
public ResponseEntity<Page<LeadDTO>> searchLeadOnByAccountContact(@PathVariable("account_id") String account_id, @PathVariable("contact_id") String contact_id, @RequestBody LeadSearchContext context) {
context.setN_parentcontactid_eq(contact_id);
Page<Lead> domains = leadService.searchOn(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(leadMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册