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

lab_gzf 部署微服务应用

上级 c0202ad9
import LeadService from '@/service/lead/lead-service';
import { Verify } from '@/utils/verify/verify';
......@@ -58,6 +59,24 @@ export default class ActiveLogicBase {
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(params:any):boolean{
return true;
}
/**
* 执行逻辑
*
......@@ -69,6 +88,26 @@ export default class ActiveLogicBase {
}
/**
* 更新潜在顾客状态
*
* @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;
}
}
/**
* 开始
*
......@@ -76,7 +115,26 @@ export default class ActiveLogicBase {
*/
private async executeBegin(context:any,params:any,isloading:boolean){
//开始节点
return this.paramsMap.get(this.defaultParamName).data;
if(this.compute1Cond(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,{statecode:"0"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute0Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
......
......@@ -623,159 +623,9 @@ export default class LeadServiceBase extends EntityService {
* @memberof LeadServiceBase
*/
public async Active(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.account && context.contact && context.lead){
let masterData:any = {};
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
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;
}
delete item.srffrontuf;
}
});
}
}
masterData.listleads = listleadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/contacts/${context.contact}/leads/${context.lead}/active`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors ? res.data.leadcompetitors : []));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads ? res.data.listleads : []));
return res;
}
if(context.contact && context.lead){
let masterData:any = {};
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
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;
}
delete item.srffrontuf;
}
});
}
}
masterData.listleads = listleadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/contacts/${context.contact}/leads/${context.lead}/active`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors ? res.data.leadcompetitors : []));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads ? res.data.listleads : []));
return res;
}
if(context.campaign && context.lead){
let masterData:any = {};
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
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;
}
delete item.srffrontuf;
}
});
}
}
masterData.listleads = listleadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/campaigns/${context.campaign}/leads/${context.lead}/active`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors ? res.data.leadcompetitors : []));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads ? res.data.listleads : []));
return res;
}
if(context.account && context.lead){
let masterData:any = {};
let leadcompetitorsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors'),'undefined')){
leadcompetitorsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_leadcompetitors') as any);
if(leadcompetitorsData && leadcompetitorsData.length && leadcompetitorsData.length > 0){
leadcompetitorsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.relationshipsid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.leadcompetitors = leadcompetitorsData;
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;
}
delete item.srffrontuf;
}
});
}
}
masterData.listleads = listleadsData;
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/accounts/${context.account}/leads/${context.lead}/active`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leadcompetitors',JSON.stringify(res.data.leadcompetitors ? res.data.leadcompetitors : []));
this.tempStorage.setItem(context.srfsessionkey+'_listleads',JSON.stringify(res.data.listleads ? res.data.listleads : []));
return res;
}
return Http.getInstance().post(`/leads/${context.lead}/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};
}
/**
......
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,15 +25,11 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
.datapanel-label-style {
color:rgba(245, 244, 244, 1);font-size:12px;margin:0px 0px 0px 0px
......
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -25,13 +25,9 @@
.form-btn-noborder-transparent {
background-color:rgba(255, 0, 0, 0);border-style:none;margin:0px 10px 0px 0px
}
.form-btn-noborder-transparent {
.form-btn-noborder-transparent.ivu-btn.ivu-btn-primary {
background-color:transparent!important;
border-style:none;
margin:0px 5px 0px 5px;
.ivu-btn.ivu-btn-primary {
color: var(--view-font-color-bright);
}
color: var(--view-font-color-bright);
}
......@@ -78,6 +78,10 @@ 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.ILeadActiveLogic activeLogic;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.ILeadCancelLogic cancelLogic;
......@@ -162,8 +166,8 @@ public class LeadServiceImpl extends ServiceImpl<LeadMapper, Lead> implements IL
@Override
@Transactional
public Lead active(Lead et) {
//自定义代码
return et;
activeLogic.execute(et);
return et ;
}
@Override
......
......@@ -26,6 +26,13 @@ public class LeadActiveLogicImpl implements ILeadActiveLogic{
@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;
......@@ -41,6 +48,7 @@ public class LeadActiveLogicImpl implements ILeadActiveLogic{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("leadactivedefault",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.leadactive");
......
......@@ -5798,7 +5798,7 @@
<!--输出实体[LEAD]数据结构 -->
<changeSet author="a_LAB01_e85d8801c" id="tab-lead-255-70">
<changeSet author="a_LAB01_e85d8801c" id="tab-lead-259-70">
<createTable tableName="LEAD">
<column name="ADDRESS1_FAX" remarks="" type="VARCHAR(50)">
</column>
......@@ -11475,28 +11475,28 @@
</changeSet>
<!--输出实体[LANGUAGELOCALE]外键关系 -->
<!--输出实体[LEAD]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-255-302">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-302">
<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-255-303">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-303">
<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-255-304">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-304">
<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-255-305">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-305">
<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-255-306">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-306">
<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-255-307">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-307">
<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-255-308">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-308">
<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-255-309">
<changeSet author="a_LAB01_e85d8801c" id="fk-lead-259-309">
<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]外键关系 -->
......
......@@ -136,7 +136,7 @@
"delogicname":"潜在顾客",
"sysmoudle":{"id":"SALES","name":"销售"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"Excluded" , "name":"已排除潜在顾客"},{"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" }],
"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":"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":"创建人"}]
}
, {
......
......@@ -4,11 +4,21 @@ import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.sales.domain.Lead leadactivedefault;
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 "leadactivedeaction1"
when
then
leadservice.update(leadactivedefault);
update(leadactivedefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "leadactivebegin"
......@@ -16,3 +26,12 @@ ruleflow-group "leadactivebegin"
then
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "leadactiveprepareparam1"
when
then
leadactivedefault.set("statecode","0");
update(leadactivedefault);//更新fact中变量值
end
......@@ -7,9 +7,15 @@
<tns:import name="cn.ibizlab.businesscentral.util.helper.RuleUtils"/>
<tns:global identifier="leadactivedefault" type="cn.ibizlab.businesscentral.core.sales.domain.Lead" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadactivedeaction1" id="BCCBF258-8EE1-4F3A-8E79-3C1A6D6C14F0" implementation="http://www.jboss.org/drools/rule" name="更新潜在顾客状态"/>
<endEvent id="BCCBF258-8EE1-4F3A-8E79-3C1A6D6C14F0_End" name="End"/>
<sequenceFlow id="BCCBF258-8EE1-4F3A-8E79-3C1A6D6C14F0_End_Line" sourceRef="BCCBF258-8EE1-4F3A-8E79-3C1A6D6C14F0" targetRef="BCCBF258-8EE1-4F3A-8E79-3C1A6D6C14F0_End"/>
<startEvent id="81D6EDE3-E088-4D8E-8C5F-B0CA7BDD124F" isInterrupting="true"/>
<endEvent id="81D6EDE3-E088-4D8E-8C5F-B0CA7BDD124F_End" name="End"/>
<sequenceFlow id="81D6EDE3-E088-4D8E-8C5F-B0CA7BDD124F_End_Line" sourceRef="81D6EDE3-E088-4D8E-8C5F-B0CA7BDD124F" targetRef="81D6EDE3-E088-4D8E-8C5F-B0CA7BDD124F_End"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="leadactiveprepareparam1" id="670B49AD-25A3-40B2-B155-558EF4078E39" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<sequenceFlow id="F73B7F17-6D1A-4F15-8798-7C3D05604B39" sourceRef="670B49AD-25A3-40B2-B155-558EF4078E39" targetRef="BCCBF258-8EE1-4F3A-8E79-3C1A6D6C14F0">
</sequenceFlow>
<sequenceFlow id="DE6578DD-C03E-4847-94FE-8B32A40C7B25" sourceRef="81D6EDE3-E088-4D8E-8C5F-B0CA7BDD124F" targetRef="670B49AD-25A3-40B2-B155-558EF4078E39">
</sequenceFlow>
</process>
</definitions>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册