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

xignzi006 发布系统代码

上级 30477cdc
{
"opportunitystatetabview": {
"title": "商机状态分页视图",
"caption": "商机",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityStateTabView",
"viewfilename": "opportunity-state-tab-view",
"viewtag": "00367e275947880480763049e5c495be",
"memo": ""
},
"productsubstituteeditview": {
"title": "产品关系编辑视图",
"caption": "产品替换",
......@@ -2189,6 +2199,16 @@
"viewtag": "cb7c18e9af4848f515ab84524fb234b2",
"memo": ""
},
"opportunitywingridview": {
"title": "商机信息",
"caption": "商机信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityWinGridView",
"viewfilename": "opportunity-win-grid-view",
"viewtag": "cbd7a448bb018d9efebb4d1495507fa2",
"memo": "系统自动添加"
},
"incidentinfo_incidentview": {
"title": "案例信息",
"caption": "案例",
......
......@@ -114,6 +114,10 @@ export default {
pricelevelname: "价目表",
},
views: {
statetabview: {
caption: "商机",
title: "商机状态分页视图",
},
summary: {
caption: "商机概览",
title: "商机概览",
......@@ -162,6 +166,10 @@ export default {
caption: "商机",
title: "商机编辑视图",
},
wingridview: {
caption: "商机信息",
title: "商机信息",
},
},
quickcreate_form: {
details: {
......@@ -294,44 +302,6 @@ export default {
uiactions: {
},
},
conoppgridviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {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: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
editviewtoolbar_toolbar: {
tbitem1: {
caption: "Save And Close",
......@@ -446,4 +416,126 @@ export default {
tip: "Filter",
},
},
wingridviewtoolbar_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: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
lostgridviewtoolbar_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: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
conoppgridviewtoolbar_toolbar: {
deuiaction1: {
caption: "New",
tip: "New",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "Edit",
tip: "Edit {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: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
},
};
\ No newline at end of file
......@@ -113,6 +113,10 @@ export default {
pricelevelname: "价目表",
},
views: {
statetabview: {
caption: "商机",
title: "商机状态分页视图",
},
summary: {
caption: "商机概览",
title: "商机概览",
......@@ -161,6 +165,10 @@ export default {
caption: "商机",
title: "商机编辑视图",
},
wingridview: {
caption: "商机信息",
title: "商机信息",
},
},
quickcreate_form: {
details: {
......@@ -293,44 +301,6 @@ export default {
uiactions: {
},
},
conoppgridviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
editviewtoolbar_toolbar: {
tbitem1: {
caption: "保存并关闭",
......@@ -445,4 +415,126 @@ export default {
tip: "过滤",
},
},
wingridviewtoolbar_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: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
lostgridviewtoolbar_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: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
conoppgridviewtoolbar_toolbar: {
deuiaction1: {
caption: "新建",
tip: "新建",
},
tbitem2: {
caption: "-",
tip: "",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
},
};
\ No newline at end of file
......@@ -7,7 +7,15 @@ import Mock from 'mockjs'
mock.onGet('./assets/json/view-config.json').reply((config: any) => {
let status = MockAdapter.mockStatus(config);
return [status,{
"productsubstituteeditview": {
"opportunitystatetabview": {
"title": "商机状态分页视图",
"caption": "商机",
"viewtype": "DETABEXPVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityStateTabView",
"viewtag": "00367e275947880480763049e5c495be"
},
"productsubstituteeditview": {
"title": "产品关系编辑视图",
"caption": "产品替换",
"viewtype": "DEEDITVIEW",
......@@ -1759,6 +1767,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname": "GoalChildGoalGridView",
"viewtag": "cb7c18e9af4848f515ab84524fb234b2"
},
"opportunitywingridview": {
"title": "商机信息",
"caption": "商机信息",
"viewtype": "DEGRIDVIEW",
"viewmodule": "Sales",
"viewname": "OpportunityWinGridView",
"viewtag": "cbd7a448bb018d9efebb4d1495507fa2"
},
"incidentinfo_incidentview": {
"title": "案例信息",
"caption": "案例",
......
import OpportunityService from '@/service/opportunity/opportunity-service';
import { Verify } from '@/utils/verify/verify';
......@@ -58,6 +59,24 @@ export default class LostLogicBase {
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public compute0Cond(params:any):boolean{
return true;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public compute1Cond(params:any):boolean{
return true;
}
/**
* 执行逻辑
*
......@@ -69,6 +88,43 @@ export default class LostLogicBase {
}
/**
* 更新商机状态
*
* @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:OpportunityService = new OpportunityService();
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,{statecode:"2"});
this.paramsMap.set('Default',{data:tempDstParam0Data,context:tempDstParam0Context});
if(this.compute0Cond(params)){
return this.executeDeaction1(context,params,isloading);
}
}
/**
* 开始
*
......@@ -76,7 +132,9 @@ export default class LostLogicBase {
*/
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);
}
}
......
......@@ -79,6 +79,7 @@ export default class OpportunityUIServiceBase extends UIService {
* @memberof OpportunityUIServiceBase
*/
public initViewMap(){
this.allViewMap.set(':',{viewname:'statetabview',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'summary',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'conoppgridview',srfappde:'opportunities'});
this.allViewMap.set('MDATAVIEW:',{viewname:'gridview',srfappde:'opportunities'});
......@@ -91,6 +92,7 @@ export default class OpportunityUIServiceBase extends UIService {
this.allViewMap.set(':',{viewname:'listexpview',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'quickcreate',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'info_product',srfappde:'opportunities'});
this.allViewMap.set(':',{viewname:'wingridview',srfappde:'opportunities'});
}
/**
......@@ -140,6 +142,7 @@ export default class OpportunityUIServiceBase extends UIService {
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
actionContext.closeView(null);
const backend = () => {
const curService:OpportunityService = new OpportunityService();
curService.Win(context,data, true).then((response: any) => {
......@@ -150,6 +153,9 @@ export default class OpportunityUIServiceBase extends UIService {
actionContext.$Notice.success({ title: '成功', desc: '作为赢单结束成功!' });
const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
return response;
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
......@@ -344,6 +350,7 @@ export default class OpportunityUIServiceBase extends UIService {
context.srfsessionkey = context.srfsessionid;
delete context.srfsessionid;
}
actionContext.closeView(null);
const backend = () => {
const curService:OpportunityService = new OpportunityService();
curService.Lose(context,data, true).then((response: any) => {
......@@ -354,6 +361,9 @@ export default class OpportunityUIServiceBase extends UIService {
actionContext.$Notice.success({ title: '成功', desc: '作为丢单结束成功!' });
const _this: any = actionContext;
if (xData && xData.refresh && xData.refresh instanceof Function) {
xData.refresh(args);
}
return response;
}).catch((response: any) => {
if (!response || !response.status || !response.data) {
......
......@@ -31,25 +31,5 @@ public class OpportunityExService extends OpportunityServiceImpl {
public Opportunity active(Opportunity et) {
return super.active(et);
}
/**
* 自定义行为[Lose]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Opportunity lose(Opportunity et) {
return super.lose(et);
}
/**
* 自定义行为[Win]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public Opportunity win(Opportunity et) {
return super.win(et);
}
}
......@@ -20,7 +20,9 @@ import com.alibaba.fastjson.JSONObject;
public interface OpportunityMapper extends BaseMapper<Opportunity>{
Page<Opportunity> searchDefault(IPage page, @Param("srf") OpportunitySearchContext context, @Param("ew") Wrapper<Opportunity> wrapper) ;
Page<Opportunity> searchLost(IPage page, @Param("srf") OpportunitySearchContext context, @Param("ew") Wrapper<Opportunity> wrapper) ;
Page<Opportunity> searchTop5(IPage page, @Param("srf") OpportunitySearchContext context, @Param("ew") Wrapper<Opportunity> wrapper) ;
Page<Opportunity> searchWin(IPage page, @Param("srf") OpportunitySearchContext context, @Param("ew") Wrapper<Opportunity> wrapper) ;
@Override
Opportunity selectById(Serializable id);
@Override
......
......@@ -40,7 +40,9 @@ public interface IOpportunityService extends IService<Opportunity>{
void saveBatch(List<Opportunity> list) ;
Opportunity win(Opportunity et) ;
Page<Opportunity> searchDefault(OpportunitySearchContext context) ;
Page<Opportunity> searchLost(OpportunitySearchContext context) ;
Page<Opportunity> searchTop5(OpportunitySearchContext context) ;
Page<Opportunity> searchWin(OpportunitySearchContext context) ;
List<Opportunity> selectByParentaccountid(String accountid) ;
void removeByParentaccountid(String accountid) ;
List<Opportunity> selectByCampaignid(String campaignid) ;
......
......@@ -84,6 +84,14 @@ public class OpportunityServiceImpl extends ServiceImpl<OpportunityMapper, Oppor
@Lazy
protected cn.ibizlab.businesscentral.core.base.service.ITransactionCurrencyService transactioncurrencyService;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.IOpportunityLostLogic lostLogic;
@Autowired
@Lazy
protected cn.ibizlab.businesscentral.core.sales.service.logic.IOpportunityWinLogic winLogic;
protected int batchSize = 500;
@Override
......@@ -163,8 +171,8 @@ public class OpportunityServiceImpl extends ServiceImpl<OpportunityMapper, Oppor
@Override
@Transactional
public Opportunity lose(Opportunity et) {
//自定义代码
return et;
lostLogic.execute(et);
return et ;
}
@Override
......@@ -203,8 +211,8 @@ public class OpportunityServiceImpl extends ServiceImpl<OpportunityMapper, Oppor
@Override
@Transactional
public Opportunity win(Opportunity et) {
//自定义代码
return et;
winLogic.execute(et);
return et ;
}
......@@ -288,6 +296,15 @@ public class OpportunityServiceImpl extends ServiceImpl<OpportunityMapper, Oppor
return new PageImpl<Opportunity>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 丢单商机
*/
@Override
public Page<Opportunity> searchLost(OpportunitySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Opportunity> pages=baseMapper.searchLost(context.getPages(),context,context.getSelectCond());
return new PageImpl<Opportunity>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 Top5
*/
......@@ -297,6 +314,15 @@ public class OpportunityServiceImpl extends ServiceImpl<OpportunityMapper, Oppor
return new PageImpl<Opportunity>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 赢单商机
*/
@Override
public Page<Opportunity> searchWin(OpportunitySearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Opportunity> pages=baseMapper.searchWin(context.getPages(),context,context.getSelectCond());
return new PageImpl<Opportunity>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
......
......@@ -26,6 +26,13 @@ public class OpportunityLostLogicImpl implements IOpportunityLostLogic{
@Autowired
private KieContainer kieContainer;
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.IOpportunityService opportunityservice;
public cn.ibizlab.businesscentral.core.sales.service.IOpportunityService getOpportunityService() {
return this.opportunityservice;
}
@Autowired
private cn.ibizlab.businesscentral.core.sales.service.IOpportunityService iBzSysDefaultService;
......@@ -41,6 +48,7 @@ public class OpportunityLostLogicImpl implements IOpportunityLostLogic{
kieSession=kieContainer.newKieSession();
kieSession.insert(et);
kieSession.setGlobal("opportunitylostdefault",et);
kieSession.setGlobal("opportunityservice",opportunityservice);
kieSession.setGlobal("iBzSysOpportunityDefaultService",iBzSysDefaultService);
kieSession.setGlobal("curuser", cn.ibizlab.businesscentral.util.security.AuthenticationUser.getAuthenticationUser());
kieSession.startProcess("cn.ibizlab.businesscentral.core.sales.service.logic.opportunitylost");
......
......@@ -108,6 +108,15 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Lost]-->
<select id="searchLost" parameterType="cn.ibizlab.businesscentral.core.sales.filter.OpportunitySearchContext" resultMap="OpportunityResultMap">
select t1.* from (
<include refid="Lost" />
)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>
<!--数据集合[Top5]-->
<select id="searchTop5" parameterType="cn.ibizlab.businesscentral.core.sales.filter.OpportunitySearchContext" resultMap="OpportunityResultMap">
select t1.* from (
......@@ -117,6 +126,15 @@
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Win]-->
<select id="searchWin" parameterType="cn.ibizlab.businesscentral.core.sales.filter.OpportunitySearchContext" resultMap="OpportunityResultMap">
select t1.* from (
<include refid="Win" />
)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.`ACTUALCLOSEDATE`, t1.`ACTUALVALUE`, t1.`ACTUALVALUE_BASE`, t1.`BUDGETAMOUNT`, t1.`BUDGETAMOUNT_BASE`, t1.`BUDGETSTATUS`, t1.`CAMPAIGNID`, t1.`CAMPAIGNNAME`, t1.`CAPTUREPROPOSALFEEDBACK`, t1.`CLOSEPROBABILITY`, t1.`COMPLETEFINALPROPOSAL`, t1.`COMPLETEINTERNALREVIEW`, t1.`CONFIRMINTEREST`, t1.`CONTACTIDYOMINAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`CURRENTSITUATION`, t1.`CUSTOMERID`, t1.`CUSTOMERIDTYPE`, t1.`CUSTOMERIDYOMINAME`, t1.`CUSTOMERNEED`, t1.`CUSTOMERPAINPOINTS`, t1.`DECISIONMAKER`, t1.`DESCRIPTION`, t1.`DEVELOPPROPOSAL`, t1.`DISCOUNTAMOUNT`, t1.`DISCOUNTAMOUNT_BASE`, t1.`DISCOUNTPERCENTAGE`, t1.`EMAILADDRESS`, t1.`ESTIMATEDCLOSEDATE`, t1.`ESTIMATEDVALUE`, t1.`ESTIMATEDVALUE_BASE`, t1.`EVALUATEFIT`, t1.`EXCHANGERATE`, t1.`FILEDEBRIEF`, t1.`FINALDECISIONDATE`, t1.`FREIGHTAMOUNT`, t1.`FREIGHTAMOUNT_BASE`, t1.`IDENTIFYCOMPETITORS`, t1.`IDENTIFYCUSTOMERCONTACTS`, t1.`IDENTIFYPURSUITTEAM`, t1.`IMPORTSEQUENCENUMBER`, t1.`INITIALCOMMUNICATION`, t1.`LASTONHOLDTIME`, t1.`NEED`, t1.`ONHOLDTIME`, t1.`OPPORTUNITYID`, t1.`OPPORTUNITYNAME`, t1.`OPPORTUNITYRATINGCODE`, t1.`ORIGINATINGLEADID`, t1.`ORIGINATINGLEADNAME`, t1.`OVERRIDDENCREATEDON`, t1.`OWNERID`, t1.`OWNERIDTYPE`, t1.`OWNERIDYOMINAME`, t1.`PARENTACCOUNTID`, t1.`PARENTACCOUNTNAME`, t1.`PARENTCONTACTID`, t1.`PARENTCONTACTNAME`, t1.`PARTICIPATESINWORKFLOW`, t1.`PRESENTFINALPROPOSAL`, t1.`PRESENTPROPOSAL`, t1.`PRICELEVELID`, t1.`PRICELEVELNAME`, t1.`PRICINGERRORCODE`, t1.`PRIORITYCODE`, t1.`PRIVATE`, t1.`PROCESSID`, t1.`PROPOSEDSOLUTION`, t1.`PURCHASEPROCESS`, t1.`PURCHASETIMEFRAME`, t1.`PURSUITDECISION`, t1.`QUALIFICATIONCOMMENTS`, t1.`QUOTECOMMENTS`, t1.`RESOLVEFEEDBACK`, t1.`REVENUESYSTEMCALCULATED`, t1.`SALESSTAGE`, t1.`SALESSTAGECODE`, t1.`SCHEDULEFOLLOWUP_PROSPECT`, t1.`SCHEDULEFOLLOWUP_QUALIFY`, t1.`SCHEDULEPROPOSALMEETING`, t1.`SENDTHANKYOUNOTE`, t1.`SLAID`, t1.`SLANAME`, t1.`STAGEID`, t1.`STATECODE`, t1.`STATUSCODE`, t1.`STEPID`, t1.`STEPNAME`, t1.`TEAMSFOLLOWED`, t1.`TIMELINE`, t1.`TIMEZONERULEVERSIONNUMBER`, t1.`TOTALAMOUNT`, t1.`TOTALAMOUNTLESSFREIGHT`, t1.`TOTALAMOUNTLESSFREIGHT_BASE`, t1.`TOTALAMOUNT_BASE`, t1.`TOTALDISCOUNTAMOUNT`, t1.`TOTALDISCOUNTAMOUNT_BASE`, t1.`TOTALLINEITEMAMOUNT`, t1.`TOTALLINEITEMAMOUNT_BASE`, t1.`TOTALLINEITEMDISCOUNTAMOUNT`, t1.`TOTALTAX`, t1.`TOTALTAX_BASE`, t1.`TRANSACTIONCURRENCYID`, t1.`TRANSACTIONCURRENCYNAME`, t1.`TRAVERSEDPATH`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`UTCCONVERSIONTIMEZONECODE`, t1.`VERSIONNUMBER` FROM `OPPORTUNITY` t1
......
......@@ -103,8 +103,8 @@
"dename":"Opportunity",
"delogicname":"商机",
"sysmoudle":{"id":"SALES","name":"Sales"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"Top5" , "name":"Top5"}],
"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":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Lose" , "name":"作为弃单" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Win" , "name":"作为赢单" , "type":"USERCUSTOM" }],
"dedataset":[{"id":"Default" , "name":"DEFAULT"},{"id":"Lost" , "name":"丢单商机"},{"id":"Top5" , "name":"Top5"},{"id":"Win" , "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":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Lose" , "name":"作为弃单" , "type":"DELOGIC" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Win" , "name":"作为赢单" , "type":"DELOGIC" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
......
......@@ -4,11 +4,30 @@ import java.util.Map;
import java.util.HashMap;
import com.alibaba.fastjson.JSONObject;
global cn.ibizlab.businesscentral.core.sales.domain.Opportunity opportunitylostdefault;
global cn.ibizlab.businesscentral.core.sales.service.IOpportunityService opportunityservice;
global cn.ibizlab.businesscentral.core.sales.service.IOpportunityService iBzSysOpportunityDefaultService;
global cn.ibizlab.businesscentral.util.security.AuthenticationUser curuser;
no-loop
//逻辑处理节点[更新商机状态]
rule "deaction1"
ruleflow-group "opportunitylostdeaction1"
when
then
opportunityservice.update(opportunitylostdefault);
update(opportunitylostdefault);//更新fact中变量值
end
//逻辑处理节点[准备参数]
rule "prepareparam1"
ruleflow-group "opportunitylostprepareparam1"
when
then
opportunitylostdefault.set("statecode","2");
update(opportunitylostdefault);//更新fact中变量值
end
//逻辑处理节点[开始]
rule "begin"
ruleflow-group "opportunitylostbegin"
......
......@@ -7,9 +7,15 @@
<tns:import name="cn.ibizlab.businesscentral.util.helper.RuleUtils"/>
<tns:global identifier="opportunitylostdefault" type="cn.ibizlab.businesscentral.core.sales.domain.Opportunity" />
</extensionElements>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="opportunitylostdeaction1" id="C0540498-2E1D-4890-827A-A88E9ACB59CB" implementation="http://www.jboss.org/drools/rule" name="更新商机状态"/>
<endEvent id="C0540498-2E1D-4890-827A-A88E9ACB59CB_End" name="End"/>
<sequenceFlow id="C0540498-2E1D-4890-827A-A88E9ACB59CB_End_Line" sourceRef="C0540498-2E1D-4890-827A-A88E9ACB59CB" targetRef="C0540498-2E1D-4890-827A-A88E9ACB59CB_End"/>
<businessRuleTask activiti:exclusive="true" g:ruleFlowGroup="opportunitylostprepareparam1" id="20B58D4E-152B-4DE6-A072-A302E8934969" implementation="http://www.jboss.org/drools/rule" name="准备参数"/>
<startEvent id="B1D85A42-1233-42FF-A463-1506BAE6FB4E" isInterrupting="true"/>
<endEvent id="B1D85A42-1233-42FF-A463-1506BAE6FB4E_End" name="End"/>
<sequenceFlow id="B1D85A42-1233-42FF-A463-1506BAE6FB4E_End_Line" sourceRef="B1D85A42-1233-42FF-A463-1506BAE6FB4E" targetRef="B1D85A42-1233-42FF-A463-1506BAE6FB4E_End"/>
<sequenceFlow id="C1FB8523-D525-4744-AD03-23C475FB7727" sourceRef="20B58D4E-152B-4DE6-A072-A302E8934969" targetRef="C0540498-2E1D-4890-827A-A88E9ACB59CB">
</sequenceFlow>
<sequenceFlow id="3568EEA7-8E64-41D8-AE53-0C8997A0107D" sourceRef="B1D85A42-1233-42FF-A463-1506BAE6FB4E" targetRef="20B58D4E-152B-4DE6-A072-A302E8934969">
</sequenceFlow>
</process>
</definitions>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册