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
1f590b6a
Commit
1f590b6a
authored
Sep 27, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
财务管理统一添加操作人相关信息
parent
4422fb0c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
40 deletions
+59
-40
CashWithdrawalApiServiceImpl.java
...ance/service/outer/impl/CashWithdrawalApiServiceImpl.java
+9
-10
InvoiceManageApiServiceImpl.java
...nance/service/outer/impl/InvoiceManageApiServiceImpl.java
+9
-10
TransferAccountsApprovalApiServiceImpl.java
...ce/outer/impl/TransferAccountsApprovalApiServiceImpl.java
+9
-10
CashWithdrawalController.java
.../gic/finance/web/controller/CashWithdrawalController.java
+7
-3
InvoiceManageController.java
...m/gic/finance/web/controller/InvoiceManageController.java
+6
-5
TransferAccountsApprovalController.java
...ce/web/controller/TransferAccountsApprovalController.java
+5
-2
UserInfoUtils.java
...rc/main/java/com/gic/finance/web/utils/UserInfoUtils.java
+14
-0
No files found.
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/CashWithdrawalApiServiceImpl.java
View file @
1f590b6a
...
...
@@ -4,6 +4,7 @@ import java.util.Date;
import
com.gic.enterprise.base.UserInfo
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.finance.dto.OperationUserInfoDTO
;
import
com.gic.finance.util.AsynCallbackUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -67,13 +68,13 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
}
@Override
public
ServiceResponse
<
Void
>
approval
(
Integer
id
)
{
public
ServiceResponse
<
Void
>
approval
(
Integer
id
,
OperationUserInfoDTO
dto
)
{
TabCashWithdrawal
record
=
cashWithdrawalService
.
getById
(
id
);
if
(
record
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数有误,无此记录"
);
}
// 操作人相关信息
getOperationUserInfo
(
record
);
getOperationUserInfo
(
record
,
dto
);
record
.
setCashWithdrawalStatus
(
WithdrawalStatusEnum
.
PASS
.
getCode
());
cashWithdrawalService
.
update
(
record
);
...
...
@@ -90,7 +91,7 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
}
@Override
public
ServiceResponse
<
Void
>
reject
(
Integer
id
,
String
rejectReason
)
{
public
ServiceResponse
<
Void
>
reject
(
Integer
id
,
String
rejectReason
,
OperationUserInfoDTO
dto
)
{
if
(
StringUtils
.
isBlank
(
rejectReason
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"驳回理由不能为空"
);
}
...
...
@@ -99,7 +100,7 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数有误,无此记录"
);
}
// 操作人相关信息
getOperationUserInfo
(
record
);
getOperationUserInfo
(
record
,
dto
);
record
.
setCashWithdrawalStatus
(
WithdrawalStatusEnum
.
REJECT
.
getCode
());
record
.
setRejectReason
(
rejectReason
);
...
...
@@ -147,12 +148,10 @@ public class CashWithdrawalApiServiceImpl implements CashWithdrawalApiService{
return
ServiceResponse
.
success
(
resultPage
);
}
private
void
getOperationUserInfo
(
TabCashWithdrawal
record
)
{
UserInfo
userInfo
=
UserDetailUtils
.
getUserDetail
().
getUserInfo
();
record
.
setOperatorId
(
userInfo
.
getUserId
().
toString
());
record
.
setOperatorName
(
userInfo
.
getUserName
());
record
.
setOperatorPhone
(
userInfo
.
getPhoneNumber
());
record
.
setOperatorPhoneAreaCode
(
userInfo
.
getPhoneAreaCode
());
private
void
getOperationUserInfo
(
TabCashWithdrawal
record
,
OperationUserInfoDTO
userInfo
)
{
record
.
setOperatorId
(
userInfo
.
getId
().
toString
());
record
.
setOperatorName
(
userInfo
.
getRealName
());
record
.
setOperatorPhone
(
userInfo
.
getUserMobile
());
record
.
setOperatorTime
(
new
Date
());
}
...
...
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/InvoiceManageApiServiceImpl.java
View file @
1f590b6a
...
...
@@ -4,6 +4,7 @@ import java.util.Date;
import
com.gic.enterprise.base.UserInfo
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.finance.dto.OperationUserInfoDTO
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -83,7 +84,7 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
}
@Override
public
ServiceResponse
<
Void
>
invoice
(
Integer
invoiceManageId
,
String
expressMailName
,
String
expressMailNumber
)
{
public
ServiceResponse
<
Void
>
invoice
(
Integer
invoiceManageId
,
String
expressMailName
,
String
expressMailNumber
,
OperationUserInfoDTO
dto
)
{
TabInvoiceManage
tabInvoiceManage
=
invoiceManageService
.
getById
(
invoiceManageId
);
if
(
tabInvoiceManage
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发票管理主键有误"
);
...
...
@@ -104,7 +105,7 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
tabInvoiceManage
.
setExpressMailName
(
expressMailName
);
tabInvoiceManage
.
setExpressMailNumber
(
expressMailNumber
);
}
getOperationUserInfo
(
invoiceManageDTO
);
getOperationUserInfo
(
invoiceManageDTO
,
dto
);
//开票户信息插入
TabInvoiceAccount
account
=
invoiceAccountService
.
getEnable
();
...
...
@@ -124,7 +125,7 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
}
@Override
public
ServiceResponse
<
Void
>
rejectInvoice
(
Integer
invoiceManageId
,
String
rejectReason
)
{
public
ServiceResponse
<
Void
>
rejectInvoice
(
Integer
invoiceManageId
,
String
rejectReason
,
OperationUserInfoDTO
dto
)
{
TabInvoiceManage
tabInvoiceManage
=
invoiceManageService
.
getById
(
invoiceManageId
);
if
(
tabInvoiceManage
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发票管理主键有误"
);
...
...
@@ -136,7 +137,7 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"驳回理由不能为空"
);
}
invoiceManageDTO
.
setRejectReason
(
rejectReason
);
getOperationUserInfo
(
invoiceManageDTO
);
getOperationUserInfo
(
invoiceManageDTO
,
dto
);
invoiceManageService
.
update
(
invoiceManageDTO
);
...
...
@@ -199,12 +200,10 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
return
ServiceResponse
.
success
();
}
private
void
getOperationUserInfo
(
InvoiceManageDTO
dto
)
{
UserInfo
userInfo
=
UserDetailUtils
.
getUserDetail
().
getUserInfo
();
dto
.
setOperatorId
(
userInfo
.
getUserId
().
toString
());
dto
.
setOperatorName
(
userInfo
.
getUserName
());
dto
.
setOperatorPhone
(
userInfo
.
getPhoneNumber
());
dto
.
setOperatorPhoneAreaCode
(
userInfo
.
getPhoneAreaCode
());
private
void
getOperationUserInfo
(
InvoiceManageDTO
dto
,
OperationUserInfoDTO
userInfo
)
{
dto
.
setOperatorId
(
userInfo
.
getId
().
toString
());
dto
.
setOperatorName
(
userInfo
.
getRealName
());
dto
.
setOperatorPhone
(
userInfo
.
getUserMobile
());
dto
.
setOperatorTime
(
new
Date
());
}
}
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/TransferAccountsApprovalApiServiceImpl.java
View file @
1f590b6a
...
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
com.gic.enterprise.base.UserInfo
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.finance.dto.OperationUserInfoDTO
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.dubbo.config.ReferenceConfig
;
import
org.apache.dubbo.config.RegistryConfig
;
...
...
@@ -134,7 +135,7 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
}
@Override
public
ServiceResponse
<
Void
>
agreeApproval
(
Integer
transferApprovalId
,
Double
accountAmount
)
{
public
ServiceResponse
<
Void
>
agreeApproval
(
Integer
transferApprovalId
,
Double
accountAmount
,
OperationUserInfoDTO
userInfoDTO
)
{
TabTransferAccountsApproval
tab
=
transferAccountsApprovalService
.
getById
(
transferApprovalId
);
if
(
tab
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"转账审批主键有误"
);
...
...
@@ -149,7 +150,7 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
dto
.
setApprovalStatus
(
TransferAccountApprovalStatusEnum
.
AGREE
.
getCode
());
// 审批人等信息获取插入
operationUserInfo
(
dto
);
operationUserInfo
(
dto
,
userInfoDTO
);
//回调所需参数
tab
.
setAccountAmount
(
accountAmount
);
...
...
@@ -163,7 +164,7 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
}
@Override
public
ServiceResponse
<
Void
>
rejectApproval
(
Integer
transferApprovalId
)
{
public
ServiceResponse
<
Void
>
rejectApproval
(
Integer
transferApprovalId
,
OperationUserInfoDTO
userInfoDTO
)
{
TabTransferAccountsApproval
tab
=
transferAccountsApprovalService
.
getById
(
transferApprovalId
);
if
(
tab
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"转账审批主键有误"
);
...
...
@@ -172,7 +173,7 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
dto
.
setTransferApprovalId
(
transferApprovalId
);
dto
.
setApprovalStatus
(
TransferAccountApprovalStatusEnum
.
REJECT
.
getCode
());
// 审批人等信息获取插入
operationUserInfo
(
dto
);
operationUserInfo
(
dto
,
userInfoDTO
);
//回调所需参数
tab
.
setApprovalStatus
(
TransferAccountApprovalStatusEnum
.
REJECT
.
getCode
());
...
...
@@ -259,12 +260,10 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
genericService
.
$invoke
(
method
,
new
String
[]{
String
.
class
.
getName
()},
new
String
[]{
JSONObject
.
toJSONString
(
tab
)});
}
private
void
operationUserInfo
(
TransferAccountsApprovalDTO
dto
)
{
UserInfo
userInfo
=
UserDetailUtils
.
getUserDetail
().
getUserInfo
();
dto
.
setApprovalId
(
userInfo
.
getUserId
().
toString
());
dto
.
setApprovalName
(
userInfo
.
getUserName
());
dto
.
setApprovalPhone
(
userInfo
.
getPhoneNumber
());
dto
.
setApprovalPhoneAreaCode
(
userInfo
.
getPhoneAreaCode
());
private
void
operationUserInfo
(
TransferAccountsApprovalDTO
dto
,
OperationUserInfoDTO
userInfoDTO
)
{
dto
.
setApprovalId
(
userInfoDTO
.
getId
().
toString
());
dto
.
setApprovalName
(
userInfoDTO
.
getRealName
());
dto
.
setApprovalPhone
(
userInfoDTO
.
getUserMobile
());
dto
.
setApprovalTime
(
new
Date
());
}
}
gic-platform-finance-web/src/main/java/com/gic/finance/web/controller/CashWithdrawalController.java
View file @
1f590b6a
...
...
@@ -3,6 +3,7 @@ package com.gic.finance.web.controller;
import
com.gic.finance.dto.CashWithdrawalDTO
;
import
com.gic.finance.qo.CashWithdrawalQueryListQO
;
import
com.gic.finance.service.CashWithdrawalApiService
;
import
com.gic.finance.web.utils.UserInfoUtils
;
import
com.gic.finance.web.vo.CashWithdrawalDetailVO
;
import
com.gic.finance.web.vo.CashWithdrawalListVO
;
import
org.slf4j.Logger
;
...
...
@@ -136,7 +137,8 @@ public class CashWithdrawalController {
*/
@RequestMapping
(
"/approval"
)
public
RestResponse
approval
(
Integer
id
)
{
return
ResultControllerUtils
.
commonResult
(
cashWithdrawalApiService
.
approval
(
id
));
return
ResultControllerUtils
.
commonResult
(
cashWithdrawalApiService
.
approval
(
id
,
UserInfoUtils
.
getOpertaionUserInfo
()));
}
@RequestMapping
(
"/save"
)
...
...
@@ -155,7 +157,8 @@ public class CashWithdrawalController {
*/
@RequestMapping
(
"/reject"
)
public
RestResponse
reject
(
Integer
id
,
String
rejectReason
)
{
return
ResultControllerUtils
.
commonResult
(
cashWithdrawalApiService
.
reject
(
id
,
rejectReason
));
return
ResultControllerUtils
.
commonResult
(
cashWithdrawalApiService
.
reject
(
id
,
rejectReason
,
UserInfoUtils
.
getOpertaionUserInfo
()));
}
/**
...
...
@@ -175,6 +178,7 @@ public class CashWithdrawalController {
@RequestMapping
(
"/get-detail"
)
public
RestResponse
getDetail
(
Integer
id
)
{
return
ResultControllerUtils
.
commonResultOne
(
cashWithdrawalApiService
.
getDetail
(
id
),
CashWithdrawalDetailVO
.
class
);
return
ResultControllerUtils
.
commonResultOne
(
cashWithdrawalApiService
.
getDetail
(
id
),
CashWithdrawalDetailVO
.
class
);
}
}
gic-platform-finance-web/src/main/java/com/gic/finance/web/controller/InvoiceManageController.java
View file @
1f590b6a
...
...
@@ -5,6 +5,7 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.finance.dto.InvoiceAccountDTO
;
import
com.gic.finance.service.InvoiceAccountApiService
;
import
com.gic.finance.web.utils.UserInfoUtils
;
import
com.gic.finance.web.vo.InvoiceManagerDetailVO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -53,7 +54,7 @@ public class InvoiceManageController {
@RequestMapping
(
"/invoice"
)
public
RestResponse
invoice
(
InvoiceManageDTO
dto
)
{
return
ResultControllerUtils
.
commonResult
(
invoiceManageApiService
.
invoice
(
dto
.
getInvoiceManageId
(),
dto
.
getExpressMailName
(),
dto
.
getExpressMailNumber
()));
dto
.
getExpressMailName
(),
dto
.
getExpressMailNumber
()
,
UserInfoUtils
.
getOpertaionUserInfo
()
));
}
/**
...
...
@@ -63,8 +64,8 @@ public class InvoiceManageController {
*/
@RequestMapping
(
"/reject-invoice"
)
public
RestResponse
rejectInvoice
(
InvoiceManageDTO
dto
)
{
return
ResultControllerUtils
.
commonResult
(
invoiceManageApiService
.
rejectInvoice
(
dto
.
getInvoiceManageId
(),
dto
.
getRejectReason
()));
return
ResultControllerUtils
.
commonResult
(
invoiceManageApiService
.
rejectInvoice
(
dto
.
getInvoiceManageId
(),
dto
.
getRejectReason
(),
UserInfoUtils
.
getOpertaionUserInfo
()));
}
/**
...
...
@@ -158,8 +159,8 @@ public class InvoiceManageController {
@RequestMapping
(
"/list-invoice"
)
public
RestResponse
listInvoice
(
InvoiceManageListQueryQO
params
)
{
return
ResultControllerUtils
.
commonPageResult
(
invoiceManageApiService
.
listInvoiceManage
(
params
),
InvoiceManageListVO
.
class
);
return
ResultControllerUtils
.
commonPageResult
(
invoiceManageApiService
.
listInvoiceManage
(
params
),
InvoiceManageListVO
.
class
);
}
}
gic-platform-finance-web/src/main/java/com/gic/finance/web/controller/TransferAccountsApprovalController.java
View file @
1f590b6a
package
com
.
gic
.
finance
.
web
.
controller
;
import
com.gic.finance.web.utils.UserInfoUtils
;
import
com.gic.finance.web.vo.*
;
import
com.gic.open.api.dto.OrderDTO
;
import
com.gic.open.api.dto.OrderItemDTO
;
...
...
@@ -170,12 +171,14 @@ public class TransferAccountsApprovalController {
@RequestMapping
(
"/agree-approval"
)
public
RestResponse
agreeApproval
(
Integer
id
,
Double
accountAmount
)
{
return
ResultControllerUtils
.
commonResult
(
transferAccountsApprovalApiService
.
agreeApproval
(
id
,
accountAmount
));
return
ResultControllerUtils
.
commonResult
(
transferAccountsApprovalApiService
.
agreeApproval
(
id
,
accountAmount
,
UserInfoUtils
.
getOpertaionUserInfo
()));
}
@RequestMapping
(
"/reject-approval"
)
public
RestResponse
rejectApproval
(
Integer
id
)
{
return
ResultControllerUtils
.
commonResult
(
transferAccountsApprovalApiService
.
rejectApproval
(
id
));
return
ResultControllerUtils
.
commonResult
(
transferAccountsApprovalApiService
.
rejectApproval
(
id
,
UserInfoUtils
.
getOpertaionUserInfo
()));
}
@RequestMapping
(
"/cancel-approval"
)
...
...
gic-platform-finance-web/src/main/java/com/gic/finance/web/utils/UserInfoUtils.java
0 → 100644
View file @
1f590b6a
package
com
.
gic
.
finance
.
web
.
utils
;
import
com.gic.authcenter.security.core.dto.UserDetailsVO
;
import
com.gic.authcenter.security.core.util.UserUtils
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.finance.dto.OperationUserInfoDTO
;
public
class
UserInfoUtils
{
public
static
OperationUserInfoDTO
getOpertaionUserInfo
()
{
UserDetailsVO
userDetailsVO
=
UserUtils
.
getUser
();
return
EntityUtil
.
changeEntityNew
(
OperationUserInfoDTO
.
class
,
userDetailsVO
);
}
}
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