Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
e73df5cd
提交
e73df5cd
编写于
7月 10, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
3b20e7f0
变更
36
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
36 个修改的文件
包含
2860 行增加
和
1245 行删除
+2860
-1245
account_en_US.ts
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
+1
-0
account_zh_CN.ts
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
+1
-0
invoices.ts
app_CRM/src/mock/entity/invoices/invoices.ts
+653
-25
activity-pointer-grid-view.html
...ctivity-pointer-grid-view/activity-pointer-grid-view.html
+0
-3
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+73
-73
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+50
-50
competitor-service-base.ts
app_CRM/src/service/competitor/competitor-service-base.ts
+41
-41
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+131
-131
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+50
-50
cancel-logic-base.ts
app_CRM/src/service/invoice/cancel-logic-base.ts
+83
-0
cancel-logic.ts
app_CRM/src/service/invoice/cancel-logic.ts
+22
-0
invoice-service-base.ts
app_CRM/src/service/invoice/invoice-service-base.ts
+78
-0
paid-logic-base.ts
app_CRM/src/service/invoice/paid-logic-base.ts
+141
-0
paid-logic.ts
app_CRM/src/service/invoice/paid-logic.ts
+22
-0
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+223
-223
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+52
-52
quote-service-base.ts
app_CRM/src/service/quote/quote-service-base.ts
+259
-259
sales-order-service-base.ts
app_CRM/src/service/sales-order/sales-order-service-base.ts
+308
-308
main-grid-base.tsx
app_CRM/src/widgets/account/main-grid/main-grid-base.tsx
+8
-0
main-grid-model.ts
app_CRM/src/widgets/account/main-grid/main-grid-model.ts
+9
-4
main-grid.html
app_CRM/src/widgets/account/main-grid/main-grid.html
+12
-0
InvoiceMapper.java
...ab/businesscentral/core/finance/mapper/InvoiceMapper.java
+2
-0
IInvoiceService.java
...businesscentral/core/finance/service/IInvoiceService.java
+2
-0
InvoiceServiceImpl.java
...central/core/finance/service/impl/InvoiceServiceImpl.java
+18
-0
IInvoiceCancelLogic.java
...ntral/core/finance/service/logic/IInvoiceCancelLogic.java
+18
-0
IInvoicePaidLogic.java
...central/core/finance/service/logic/IInvoicePaidLogic.java
+18
-0
InvoiceCancelLogicImpl.java
...re/finance/service/logic/impl/InvoiceCancelLogicImpl.java
+56
-0
InvoicePaidLogicImpl.java
...core/finance/service/logic/impl/InvoicePaidLogicImpl.java
+64
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+21
-21
InvoiceMapper.xml
...c/main/resources/mapper/finance/invoice/InvoiceMapper.xml
+34
-4
systemResource.json
...al-core/src/main/resources/permission/systemResource.json
+1
-1
InvoiceCancelRule.drl
...ntral-core/src/main/resources/rules/InvoiceCancelRule.drl
+18
-0
InvoiceCancelRuleFlow.bpmn
...-core/src/main/resources/rules/InvoiceCancelRuleFlow.bpmn
+15
-0
InvoicePaidRule.drl
...central-core/src/main/resources/rules/InvoicePaidRule.drl
+37
-0
InvoicePaidRuleFlow.bpmn
...al-core/src/main/resources/rules/InvoicePaidRuleFlow.bpmn
+21
-0
InvoiceResource.java
...zlab/businesscentral/centralapi/rest/InvoiceResource.java
+318
-0
未找到文件。
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
浏览文件 @
e73df5cd
...
...
@@ -665,6 +665,7 @@ export default {
address1_city
:
"地址 1: 市/县"
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
revenue
:
"年收入"
,
parentaccountname
:
"上级客户"
,
},
uiactions
:
{
...
...
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
浏览文件 @
e73df5cd
...
...
@@ -664,6 +664,7 @@ export default {
address1_city
:
"地址 1: 市/县"
,
primarycontactname
:
"主要联系人"
,
emailaddress1
:
"电子邮件"
,
revenue
:
"年收入"
,
parentaccountname
:
"上级客户"
,
},
uiactions
:
{
...
...
app_CRM/src/mock/entity/invoices/invoices.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/pages/base/activity-pointer-grid-view/activity-pointer-grid-view.html
浏览文件 @
e73df5cd
<studio-view-style2
viewName=
"activitypointergridview"
viewTitle=
"活动"
class=
'degridview activity-pointer-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=
"quickGroupSearch"
>
<app-quick-group
:items=
"quickGroupModel"
@
valuechange=
"quickGroupValueChange($event)"
></app-quick-group>
...
...
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
e73df5cd
...
...
@@ -62,21 +62,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
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
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -107,6 +92,21 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
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
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -116,9 +116,9 @@ export default class CampaignServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -133,21 +133,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
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
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -178,11 +163,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
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
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/campaigns/
${
context
.
campaign
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -210,9 +210,9 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/
${
context
.
campaign
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -228,9 +228,9 @@ export default class CampaignServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/campaigns/getdraft`
,
isloading
);
res
.
data
.
campaign
=
data
.
campaign
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
@@ -258,21 +258,6 @@ export default class CampaignServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
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
campaignlistsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
),
'undefined'
)){
campaignlistsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_campaignlists'
)
as
any
);
...
...
@@ -303,11 +288,26 @@ export default class CampaignServiceBase extends EntityService {
}
}
masterData
.
campaigncampaigns
=
campaigncampaignsData
;
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
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/campaigns/
${
context
.
campaign
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaignlists'
,
JSON
.
stringify
(
res
.
data
.
campaignlists
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_campaigncampaigns'
,
JSON
.
stringify
(
res
.
data
.
campaigncampaigns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_leads'
,
JSON
.
stringify
(
res
.
data
.
leads
));
return
res
;
}
...
...
app_CRM/src/service/competitor/competitor-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/invoice/cancel-logic-base.ts
0 → 100644
浏览文件 @
e73df5cd
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 取消发票
*
* @export
* @class CancelLogicBase
*/
export
default
class
CancelLogicBase
{
/**
* 名称
*
* @memberof CancelLogicBase
*/
private
name
:
string
=
"Cancel"
;
/**
* 唯一标识
*
* @memberof CancelLogicBase
*/
private
id
:
string
=
"9A2B78B2-DC42-4EE1-96D4-507FAB73DE1D"
;
/**
* 默认参数名称
*
* @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
);
}
/**
* 执行逻辑
*
* @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
){
//开始节点
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
\ No newline at end of file
app_CRM/src/service/invoice/cancel-logic.ts
0 → 100644
浏览文件 @
e73df5cd
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
app_CRM/src/service/invoice/invoice-service-base.ts
浏览文件 @
e73df5cd
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
import
CancelLogic
from
'@/service/invoice/cancel-logic'
;
import
PaidLogic
from
'@/service/invoice/paid-logic'
;
...
...
@@ -1356,6 +1358,44 @@ export default class InvoiceServiceBase extends EntityService {
return
Http
.
getInstance
().
get
(
`/invoices/fetchbyparentkey`
,
tempData
,
isloading
);
}
/**
* FetchCancel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceServiceBase
*/
public
async
FetchCancel
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchcancel`
,
tempData
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchcancel`
,
tempData
,
isloading
);
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchcancel`
,
tempData
,
isloading
);
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchcancel`
,
tempData
,
isloading
);
}
if
(
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchcancel`
,
tempData
,
isloading
);
}
if
(
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/salesorders/
${
context
.
salesorder
}
/invoices/fetchcancel`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/invoices/fetchcancel`
,
tempData
,
isloading
);
}
/**
* FetchDefault接口方法
*
...
...
@@ -1393,4 +1433,42 @@ export default class InvoiceServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/invoices/fetchdefault`
,
tempData
,
isloading
);
}
/**
* FetchPaid接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof InvoiceServiceBase
*/
public
async
FetchPaid
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
account
&&
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchpaid`
,
tempData
,
isloading
);
}
if
(
context
.
contact
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/contacts/
${
context
.
contact
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchpaid`
,
tempData
,
isloading
);
}
if
(
context
.
account
&&
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/accounts/
${
context
.
account
}
/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchpaid`
,
tempData
,
isloading
);
}
if
(
context
.
opportunity
&&
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/opportunities/
${
context
.
opportunity
}
/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchpaid`
,
tempData
,
isloading
);
}
if
(
context
.
quote
&&
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/quotes/
${
context
.
quote
}
/salesorders/
${
context
.
salesorder
}
/invoices/fetchpaid`
,
tempData
,
isloading
);
}
if
(
context
.
salesorder
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/salesorders/
${
context
.
salesorder
}
/invoices/fetchpaid`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/invoices/fetchpaid`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_CRM/src/service/invoice/paid-logic-base.ts
0 → 100644
浏览文件 @
e73df5cd
import
InvoiceService
from
'@/service/invoice/invoice-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 发票已支付
*
* @export
* @class PaidLogicBase
*/
export
default
class
PaidLogicBase
{
/**
* 名称
*
* @memberof PaidLogicBase
*/
private
name
:
string
=
"Paid"
;
/**
* 唯一标识
*
* @memberof PaidLogicBase
*/
private
id
:
string
=
"72CD98D0-46C7-4BE7-9FE6-44BB8CE4E5FC"
;
/**
* 默认参数名称
*
* @memberof PaidLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof PaidLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of PaidLogicBase.
*
* @param {*} [opts={}]
* @memberof PaidLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof PaidLogicBase
*/
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
,{
statecode
:
"2"
});
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
:
InvoiceService
=
new
InvoiceService
();
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
app_CRM/src/service/invoice/paid-logic.ts
0 → 100644
浏览文件 @
e73df5cd
import
{
Http
,
Util
}
from
'@/utils'
;
import
PaidLogicBase
from
'./paid-logic-base'
;
/**
* 发票已支付
*
* @export
* @class PaidLogic
*/
export
default
class
PaidLogic
extends
PaidLogicBase
{
/**
* Creates an instance of PaidLogic
*
* @param {*} [opts={}]
* @memberof PaidLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/quote/quote-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/service/sales-order/sales-order-service-base.ts
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
app_CRM/src/widgets/account/main-grid/main-grid-base.tsx
浏览文件 @
e73df5cd
...
...
@@ -100,6 +100,13 @@ export class MainGridBase extends GridControllerBase {
show
:
true
,
util
:
'PX'
},
{
name
:
'revenue'
,
label
:
'年收入'
,
langtag
:
'entities.account.main_grid.columns.revenue'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'parentaccountname'
,
label
:
'上级客户'
,
...
...
@@ -146,6 +153,7 @@ export class MainGridBase extends GridControllerBase {
'address1_city'
:
false
,
'primarycontactname'
:
false
,
'emailaddress1'
:
false
,
'revenue'
:
false
,
'parentaccountname'
:
false
,
};
...
...
app_CRM/src/widgets/account/main-grid/main-grid-model.ts
浏览文件 @
e73df5cd
...
...
@@ -97,13 +97,13 @@ export default class MainModel {
dataType
:
'TEXT'
,
},
{
name
:
'
originatinglead
id'
,
prop
:
'
originatinglead
id'
,
name
:
'
parentaccount
id'
,
prop
:
'
parentaccount
id'
,
dataType
:
'PICKUP'
,
},
{
name
:
'
parentaccount
id'
,
prop
:
'
parentaccount
id'
,
name
:
'
originatinglead
id'
,
prop
:
'
originatinglead
id'
,
dataType
:
'PICKUP'
,
},
{
...
...
@@ -116,6 +116,11 @@ export default class MainModel {
prop
:
'address1_city'
,
dataType
:
'TEXT'
,
},
{
name
:
'revenue'
,
prop
:
'revenue'
,
dataType
:
'BIGDECIMAL'
,
},
{
name
:
'account'
,
prop
:
'accountid'
,
...
...
app_CRM/src/widgets/account/main-grid/main-grid.html
浏览文件 @
e73df5cd
...
...
@@ -83,6 +83,18 @@
</template>
</el-table-column>
</template>
<template
v-if=
"getColumnState('revenue')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'revenue'"
:label=
"$t('entities.account.main_grid.columns.revenue')"
:width=
"100"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"{column}"
>
<span
class=
"column-header "
>
{{$t('entities.account.main_grid.columns.revenue')}}
</span>
</template>
<template
v-slot=
"{row,column,$index}"
>
<span>
{{row.revenue}}
</span>
</template>
</el-table-column>
</template>
<template
v-if=
"getColumnState('parentaccountname')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'parentaccountname'"
:label=
"$t('entities.account.main_grid.columns.parentaccountname')"
:width=
"200"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"{column}"
>
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/mapper/InvoiceMapper.java
浏览文件 @
e73df5cd
...
...
@@ -20,7 +20,9 @@ import com.alibaba.fastjson.JSONObject;
public
interface
InvoiceMapper
extends
BaseMapper
<
Invoice
>{
Page
<
Invoice
>
searchByParentKey
(
IPage
page
,
@Param
(
"srf"
)
InvoiceSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Invoice
>
wrapper
)
;
Page
<
Invoice
>
searchCancel
(
IPage
page
,
@Param
(
"srf"
)
InvoiceSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Invoice
>
wrapper
)
;
Page
<
Invoice
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
InvoiceSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Invoice
>
wrapper
)
;
Page
<
Invoice
>
searchPaid
(
IPage
page
,
@Param
(
"srf"
)
InvoiceSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Invoice
>
wrapper
)
;
@Override
Invoice
selectById
(
Serializable
id
);
@Override
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/service/IInvoiceService.java
浏览文件 @
e73df5cd
...
...
@@ -40,7 +40,9 @@ public interface IInvoiceService extends IService<Invoice>{
boolean
save
(
Invoice
et
)
;
void
saveBatch
(
List
<
Invoice
>
list
)
;
Page
<
Invoice
>
searchByParentKey
(
InvoiceSearchContext
context
)
;
Page
<
Invoice
>
searchCancel
(
InvoiceSearchContext
context
)
;
Page
<
Invoice
>
searchDefault
(
InvoiceSearchContext
context
)
;
Page
<
Invoice
>
searchPaid
(
InvoiceSearchContext
context
)
;
List
<
Invoice
>
selectByOpportunityid
(
String
opportunityid
)
;
void
removeByOpportunityid
(
String
opportunityid
)
;
List
<
Invoice
>
selectByPricelevelid
(
String
pricelevelid
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/service/impl/InvoiceServiceImpl.java
浏览文件 @
e73df5cd
...
...
@@ -247,6 +247,15 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
return
new
PageImpl
<
Invoice
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 已取消
*/
@Override
public
Page
<
Invoice
>
searchCancel
(
InvoiceSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Invoice
>
pages
=
baseMapper
.
searchCancel
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Invoice
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 DEFAULT
*/
...
...
@@ -256,6 +265,15 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
return
new
PageImpl
<
Invoice
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 已支付
*/
@Override
public
Page
<
Invoice
>
searchPaid
(
InvoiceSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Invoice
>
pages
=
baseMapper
.
searchPaid
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Invoice
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/service/logic/IInvoiceCancelLogic.java
0 → 100644
浏览文件 @
e73df5cd
package
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
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.finance.domain.Invoice
;
/**
* 关系型数据实体[Cancel] 对象
*/
public
interface
IInvoiceCancelLogic
{
void
execute
(
Invoice
invoice
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/service/logic/IInvoicePaidLogic.java
0 → 100644
浏览文件 @
e73df5cd
package
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
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.finance.domain.Invoice
;
/**
* 关系型数据实体[Paid] 对象
*/
public
interface
IInvoicePaidLogic
{
void
execute
(
Invoice
invoice
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/service/logic/impl/InvoiceCancelLogicImpl.java
0 → 100644
浏览文件 @
e73df5cd
package
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
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.finance.service.logic.IInvoiceCancelLogic
;
import
cn.ibizlab.businesscentral.core.finance.domain.Invoice
;
/**
* 关系型数据实体[Cancel] 对象
*/
@Slf4j
@Service
public
class
InvoiceCancelLogicImpl
implements
IInvoiceCancelLogic
{
@Autowired
private
KieContainer
kieContainer
;
@Autowired
private
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
iBzSysDefaultService
;
public
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
getIBzSysDefaultService
()
{
return
this
.
iBzSysDefaultService
;
}
public
void
execute
(
Invoice
et
){
KieSession
kieSession
=
null
;
try
{
kieSession
=
kieContainer
.
newKieSession
();
kieSession
.
insert
(
et
);
kieSession
.
setGlobal
(
"invoicecanceldefault"
,
et
);
kieSession
.
setGlobal
(
"iBzSysInvoiceDefaultService"
,
iBzSysDefaultService
);
kieSession
.
setGlobal
(
"curuser"
,
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
AuthenticationUser
.
getAuthenticationUser
());
kieSession
.
startProcess
(
"cn.ibizlab.businesscentral.core.finance.service.logic.invoicecancel"
);
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
"执行[取消发票]处理逻辑发生异常"
+
e
);
}
finally
{
if
(
kieSession
!=
null
)
kieSession
.
destroy
();
}
}
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/finance/service/logic/impl/InvoicePaidLogicImpl.java
0 → 100644
浏览文件 @
e73df5cd
package
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
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.finance.service.logic.IInvoicePaidLogic
;
import
cn.ibizlab.businesscentral.core.finance.domain.Invoice
;
/**
* 关系型数据实体[Paid] 对象
*/
@Slf4j
@Service
public
class
InvoicePaidLogicImpl
implements
IInvoicePaidLogic
{
@Autowired
private
KieContainer
kieContainer
;
@Autowired
private
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
invoiceservice
;
public
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
getInvoiceService
()
{
return
this
.
invoiceservice
;
}
@Autowired
private
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
iBzSysDefaultService
;
public
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
getIBzSysDefaultService
()
{
return
this
.
iBzSysDefaultService
;
}
public
void
execute
(
Invoice
et
){
KieSession
kieSession
=
null
;
try
{
kieSession
=
kieContainer
.
newKieSession
();
kieSession
.
insert
(
et
);
kieSession
.
setGlobal
(
"invoicepaiddefault"
,
et
);
kieSession
.
setGlobal
(
"invoiceservice"
,
invoiceservice
);
kieSession
.
setGlobal
(
"iBzSysInvoiceDefaultService"
,
iBzSysDefaultService
);
kieSession
.
setGlobal
(
"curuser"
,
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
AuthenticationUser
.
getAuthenticationUser
());
kieSession
.
startProcess
(
"cn.ibizlab.businesscentral.core.finance.service.logic.invoicepaid"
);
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
"执行[发票已支付]处理逻辑发生异常"
+
e
);
}
finally
{
if
(
kieSession
!=
null
)
kieSession
.
destroy
();
}
}
}
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/mapper/finance/invoice/InvoiceMapper.xml
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/permission/systemResource.json
浏览文件 @
e73df5cd
...
...
@@ -119,7 +119,7 @@
"dename"
:
"Invoice"
,
"delogicname"
:
"发票"
,
"sysmoudle"
:{
"id"
:
"FINANCE"
,
"name"
:
"Finance"
},
"dedataset"
:[{
"id"
:
"ByParentKey"
,
"name"
:
"ByParentKey"
},{
"id"
:
"
Default"
,
"name"
:
"DEFAULT
"
}],
"dedataset"
:[{
"id"
:
"ByParentKey"
,
"name"
:
"ByParentKey"
},{
"id"
:
"
Cancel"
,
"name"
:
"已取消"
},{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
},{
"id"
:
"Paid"
,
"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"
:
"Cancel"
,
"name"
:
"取消发票"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Finish"
,
"name"
:
"确认发票"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Paid"
,
"name"
:
"发票已支付"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
...
...
businesscentral-core/src/main/resources/rules/InvoiceCancelRule.drl
0 → 100644
浏览文件 @
e73df5cd
package
cn
.
ibizlab
.
businesscentral
.
finance
.
logic
.
invoicelogic
.
cancel
;
import
java
.
util
.
Map
;
import
java
.
util
.
HashMap
;
import
com
.
alibaba
.
fastjson
.
JSONObject
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
domain
.
Invoice
invoicecanceldefault
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
iBzSysInvoiceDefaultService
;
global
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
AuthenticationUser
curuser
;
no
-
loop
//
逻辑处理节点
[
开始
]
rule
"begin"
ruleflow
-
group
"invoicecancelbegin"
when
then
end
businesscentral-core/src/main/resources/rules/InvoiceCancelRuleFlow.bpmn
0 → 100644
浏览文件 @
e73df5cd
<?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.finance.service.logic.invoicecancel"
isClosed=
"false"
isExecutable=
"true"
name=
"ScoreRule"
processType=
"Private"
tns:packageName=
"cn.ibizlab.businesscentral.core.finance.service.logic.invoicecancel"
>
<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=
"invoicecanceldefault"
type=
"cn.ibizlab.businesscentral.core.finance.domain.Invoice"
/>
</extensionElements>
<startEvent
id=
"9A2B78B2-DC42-4EE1-96D4-507FAB73DE1D"
isInterrupting=
"true"
/>
<endEvent
id=
"9A2B78B2-DC42-4EE1-96D4-507FAB73DE1D_End"
name=
"End"
/>
<sequenceFlow
id=
"9A2B78B2-DC42-4EE1-96D4-507FAB73DE1D_End_Line"
sourceRef=
"9A2B78B2-DC42-4EE1-96D4-507FAB73DE1D"
targetRef=
"9A2B78B2-DC42-4EE1-96D4-507FAB73DE1D_End"
/>
</process>
</definitions>
businesscentral-core/src/main/resources/rules/InvoicePaidRule.drl
0 → 100644
浏览文件 @
e73df5cd
package
cn
.
ibizlab
.
businesscentral
.
finance
.
logic
.
invoicelogic
.
paid
;
import
java
.
util
.
Map
;
import
java
.
util
.
HashMap
;
import
com
.
alibaba
.
fastjson
.
JSONObject
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
domain
.
Invoice
invoicepaiddefault
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
invoiceservice
;
global
cn
.
ibizlab
.
businesscentral
.
core
.
finance
.
service
.
IInvoiceService
iBzSysInvoiceDefaultService
;
global
cn
.
ibizlab
.
businesscentral
.
util
.
security
.
AuthenticationUser
curuser
;
no
-
loop
//
逻辑处理节点
[
准备参数
]
rule
"prepareparam1"
ruleflow
-
group
"invoicepaidprepareparam1"
when
then
invoicepaiddefault
.
set
(
"statecode"
,
"2"
);
update
(
invoicepaiddefault
);//
更新
fact
中变量值
end
//
逻辑处理节点
[
开始
]
rule
"begin"
ruleflow
-
group
"invoicepaidbegin"
when
then
end
//
逻辑处理节点
[
更新发票状态
]
rule
"deaction1"
ruleflow
-
group
"invoicepaiddeaction1"
when
then
invoiceservice
.
update
(
invoicepaiddefault
);
update
(
invoicepaiddefault
);//
更新
fact
中变量值
end
businesscentral-core/src/main/resources/rules/InvoicePaidRuleFlow.bpmn
0 → 100644
浏览文件 @
e73df5cd
<?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.finance.service.logic.invoicepaid"
isClosed=
"false"
isExecutable=
"true"
name=
"ScoreRule"
processType=
"Private"
tns:packageName=
"cn.ibizlab.businesscentral.core.finance.service.logic.invoicepaid"
>
<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=
"invoicepaiddefault"
type=
"cn.ibizlab.businesscentral.core.finance.domain.Invoice"
/>
</extensionElements>
<businessRuleTask
activiti:exclusive=
"true"
g:ruleFlowGroup=
"invoicepaidprepareparam1"
id=
"C0E66037-E024-43BE-B1B2-CEDA60C832EE"
implementation=
"http://www.jboss.org/drools/rule"
name=
"准备参数"
/>
<startEvent
id=
"72CD98D0-46C7-4BE7-9FE6-44BB8CE4E5FC"
isInterrupting=
"true"
/>
<businessRuleTask
activiti:exclusive=
"true"
g:ruleFlowGroup=
"invoicepaiddeaction1"
id=
"E6819088-CA61-43E5-80E4-6720891C5F57"
implementation=
"http://www.jboss.org/drools/rule"
name=
"更新发票状态"
/>
<endEvent
id=
"E6819088-CA61-43E5-80E4-6720891C5F57_End"
name=
"End"
/>
<sequenceFlow
id=
"E6819088-CA61-43E5-80E4-6720891C5F57_End_Line"
sourceRef=
"E6819088-CA61-43E5-80E4-6720891C5F57"
targetRef=
"E6819088-CA61-43E5-80E4-6720891C5F57_End"
/>
<sequenceFlow
id=
"B6C47053-84A3-4EB7-8DFD-3532F5597DAA"
sourceRef=
"72CD98D0-46C7-4BE7-9FE6-44BB8CE4E5FC"
targetRef=
"C0E66037-E024-43BE-B1B2-CEDA60C832EE"
>
</sequenceFlow>
<sequenceFlow
id=
"7DA904A6-9E90-4FC8-A46F-E91620F1B28D"
sourceRef=
"C0E66037-E024-43BE-B1B2-CEDA60C832EE"
targetRef=
"E6819088-CA61-43E5-80E4-6720891C5F57"
>
</sequenceFlow>
</process>
</definitions>
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/InvoiceResource.java
浏览文件 @
e73df5cd
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录