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
b31652a8
Commit
b31652a8
authored
May 20, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!3
parents
21f0318e
e24ecea6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
144 additions
and
17 deletions
+144
-17
pom.xml
gic-platform-finance-service/pom.xml
+11
-0
InvoiceManageApiServiceImpl.java
...nance/service/outer/impl/InvoiceManageApiServiceImpl.java
+43
-0
TransferAccountsApprovalApiServiceImpl.java
...ce/outer/impl/TransferAccountsApprovalApiServiceImpl.java
+64
-0
dubbo-gic-platform-finance-service.xml
...src/main/resources/dubbo-gic-platform-finance-service.xml
+8
-0
InvoiceManageController.java
...m/gic/finance/web/controller/InvoiceManageController.java
+18
-17
No files found.
gic-platform-finance-service/pom.xml
View file @
b31652a8
...
@@ -123,6 +123,17 @@
...
@@ -123,6 +123,17 @@
<artifactId>
gic-open-platform-api
</artifactId>
<artifactId>
gic-open-platform-api
</artifactId>
<version>
${gic-open-platform-api}
</version>
<version>
${gic-open-platform-api}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-marketing-process-api
</artifactId>
<version>
${gic-marketing-process-api}
</version>
</dependency>
<!--开放平台-->
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-open-platform-api
</artifactId>
<version>
${gic-open-platform-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/InvoiceManageApiServiceImpl.java
View file @
b31652a8
...
@@ -2,6 +2,9 @@ package com.gic.finance.service.outer.impl;
...
@@ -2,6 +2,9 @@ package com.gic.finance.service.outer.impl;
import
java.util.Date
;
import
java.util.Date
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
...
@@ -35,6 +38,10 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
...
@@ -35,6 +38,10 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
private
InvoiceManageService
invoiceManageService
;
private
InvoiceManageService
invoiceManageService
;
@Autowired
@Autowired
private
InvoiceAccountService
invoiceAccountService
;
private
InvoiceAccountService
invoiceAccountService
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Autowired
private
UserApiService
userApiService
;
public
ServiceResponse
<
String
>
applyInvoiceInit
(
InvoiceManageDTO
invoiceManageDTO
)
{
public
ServiceResponse
<
String
>
applyInvoiceInit
(
InvoiceManageDTO
invoiceManageDTO
)
{
ServiceResponse
paramResponse
=
ValidParamsUtils
.
allCheckValidate
(
invoiceManageDTO
,
ServiceResponse
paramResponse
=
ValidParamsUtils
.
allCheckValidate
(
invoiceManageDTO
,
...
@@ -119,6 +126,8 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
...
@@ -119,6 +126,8 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
AsyncCallbackUtils
.
callBack
(
callbackDTO
,
"com.gic.open.api.service.market.InvoiceCallbackApiService"
,
AsyncCallbackUtils
.
callBack
(
callbackDTO
,
"com.gic.open.api.service.market.InvoiceCallbackApiService"
,
"invoiceCallback"
);
"invoiceCallback"
);
}
}
sendSms
(
tabInvoiceManage
,
"GICJFZX010"
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -147,6 +156,8 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
...
@@ -147,6 +156,8 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
AsyncCallbackUtils
.
callBack
(
callbackDTO
,
"com.gic.open.api.service.market.InvoiceCallbackApiService"
,
AsyncCallbackUtils
.
callBack
(
callbackDTO
,
"com.gic.open.api.service.market.InvoiceCallbackApiService"
,
"invoiceCallback"
);
"invoiceCallback"
);
}
}
sendSms
(
tabInvoiceManage
,
"GICJFZX011"
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -204,4 +215,36 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
...
@@ -204,4 +215,36 @@ public class InvoiceManageApiServiceImpl implements InvoiceManageApiService {
dto
.
setOperatorPhone
(
userInfo
.
getUserMobile
());
dto
.
setOperatorPhone
(
userInfo
.
getUserMobile
());
dto
.
setOperatorTime
(
new
Date
());
dto
.
setOperatorTime
(
new
Date
());
}
}
private
void
sendSms
(
TabInvoiceManage
tabInvoiceManage
,
String
smsSceneId
)
{
if
(
StringUtils
.
isNotBlank
(
tabInvoiceManage
.
getExpressMailName
()))
{
//如果是计费中心,则发起人数据 就是用户ID
if
(
StringUtils
.
isNotBlank
(
tabInvoiceManage
.
getInitiator
()))
{
Integer
userId
=
Integer
.
parseInt
(
tabInvoiceManage
.
getInitiator
());
ServiceResponse
<
UserDTO
>
userResponse
=
userApiService
.
getUserById
(
userId
);
if
(!
userResponse
.
isSuccess
())
{
LOGGER
.
warn
(
"发票审批完成发送短信:{},{}"
,
userResponse
.
getCode
(),
userResponse
.
getMessage
());
}
UserDTO
userDTO
=
userResponse
.
getResult
();
String
[]
smsArr
=
null
;
if
(
"GICJFZX010"
.
equals
(
smsSceneId
))
{
smsArr
=
new
String
[]{
tabInvoiceManage
.
getEnterpriseName
(),
tabInvoiceManage
.
getInvoiceApplySerial
(),
tabInvoiceManage
.
getExpressMailName
(),
tabInvoiceManage
.
getExpressMailNumber
()};
}
else
if
(
"GICJFZX011"
.
equals
(
smsSceneId
))
{
smsArr
=
new
String
[]{
tabInvoiceManage
.
getEnterpriseName
(),
tabInvoiceManage
.
getInvoiceApplySerial
(),
tabInvoiceManage
.
getRejectReason
()};
}
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
smsSceneId
,
tabInvoiceManage
.
getEnterpriseId
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
}
}
}
gic-platform-finance-service/src/main/java/com/gic/finance/service/outer/impl/TransferAccountsApprovalApiServiceImpl.java
View file @
b31652a8
...
@@ -3,6 +3,13 @@ package com.gic.finance.service.outer.impl;
...
@@ -3,6 +3,13 @@ package com.gic.finance.service.outer.impl;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.open.api.dto.ApplicationDTO
;
import
com.gic.open.api.dto.OrderDTO
;
import
com.gic.open.api.service.ApplicationApiService
;
import
com.gic.open.api.service.OrderApiService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -40,6 +47,14 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
...
@@ -40,6 +47,14 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
private
final
static
String
SERVICE_NAME
=
"转账审批"
;
private
final
static
String
SERVICE_NAME
=
"转账审批"
;
@Autowired
@Autowired
private
TransferAccountsApprovalService
transferAccountsApprovalService
;
private
TransferAccountsApprovalService
transferAccountsApprovalService
;
@Autowired
private
OrderApiService
orderApiService
;
@Autowired
private
ApplicationApiService
applicationApiService
;
@Autowired
private
SmsSendApiService
smsSendApiService
;
@Autowired
private
UserApiService
userApiService
;
/**
/**
* 发起审批
* 发起审批
...
@@ -156,6 +171,55 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
...
@@ -156,6 +171,55 @@ public class TransferAccountsApprovalApiServiceImpl implements TransferAccountsA
callBack
(
tab
);
callBack
(
tab
);
transferAccountsApprovalService
.
updateTransferAccountsApproval
(
dto
);
transferAccountsApprovalService
.
updateTransferAccountsApproval
(
dto
);
//如果是商户基础服务,则进行短信发送给超级管理员
if
(
tab
.
getOrderType
().
intValue
()
==
OrderTypeEnum
.
SERVICE
.
getCode
())
{
//服务类型
String
orderNum
=
tab
.
getOrderNumber
();
ServiceResponse
<
OrderDTO
>
orderResult
=
orderApiService
.
getOrderForFinance
(
orderNum
);
if
(!
orderResult
.
isSuccess
())
{
LOGGER
.
warn
(
"财务审批通过-服务订单信息结果:{}, {}"
,
orderResult
.
getCode
(),
orderResult
.
getMessage
());
}
OrderDTO
orderDTO
=
orderResult
.
getResult
();
Long
applicationId
=
orderDTO
.
getApplicationId
();
ServiceResponse
<
ApplicationDTO
>
applicationResult
=
applicationApiService
.
getApplicationSimpleByApplicationId
(
applicationId
);
if
(!
applicationResult
.
isSuccess
())
{
LOGGER
.
warn
(
"财务审批通过-应用信息结果:{}, {}"
,
applicationResult
.
getCode
(),
applicationResult
.
getMessage
());
}
if
(
"gic"
.
equals
(
applicationResult
.
getResult
().
getModuleCode
()))
{
//是基础服务
ServiceResponse
<
UserDTO
>
userResult
=
userApiService
.
getUserByEnterpriseId
(
tab
.
getEnterpriseId
());
UserDTO
userDTO
=
userResult
.
getResult
();
Integer
relationOrderType
=
orderDTO
.
getOrderType
();
String
operationName
=
"开通"
;
switch
(
relationOrderType
)
{
case
1
:
operationName
=
"开通"
;
break
;
case
2
:
operationName
=
"续费"
;
break
;
case
3
:
operationName
=
"升级"
;
break
;
case
4
:
operationName
=
"扩容"
;
break
;
default
:
}
String
[]
smsArr
=
new
String
[]{
tab
.
getEnterpriseName
(),
operationName
};
if
(
userResult
.
isSuccess
())
{
ServiceResponse
<
Void
>
smsSendResult
=
smsSendApiService
.
sendPlatformSms
(
"GICJFZX004"
,
tab
.
getEnterpriseId
(),
userDTO
.
getPhoneAreaCode
(),
userDTO
.
getPhoneNumber
(),
smsArr
);
if
(!
smsSendResult
.
isSuccess
())
{
LOGGER
.
warn
(
smsSendResult
.
getMessage
());
}
}
}
else
{
LOGGER
.
warn
(
"财务审批通过-不是基础服务"
);
}
}
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
...
gic-platform-finance-service/src/main/resources/dubbo-gic-platform-finance-service.xml
View file @
b31652a8
...
@@ -26,4 +26,12 @@
...
@@ -26,4 +26,12 @@
<!--提现管理-->
<!--提现管理-->
<dubbo:service
interface=
"com.gic.finance.service.CashWithdrawalApiService"
ref=
"cashWithdrawalApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.finance.service.CashWithdrawalApiService"
ref=
"cashWithdrawalApiService"
timeout=
"6000"
/>
<!--短信发送-->
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.sms.SmsSendApiService"
id=
"smsSendApiService"
timeout=
"60000"
/>
<!--用户-->
<dubbo:reference
interface=
"com.gic.auth.service.UserApiService"
id=
"userApiService"
timeout=
"60000"
/>
<!--开放给平台订单详情-->
<dubbo:reference
interface=
"com.gic.open.api.service.OrderApiService"
id=
"orderApiService"
timeout=
"60000"
/>
<dubbo:reference
interface=
"com.gic.open.api.service.ApplicationApiService"
id=
"applicationApiService"
timeout=
"60000"
/>
</beans>
</beans>
gic-platform-finance-web/src/main/java/com/gic/finance/web/controller/InvoiceManageController.java
View file @
b31652a8
...
@@ -134,23 +134,24 @@ public class InvoiceManageController {
...
@@ -134,23 +134,24 @@ public class InvoiceManageController {
if
(
invoiceResult
.
isSuccess
())
{
if
(
invoiceResult
.
isSuccess
())
{
InvoiceManageDTO
invoice
=
invoiceResult
.
getResult
();
InvoiceManageDTO
invoice
=
invoiceResult
.
getResult
();
InvoiceManagerDetailVO
vo
=
EntityUtil
.
changeEntityNew
(
InvoiceManagerDetailVO
.
class
,
invoice
);
InvoiceManagerDetailVO
vo
=
EntityUtil
.
changeEntityNew
(
InvoiceManagerDetailVO
.
class
,
invoice
);
ServiceResponse
<
InvoiceAccountDTO
>
accountResult
;
//不再去去开票户数据,而是gic后台填写的数据
if
(
invoice
.
getInvoicerId
()
!=
null
)
{
// ServiceResponse<InvoiceAccountDTO> accountResult;
accountResult
=
invoiceAccountApiService
.
getById
(
invoice
.
getInvoicerId
());
// if (invoice.getInvoicerId() != null) {
}
else
{
// accountResult = invoiceAccountApiService.getById(invoice.getInvoicerId());
accountResult
=
invoiceAccountApiService
.
getEnable
();
// } else {
}
// accountResult = invoiceAccountApiService.getEnable();
if
(
accountResult
.
isSuccess
())
{
// }
InvoiceAccountDTO
account
=
accountResult
.
getResult
();
// if (accountResult.isSuccess()) {
vo
.
setAccountName
(
account
.
getAccountName
());
// InvoiceAccountDTO account = accountResult.getResult();
vo
.
setAccountPhone
(
account
.
getAccountPhone
());
// vo.setAccountName(account.getAccountName());
vo
.
setAddress
(
account
.
getAddress
());
// vo.setAccountPhone(account.getAccountPhone());
vo
.
setBank
(
account
.
getBank
());
// vo.setAddress(account.getAddress());
vo
.
setBankAccount
(
account
.
getBankAccount
());
// vo.setBank(account.getBank());
vo
.
setTaxNumberOfInvoice
(
account
.
getTaxNumber
());
// vo.setBankAccount(account.getBankAccount());
}
else
{
// vo.setTaxNumberOfInvoice(account.getTaxNumber());
return
EnterpriseRestResponse
.
failure
(
accountResult
);
// } else {
}
// return EnterpriseRestResponse.failure(accountResult);
// }
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
else
{
}
else
{
return
EnterpriseRestResponse
.
failure
(
invoiceResult
);
return
EnterpriseRestResponse
.
failure
(
invoiceResult
);
...
...
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