Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-finance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-finance
Commits
8778477c
Commit
8778477c
authored
Aug 29, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发票管理接口
parent
59efe7f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
2 deletions
+55
-2
InvoiceAccountApiServiceImpl.java
...ance/service/outer/impl/InvoiceAccountApiServiceImpl.java
+14
-1
InvoiceManageApiServiceImpl.java
...nance/service/outer/impl/InvoiceManageApiServiceImpl.java
+1
-1
InvoiceManageController.java
...m/gic/finance/web/controller/InvoiceManageController.java
+40
-0
No files found.
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/InvoiceAccountApiServiceImpl.java
View file @
8778477c
...
...
@@ -65,6 +65,19 @@ public class InvoiceAccountApiServiceImpl implements InvoiceAccountApiService {
}
@Override
public
ServiceResponse
<
Void
>
disable
(
Integer
id
)
{
TabInvoiceAccount
tab
=
invoiceAccountService
.
getById
(
id
);
if
(
tab
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"主键有误"
);
}
InvoiceAccountDTO
dto
=
new
InvoiceAccountDTO
();
dto
.
setInvoiceAccountId
(
id
);
dto
.
setStatus
(
0
);
invoiceAccountService
.
update
(
dto
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
InvoiceAccountDTO
>
getById
(
Integer
invoiceAccountId
)
{
TabInvoiceAccount
tab
=
invoiceAccountService
.
getById
(
invoiceAccountId
);
if
(
tab
==
null
)
{
...
...
@@ -77,7 +90,7 @@ public class InvoiceAccountApiServiceImpl implements InvoiceAccountApiService {
public
ServiceResponse
<
InvoiceAccountDTO
>
getEnable
()
{
TabInvoiceAccount
tab
=
invoiceAccountService
.
getEnable
();
if
(
tab
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"没有
开启数据,请添加
"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"没有
启用的开票户信息,请启用
"
);
}
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityNew
(
InvoiceAccountDTO
.
class
,
tab
));
}
...
...
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/InvoiceManageApiServiceImpl.java
View file @
8778477c
...
...
@@ -65,7 +65,7 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService{
//开票户信息插入
TabInvoiceAccount
account
=
invoiceAccountService
.
getEnable
();
if
(
account
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"
开票户信息未设置,请前往添加
"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"
没有启用的开票户信息,请启用
"
);
}
invoiceManageDTO
.
setInvoicerId
(
account
.
getInvoiceAccountId
());
invoiceManageService
.
update
(
invoiceManageDTO
);
...
...
gic-platform-finance-web/src/main/java/com/gic/finance/web/controller/InvoiceManageController.java
View file @
8778477c
...
...
@@ -78,6 +78,46 @@ public class InvoiceManageController {
}
/**
* 新增开票户信息
* @param dto
* @return
*/
@RequestMapping
(
"/save-invoice-account"
)
public
RestResponse
saveInvoiceAccount
(
InvoiceAccountDTO
dto
)
{
return
ResultControllerUtils
.
commonResult
(
invoiceAccountApiService
.
save
(
dto
));
}
/**
* 编辑开票户信息
* @param dto
* @return
*/
@RequestMapping
(
"/edit-invoice-account"
)
public
RestResponse
editInvoiceAccount
(
InvoiceAccountDTO
dto
)
{
return
ResultControllerUtils
.
commonResult
(
invoiceAccountApiService
.
update
(
dto
));
}
/**
* 开启开票户信息
* @param id
* @return
*/
@RequestMapping
(
"/enable-invoice-account"
)
public
RestResponse
enableInvoiceAccount
(
Integer
id
)
{
return
ResultControllerUtils
.
commonResult
(
invoiceAccountApiService
.
enable
(
id
));
}
/**
* 关闭开票户信息
* @param id
* @return
*/
@RequestMapping
(
"/disable-invoice-account"
)
public
RestResponse
disableInvoiceAccount
(
Integer
id
)
{
return
ResultControllerUtils
.
commonResult
(
invoiceAccountApiService
.
disable
(
id
));
}
/**
* 详情
* @param invoiceManageId
* @return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment