Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-financial
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3353dea6
authored
Jun 16, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v5.8.2' into 'master'
上线合并 See merge request
!5
2 parents
882ed6be
36a41000
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
184 additions
and
12 deletions
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/dto/NbCbAccDetailDTO.java
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/request/approval/H5ApprovalRecordRequest.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/config/MerchantCorpProperties.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/manager/QWManager.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/ApprovalRecordService.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/MerchantCorpConfigService.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/QWApprovalService.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/ThirdPartyNiBoBatchStrategy.java
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/nb/NbCbAccDetailService.java
rpc-dj-financial/src/main/resources/META-INF/orm/approvalRecordsMapper.xml
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/dto/NbCbAccDetailDTO.java
View file @
3353dea
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.financial.dto;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.financial.dto;
import
cn.com.glsx.dj.financial.model.NbCbAccDetail
;
import
cn.com.glsx.dj.financial.model.NbCbAccDetail
;
import
cn.com.glsx.dj.financial.model.NbCbDetailLog
;
import
cn.com.glsx.dj.financial.model.NbCbDetailLog
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -103,4 +104,7 @@ public class NbCbAccDetailDTO extends NbCbAccDetail {
...
@@ -103,4 +104,7 @@ public class NbCbAccDetailDTO extends NbCbAccDetail {
*/
*/
private
Byte
receiptJdSync
;
private
Byte
receiptJdSync
;
@ApiModelProperty
(
name
=
"custType"
,
notes
=
"主体类型:1-广联 2-优加"
,
dataType
=
"Integer"
)
private
Integer
custType
;
}
}
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/request/approval/H5ApprovalRecordRequest.java
View file @
3353dea
...
@@ -31,4 +31,10 @@ public class H5ApprovalRecordRequest implements Serializable {
...
@@ -31,4 +31,10 @@ public class H5ApprovalRecordRequest implements Serializable {
@ApiModelProperty
(
name
=
"endDate"
,
notes
=
"结束日期"
,
dataType
=
"String"
)
@ApiModelProperty
(
name
=
"endDate"
,
notes
=
"结束日期"
,
dataType
=
"String"
)
private
Date
endDate
;
private
Date
endDate
;
@ApiModelProperty
(
name
=
"custType"
,
notes
=
"主体类型:1-广联 2-优加"
,
dataType
=
"Integer"
)
private
Integer
custType
;
@ApiModelProperty
(
name
=
"custId"
,
notes
=
"主体id(前端不需要传)"
,
dataType
=
"String"
)
private
String
custId
;
}
}
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/config/MerchantCorpProperties.java
0 → 100644
View file @
3353dea
package
cn
.
com
.
glsx
.
dj
.
financial
.
config
;
import
com.alibaba.fastjson.JSON
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Data
@Component
@ConfigurationProperties
(
prefix
=
"merchant.corp.agent"
)
public
class
MerchantCorpProperties
{
private
List
<
MerchantCorpConfig
>
config
;
public
void
setConfig
(
String
configJson
)
{
this
.
config
=
JSON
.
parseArray
(
configJson
,
MerchantCorpConfig
.
class
);
}
@Data
public
static
class
MerchantCorpConfig
{
private
Integer
merchantId
;
private
String
agentId
;
private
String
corpId
;
private
String
corpSecret
;
// 主体类型 1-广联 2-优加
private
Integer
custType
;
}
}
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/manager/QWManager.java
View file @
3353dea
...
@@ -79,15 +79,15 @@ public class QWManager {
...
@@ -79,15 +79,15 @@ public class QWManager {
@SetDefaultMerchantId
@SetDefaultMerchantId
public
SendWorkWechatMessageResponseDTO
sendMessage
(
public
SendWorkWechatMessageResponseDTO
sendMessage
(
SendWorkWechatMessageRequestDTO
sendWorkWechatMessageRequestDTO
)
{
SendWorkWechatMessageRequestDTO
sendWorkWechatMessageRequestDTO
)
{
log
.
info
(
"发送企微应用消息:{}"
,
JSON
.
toJSONString
(
sendWorkWechatMessageRequestDTO
));
log
.
info
(
"发送企微应用消息
request
:{}"
,
JSON
.
toJSONString
(
sendWorkWechatMessageRequestDTO
));
SendWorkWechatMessageResponseDTO
responseDTO
=
null
;
SendWorkWechatMessageResponseDTO
responseDTO
=
null
;
try
{
try
{
String
baseurl
=
environment
.
getProperty
(
"wechant.base.path"
)+
"wechat/message/sendMessage"
;
String
baseurl
=
environment
.
getProperty
(
"wechant.base.path"
)+
"wechat/message/sendMessage"
;
responseDTO
=
HttpUtil
.
post
(
baseurl
,
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
sendWorkWechatMessageRequestDTO
)),
SendWorkWechatMessageResponseDTO
.
class
);
responseDTO
=
HttpUtil
.
post
(
baseurl
,
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
sendWorkWechatMessageRequestDTO
)),
SendWorkWechatMessageResponseDTO
.
class
);
log
.
info
(
"发送企微应用消息
ropResponse:{}"
,
JSON
.
toJSONString
(
responseDTO
));
log
.
info
(
"发送企微应用消息
request:{},ropResponse:{}"
,
JSON
.
toJSONString
(
sendWorkWechatMessageRequestDTO
)
,
JSON
.
toJSONString
(
responseDTO
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
info
(
"发送企微应用消息异常
:"
,
e
);
log
.
info
(
"发送企微应用消息异常
request:{}"
,
JSON
.
toJSONString
(
sendWorkWechatMessageRequestDTO
)
,
e
);
}
}
return
responseDTO
;
return
responseDTO
;
}
}
...
...
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/ApprovalRecordService.java
View file @
3353dea
...
@@ -3,9 +3,11 @@ package cn.com.glsx.dj.financial.service;
...
@@ -3,9 +3,11 @@ package cn.com.glsx.dj.financial.service;
import
cn.com.glsx.dj.financial.dto.approval.H5ApprovalRecordDTO
;
import
cn.com.glsx.dj.financial.dto.approval.H5ApprovalRecordDTO
;
import
cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper
;
import
cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper
;
import
cn.com.glsx.dj.financial.mapper.ApprovalTemplateDetailMapper
;
import
cn.com.glsx.dj.financial.mapper.ApprovalTemplateDetailMapper
;
import
cn.com.glsx.dj.financial.mapper.NbCbCustInfoMapper
;
import
cn.com.glsx.dj.financial.mapper.NbCbReceiptMapper
;
import
cn.com.glsx.dj.financial.mapper.NbCbReceiptMapper
;
import
cn.com.glsx.dj.financial.model.ApprovalRecords
;
import
cn.com.glsx.dj.financial.model.ApprovalRecords
;
import
cn.com.glsx.dj.financial.model.ApprovalTemplateDetail
;
import
cn.com.glsx.dj.financial.model.ApprovalTemplateDetail
;
import
cn.com.glsx.dj.financial.model.NbCbCustInfo
;
import
cn.com.glsx.dj.financial.request.approval.H5ApprovalRecordRequest
;
import
cn.com.glsx.dj.financial.request.approval.H5ApprovalRecordRequest
;
import
cn.com.glsx.dj.financial.util.FileUtils
;
import
cn.com.glsx.dj.financial.util.FileUtils
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
...
@@ -18,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -18,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -42,6 +45,9 @@ public class ApprovalRecordService {
...
@@ -42,6 +45,9 @@ public class ApprovalRecordService {
@Autowired
@Autowired
private
Environment
env
;
private
Environment
env
;
@Autowired
private
NbCbCustInfoMapper
nbCbCustInfoMapper
;
/**
/**
* 到账伴侣H5页面-审批详情
* 到账伴侣H5页面-审批详情
*
*
...
@@ -145,6 +151,15 @@ public class ApprovalRecordService {
...
@@ -145,6 +151,15 @@ public class ApprovalRecordService {
* @return
* @return
*/
*/
public
Page
<
H5ApprovalRecordDTO
>
getH5ApprovalRecordList
(
RpcPagination
<
H5ApprovalRecordRequest
>
pagination
)
{
public
Page
<
H5ApprovalRecordDTO
>
getH5ApprovalRecordList
(
RpcPagination
<
H5ApprovalRecordRequest
>
pagination
)
{
if
(
pagination
.
getCondition
().
getCustType
()
!=
null
)
{
Example
example
=
new
Example
(
NbCbCustInfo
.
class
);
example
.
createCriteria
().
andEqualTo
(
"delFlag"
,
0
)
.
andEqualTo
(
"custType"
,
pagination
.
getCondition
().
getCustType
());
List
<
NbCbCustInfo
>
nbCbCustInfos
=
nbCbCustInfoMapper
.
selectByExample
(
example
);
if
(
CollectionUtils
.
isNotEmpty
(
nbCbCustInfos
))
{
pagination
.
getCondition
().
setCustId
(
nbCbCustInfos
.
get
(
0
).
getCustId
());
}
}
Page
<
H5ApprovalRecordDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
Page
<
H5ApprovalRecordDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
approvalRecordsMapper
.
getH5ApprovalRecordList
(
pagination
.
getCondition
());
approvalRecordsMapper
.
getH5ApprovalRecordList
(
pagination
.
getCondition
());
return
page
;
return
page
;
...
...
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/MerchantCorpConfigService.java
0 → 100644
View file @
3353dea
package
cn
.
com
.
glsx
.
dj
.
financial
.
service
;
import
cn.com.glsx.dj.financial.config.MerchantCorpProperties
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.PostConstruct
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
@Slf4j
@Service
public
class
MerchantCorpConfigService
{
@Autowired
private
MerchantCorpProperties
merchantCorpProperties
;
// 内存缓存 Map,Key 为 merchantId
private
Map
<
Integer
,
MerchantCorpProperties
.
MerchantCorpConfig
>
configMap
;
/**
* 项目启动时,自动将 List 转换为 Map,方便快速查找
*/
@PostConstruct
public
void
init
()
{
if
(
merchantCorpProperties
.
getConfig
()
!=
null
)
{
configMap
=
merchantCorpProperties
.
getConfig
().
stream
()
.
collect
(
Collectors
.
toMap
(
MerchantCorpProperties
.
MerchantCorpConfig
::
getMerchantId
,
config
->
config
,
(
key1
,
key2
)
->
key1
// 如果 merchantId 重复,保留第一个
));
}
log
.
info
(
"初始化商户配置完成,共 {} 条数据,configMap:{}"
,
configMap
.
size
(),
JSON
.
toJSONString
(
configMap
));
}
/**
* 根据 merchantId 获取对应的完整配置
*/
public
Optional
<
MerchantCorpProperties
.
MerchantCorpConfig
>
getConfigByMerchantId
(
Integer
merchantId
)
{
if
(
configMap
==
null
||
merchantId
==
null
)
{
return
Optional
.
empty
();
}
return
Optional
.
ofNullable
(
configMap
.
get
(
merchantId
));
}
/**
* 便捷方法:直接根据 merchantId 获取 agentId
*/
public
String
getAgentIdByMerchantId
(
Integer
merchantId
)
{
return
getConfigByMerchantId
(
merchantId
)
.
map
(
MerchantCorpProperties
.
MerchantCorpConfig
::
getAgentId
)
.
orElseThrow
(()
->
new
IllegalArgumentException
(
"未找到该商户对应的配置: "
+
merchantId
));
}
/**
* 便捷方法:直接根据 merchantId 获取 custType
*/
public
Integer
getCustTypeByMerchantId
(
Integer
merchantId
)
{
return
getConfigByMerchantId
(
merchantId
)
.
map
(
MerchantCorpProperties
.
MerchantCorpConfig
::
getCustType
)
.
orElseThrow
(()
->
new
IllegalArgumentException
(
"未找到该商户对应的配置: "
+
merchantId
));
}
}
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/QWApprovalService.java
View file @
3353dea
package
cn
.
com
.
glsx
.
dj
.
financial
.
service
;
package
cn
.
com
.
glsx
.
dj
.
financial
.
service
;
import
cn.com.glsx.dj.financial.config.MerchantCorpProperties
;
import
cn.com.glsx.dj.financial.enums.NbCbCustEnum
;
import
cn.com.glsx.dj.financial.enums.QWApprovalOrderStatusEnum
;
import
cn.com.glsx.dj.financial.enums.QWApprovalOrderStatusEnum
;
import
cn.com.glsx.dj.financial.manager.QWManager
;
import
cn.com.glsx.dj.financial.manager.QWManager
;
import
cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper
;
import
cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper
;
...
@@ -72,6 +74,9 @@ public class QWApprovalService {
...
@@ -72,6 +74,9 @@ public class QWApprovalService {
@Autowired
@Autowired
private
NbCbCustInfoService
nbCbCustInfoService
;
private
NbCbCustInfoService
nbCbCustInfoService
;
@Autowired
private
MerchantCorpConfigService
merchantCorpConfigService
;
/**
/**
* 1.处理审批记录 2.记录审批记录
* 1.处理审批记录 2.记录审批记录
*
*
...
@@ -610,10 +615,23 @@ public class QWApprovalService {
...
@@ -610,10 +615,23 @@ public class QWApprovalService {
if
(
com
.
alibaba
.
nacos
.
common
.
utils
.
StringUtils
.
isEmpty
(
property
)){
if
(
com
.
alibaba
.
nacos
.
common
.
utils
.
StringUtils
.
isEmpty
(
property
)){
return
;
return
;
}
}
Optional
<
MerchantCorpProperties
.
MerchantCorpConfig
>
merchantCorpConfig
=
merchantCorpConfigService
.
getConfigByMerchantId
(
approvalRecord
.
getMerchantId
());
boolean
present
=
merchantCorpConfig
.
isPresent
();
if
(!
present
)
{
log
.
info
(
"未找到商户企微应用配置信息,merchantId:{}"
,
approvalRecord
.
getMerchantId
());
throw
new
RuntimeException
(
"未找到商户企微应用配置信息"
);
}
Integer
custType
=
merchantCorpConfig
.
get
().
getCustType
();
if
(!
Objects
.
equals
(
custType
,
NbCbCustEnum
.
GL_CUST
.
getCustType
())
&&
!
Objects
.
equals
(
custType
,
NbCbCustEnum
.
YJ_CUST
.
getCustType
()))
{
log
.
info
(
"商户不是广联主体或者优加主体,merchantId:{},custType:{}"
,
approvalRecord
.
getMerchantId
(),
custType
);
throw
new
RuntimeException
(
"商户不是广联主体或者优加主体"
);
}
String
agentId
=
merchantCorpConfig
.
get
().
getAgentId
();
SendWorkWechatMessageRequestDTO
sendWorkWechatMessageRequestDTO
=
new
SendWorkWechatMessageRequestDTO
();
SendWorkWechatMessageRequestDTO
sendWorkWechatMessageRequestDTO
=
new
SendWorkWechatMessageRequestDTO
();
sendWorkWechatMessageRequestDTO
.
setMsgType
(
"text"
);
sendWorkWechatMessageRequestDTO
.
setMsgType
(
"text"
);
sendWorkWechatMessageRequestDTO
.
setToUser
(
approvalRecord
.
getApplyerUserid
());
sendWorkWechatMessageRequestDTO
.
setToUser
(
approvalRecord
.
getApplyerUserid
());
sendWorkWechatMessageRequestDTO
.
setAgentId
(
environment
.
getProperty
(
"default.agentid"
)==
null
?
"1000008"
:
environment
.
getProperty
(
"default.agentid"
));
// sendWorkWechatMessageRequestDTO.setAgentId(environment.getProperty("default.agentid")==null?"1000008":environment.getProperty("default.agentid"));
sendWorkWechatMessageRequestDTO
.
setAgentId
(
agentId
);
WorkWechatTextMessageDTO
workWechatTextMessageDTO
=
new
WorkWechatTextMessageDTO
();
WorkWechatTextMessageDTO
workWechatTextMessageDTO
=
new
WorkWechatTextMessageDTO
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
stringBuffer
.
append
(
"【"
).
append
(
approvalRecord
.
getPayTitle
()).
append
(
"】"
).
append
(
"推送付款信息失败\n"
);
stringBuffer
.
append
(
"【"
).
append
(
approvalRecord
.
getPayTitle
()).
append
(
"】"
).
append
(
"推送付款信息失败\n"
);
...
...
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/ThirdPartyNiBoBatchStrategy.java
View file @
3353dea
package
cn
.
com
.
glsx
.
dj
.
financial
.
service
;
package
cn
.
com
.
glsx
.
dj
.
financial
.
service
;
import
cn.com.glsx.dj.financial.config.MerchantCorpProperties
;
import
cn.com.glsx.dj.financial.dto.NbCbBatchTransferParamDTO
;
import
cn.com.glsx.dj.financial.dto.NbCbBatchTransferParamDTO
;
import
cn.com.glsx.dj.financial.enums.BatchTransferSourceEnum
;
import
cn.com.glsx.dj.financial.enums.BatchTransferSourceEnum
;
import
cn.com.glsx.dj.financial.enums.NbCbCustEnum
;
import
cn.com.glsx.dj.financial.enums.QWApprovalOrderStatusEnum
;
import
cn.com.glsx.dj.financial.enums.QWApprovalOrderStatusEnum
;
import
cn.com.glsx.dj.financial.manager.QWManager
;
import
cn.com.glsx.dj.financial.manager.QWManager
;
import
cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper
;
import
cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper
;
...
@@ -52,6 +54,9 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
...
@@ -52,6 +54,9 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
@Autowired
@Autowired
private
ApprovalTemplateConfigMapper
approvalTemplateConfigMapper
;
private
ApprovalTemplateConfigMapper
approvalTemplateConfigMapper
;
@Autowired
private
MerchantCorpConfigService
merchantCorpConfigService
;
@Override
@Override
public
Object
buildRequestParams
(
ApprovalRecords
approvalRecord
,
String
custId
,
Integer
custType
)
{
public
Object
buildRequestParams
(
ApprovalRecords
approvalRecord
,
String
custId
,
Integer
custType
)
{
int
remarksLengthMax
=
35
;
int
remarksLengthMax
=
35
;
...
@@ -182,6 +187,18 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
...
@@ -182,6 +187,18 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
public
void
callBack
(
CallbackData
callbackData
,
ApprovalRecords
approvalRecords
)
{
public
void
callBack
(
CallbackData
callbackData
,
ApprovalRecords
approvalRecords
)
{
// 1.处理订单状态
// 1.处理订单状态
if
((
"0"
).
equals
(
callbackData
.
getStatus
()))
{
if
((
"0"
).
equals
(
callbackData
.
getStatus
()))
{
Optional
<
MerchantCorpProperties
.
MerchantCorpConfig
>
merchantCorpConfig
=
merchantCorpConfigService
.
getConfigByMerchantId
(
approvalRecords
.
getMerchantId
());
boolean
present
=
merchantCorpConfig
.
isPresent
();
if
(!
present
)
{
log
.
info
(
"未找到商户企微应用配置信息,merchantId:{}"
,
approvalRecords
.
getMerchantId
());
throw
new
RuntimeException
(
"未找到商户企微应用配置信息"
);
}
Integer
custType
=
merchantCorpConfig
.
get
().
getCustType
();
if
(!
Objects
.
equals
(
custType
,
NbCbCustEnum
.
GL_CUST
.
getCustType
())
&&
!
Objects
.
equals
(
custType
,
NbCbCustEnum
.
YJ_CUST
.
getCustType
()))
{
log
.
info
(
"商户不是广联主体或者优加主体,merchantId:{},custType:{}"
,
approvalRecords
.
getMerchantId
(),
custType
);
throw
new
RuntimeException
(
"商户不是广联主体或者优加主体"
);
}
String
agentId
=
merchantCorpConfig
.
get
().
getAgentId
();
approvalRecords
.
setThirdRequestStatus
(
QWApprovalOrderStatusEnum
.
CALLBACK_SUCCESS
.
getValue
());
approvalRecords
.
setThirdRequestStatus
(
QWApprovalOrderStatusEnum
.
CALLBACK_SUCCESS
.
getValue
());
// 2.发送企微通知
// 2.发送企微通知
...
@@ -202,7 +219,8 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
...
@@ -202,7 +219,8 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
}
}
sendMessageRequestDTO
.
setTextCard
(
workWechatTextCardMessageDTO
);
sendMessageRequestDTO
.
setTextCard
(
workWechatTextCardMessageDTO
);
sendMessageRequestDTO
.
setAgentId
(
environment
.
getProperty
(
"default.agentid"
)==
null
?
"1000008"
:
environment
.
getProperty
(
"default.agentid"
));
// sendMessageRequestDTO.setAgentId(environment.getProperty("default.agentid")==null?"1000008":environment.getProperty("default.agentid"));
sendMessageRequestDTO
.
setAgentId
(
agentId
);
Set
<
String
>
qwUserIdList
=
new
HashSet
<>();
Set
<
String
>
qwUserIdList
=
new
HashSet
<>();
qwUserIdList
.
add
(
approvalRecords
.
getApplyerUserid
());
qwUserIdList
.
add
(
approvalRecords
.
getApplyerUserid
());
...
@@ -214,7 +232,12 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
...
@@ -214,7 +232,12 @@ public class ThirdPartyNiBoBatchStrategy implements ThirdPartyStrategy{
String
url
=
workWechatTextCardMessageDTO
.
getUrl
();
String
url
=
workWechatTextCardMessageDTO
.
getUrl
();
for
(
String
qwUserId
:
qwUserIdList
)
{
for
(
String
qwUserId
:
qwUserIdList
)
{
if
(
StringUtils
.
isNotBlank
(
url
))
{
if
(
StringUtils
.
isNotBlank
(
url
))
{
workWechatTextCardMessageDTO
.
setUrl
(
String
.
format
(
"%s&qwUserId=%s"
,
url
,
qwUserId
));
if
(
Objects
.
equals
(
custType
,
NbCbCustEnum
.
YJ_CUST
.
getCustType
()))
{
workWechatTextCardMessageDTO
.
setUrl
(
String
.
format
(
"%s&qwUserId=%s&sysSource=YJ"
,
url
,
qwUserId
));
}
else
{
workWechatTextCardMessageDTO
.
setUrl
(
String
.
format
(
"%s&qwUserId=%s&sysSource=GL"
,
url
,
qwUserId
));
}
}
}
sendMessageRequestDTO
.
setToUser
(
qwUserId
);
sendMessageRequestDTO
.
setToUser
(
qwUserId
);
...
...
rpc-dj-financial/src/main/java/cn/com/glsx/dj/financial/service/nb/NbCbAccDetailService.java
View file @
3353dea
...
@@ -606,9 +606,12 @@ public class NbCbAccDetailService {
...
@@ -606,9 +606,12 @@ public class NbCbAccDetailService {
public
Page
<
NbCbAccDetailDTO
>
page
(
RpcPagination
<
NbCbAccDetailDTO
>
pagination
)
{
public
Page
<
NbCbAccDetailDTO
>
page
(
RpcPagination
<
NbCbAccDetailDTO
>
pagination
)
{
RpcAssert
.
assertNotNull
(
pagination
,
DefaultErrorEnum
.
DATA_NULL
,
"pagination not be null"
);
RpcAssert
.
assertNotNull
(
pagination
,
DefaultErrorEnum
.
DATA_NULL
,
"pagination not be null"
);
try
{
try
{
Page
<
NbCbAccDetailDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
//获取主体配置
String
custId
=
nbCbCustInfoService
.
getCustIdByType
(
pagination
.
getCondition
().
getCustType
());
NbCbAccDetailDTO
condition
=
pagination
.
getCondition
();
NbCbAccDetailDTO
condition
=
pagination
.
getCondition
();
condition
.
setCustId
(
env
.
getProperty
(
"nbcb.custId"
,
"9000919969"
));
Page
<
NbCbAccDetailDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
// condition.setCustId(env.getProperty("nbcb.custId", "9000919969"));
condition
.
setCustId
(
custId
);
List
<
NbCbAccDetailDTO
>
list
=
nbCbAccDetailMapper
.
list
(
condition
);
List
<
NbCbAccDetailDTO
>
list
=
nbCbAccDetailMapper
.
list
(
condition
);
List
<
String
>
subSerialNoList
=
list
.
stream
().
map
(
NbCbAccDetailDTO:
:
getSubSerialNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
subSerialNoList
=
list
.
stream
().
map
(
NbCbAccDetailDTO:
:
getSubSerialNo
).
collect
(
Collectors
.
toList
());
...
@@ -738,7 +741,8 @@ public class NbCbAccDetailService {
...
@@ -738,7 +741,8 @@ public class NbCbAccDetailService {
throw
new
RpcServiceException
(
DefaultErrorEnum
.
VALIDATE_FAILED
,
"交易开始时间不能大于交易结束时间"
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
VALIDATE_FAILED
,
"交易开始时间不能大于交易结束时间"
);
}
}
//先默认为广联主体
//先默认为广联主体
String
custId
=
nbCbCustInfoService
.
getCustIdByType
(
NbCbCustEnum
.
GL_CUST
.
getCustType
());
// String custId = nbCbCustInfoService.getCustIdByType(NbCbCustEnum.GL_CUST.getCustType());
String
custId
=
nbCbCustInfoService
.
getCustIdByType
(
nbCbAccDetailDTO
.
getCustType
());
NbCbAccDetailDTO
condition
=
new
NbCbAccDetailDTO
();
NbCbAccDetailDTO
condition
=
new
NbCbAccDetailDTO
();
condition
.
setAccNameList
(
nbCbAccDetailDTO
.
getAccNameList
());
condition
.
setAccNameList
(
nbCbAccDetailDTO
.
getAccNameList
());
condition
.
setBankType
(
nbCbAccDetailDTO
.
getBankType
());
condition
.
setBankType
(
nbCbAccDetailDTO
.
getBankType
());
...
@@ -750,8 +754,8 @@ public class NbCbAccDetailService {
...
@@ -750,8 +754,8 @@ public class NbCbAccDetailService {
}
}
taskExecutor
.
execute
(()
->
{
taskExecutor
.
execute
(()
->
{
try
{
try
{
nbReceiptService
.
reFetchReceipt
(
bankAccList
,
transTimeStart
,
transTimeEnd
,
nbCbAccDetailDTO
.
getUpdatedBy
(),
custId
,
NbCbCustEnum
.
GL_CUST
.
getCustType
());
nbReceiptService
.
reFetchReceipt
(
bankAccList
,
transTimeStart
,
transTimeEnd
,
nbCbAccDetailDTO
.
getUpdatedBy
(),
custId
,
nbCbAccDetailDTO
.
getCustType
());
reFetchAccDetail
(
bankAccList
,
transTimeStart
,
transTimeEnd
,
nbCbAccDetailDTO
.
getUpdatedBy
(),
custId
,
NbCbCustEnum
.
GL_CUST
.
getCustType
());
reFetchAccDetail
(
bankAccList
,
transTimeStart
,
transTimeEnd
,
nbCbAccDetailDTO
.
getUpdatedBy
(),
custId
,
nbCbAccDetailDTO
.
getCustType
());
}
catch
(
RpcServiceException
e
)
{
}
catch
(
RpcServiceException
e
)
{
throw
e
;
throw
e
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -792,7 +796,8 @@ public class NbCbAccDetailService {
...
@@ -792,7 +796,8 @@ public class NbCbAccDetailService {
public
NbCbAccDetailDTO
accDetailConfig
(
NbCbAccDetailDTO
condition
)
{
public
NbCbAccDetailDTO
accDetailConfig
(
NbCbAccDetailDTO
condition
)
{
try
{
try
{
String
custId
=
nbCbCustInfoService
.
getCustIdByType
(
NbCbCustEnum
.
GL_CUST
.
getCustType
());
// String custId = nbCbCustInfoService.getCustIdByType(NbCbCustEnum.GL_CUST.getCustType());
String
custId
=
nbCbCustInfoService
.
getCustIdByType
(
condition
.
getCustType
());
condition
.
setCustId
(
custId
);
condition
.
setCustId
(
custId
);
NbCbAccDetailDTO
nbCbAccDetailDTO
=
new
NbCbAccDetailDTO
();
NbCbAccDetailDTO
nbCbAccDetailDTO
=
new
NbCbAccDetailDTO
();
nbCbAccDetailDTO
.
setAccNameList
(
nbCbAccDetailMapper
.
selectAccNameList
(
condition
));
nbCbAccDetailDTO
.
setAccNameList
(
nbCbAccDetailMapper
.
selectAccNameList
(
condition
));
...
...
rpc-dj-financial/src/main/resources/META-INF/orm/approvalRecordsMapper.xml
View file @
3353dea
...
@@ -133,6 +133,9 @@
...
@@ -133,6 +133,9 @@
<if
test=
"endDate != null"
>
<if
test=
"endDate != null"
>
and date(d.trans_time)
<
= date(#{endDate})
and date(d.trans_time)
<
= date(#{endDate})
</if>
</if>
<if
test=
"custId != null"
>
and r.custId = #{custId}
</if>
</where>
</where>
union all
union all
...
@@ -171,6 +174,9 @@
...
@@ -171,6 +174,9 @@
<if
test=
"endDate != null"
>
<if
test=
"endDate != null"
>
and date(d.trans_time)
<
= date(#{endDate})
and date(d.trans_time)
<
= date(#{endDate})
</if>
</if>
<if
test=
"custId != null"
>
and r.custId = #{custId}
</if>
</where>
</where>
) t1
) t1
order by t1.created_date desc
order by t1.created_date desc
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment