Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
maintain_service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
刘帅
maintain_service
Commits
b7fb9d30
Commit
b7fb9d30
authored
Nov 03, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.银联调整
parent
03d5462b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
9 deletions
+39
-9
application-prod.yml
maintain-admin/src/main/resources/application-prod.yml
+3
-3
ErpSettlementMaintainServiceImpl.java
...siness/service/impl/ErpSettlementMaintainServiceImpl.java
+23
-2
SysDept.java
.../java/com/maintain/common/core/domain/entity/SysDept.java
+4
-0
YinLianPayApi.java
.../src/main/java/com/maintain/common/pay/YinLianPayApi.java
+2
-3
index.vue
maintain-ui/src/views/system/dept/index.vue
+7
-1
No files found.
maintain-admin/src/main/resources/application-prod.yml
View file @
b7fb9d30
...
...
@@ -184,9 +184,9 @@ sms:
#地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
territory
:
ap-guangzhou
pay
:
appid
:
10037e6f72b586db0172b6ea24ec0000
appkey
:
6f7a00170935445fbe25e67a5ce1be48
url
:
https://
test-api-open
.chinaums.com/v6/poslink/transaction/pay
appid
:
8a81c1bd96cf23aa0199cc0a8dcb187c
appkey
:
02c4bc73faaf46c89e0c620345a11aec
url
:
https://
api-mop
.chinaums.com/v6/poslink/transaction/pay
merchantCode
:
123456789111115
terminalCode
:
gxrb0001
deviceType
:
11
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpSettlementMaintainServiceImpl.java
View file @
b7fb9d30
...
...
@@ -19,6 +19,7 @@ import com.maintain.business.mapper.ErpSettlementMaintainMapper;
import
com.maintain.business.mapper.ErpSettlementMaintainRepairFormMapper
;
import
com.maintain.business.service.IErpSettlementMaintainService
;
import
com.maintain.common.core.domain.PageQuery
;
import
com.maintain.common.core.domain.entity.SysDept
;
import
com.maintain.common.core.page.TableDataInfo
;
import
com.maintain.common.enums.RepairFormSettlementState
;
import
com.maintain.common.enums.SettlementState
;
...
...
@@ -28,6 +29,7 @@ import com.maintain.common.pay.PayResponse;
import
com.maintain.common.pay.YinLianPayApi
;
import
com.maintain.common.utils.StringUtils
;
import
com.maintain.common.utils.redis.RedisUtils
;
import
com.maintain.system.mapper.SysDeptMapper
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
...
...
@@ -54,6 +56,7 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
private
final
ErpRepairFormMapper
repairFormMapper
;
private
final
ErpClientMapper
clientMapper
;
private
final
YinLianPayApi
yinLianPayApi
;
private
final
SysDeptMapper
sysDeptMapper
;
@Value
(
"${pay.merchantCode}"
)
private
String
merchantCode
;
...
...
@@ -222,7 +225,25 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
@Override
public
Boolean
pay
(
ErpSettlementMaintainPayBo
bo
)
{
ErpSettlementMaintain
maintain
=
baseMapper
.
selectById
(
bo
.
getId
());
List
<
ErpSettlementMaintainRepairForm
>
maintainRepairForms
=
settlementMaintainRepairFormMapper
.
selectList
(
new
LambdaQueryWrapper
<
ErpSettlementMaintainRepairForm
>()
.
eq
(
ErpSettlementMaintainRepairForm:
:
getSettlementMaintainId
,
maintain
.
getId
())
);
if
(
ObjectUtil
.
isEmpty
(
maintainRepairForms
))
{
throw
new
ServiceException
(
"当前结算单未绑定维修单,请检查后重试!"
);
}
ErpSettlementMaintainRepairForm
settlementMaintainRepairForm
=
maintainRepairForms
.
get
(
0
);
ErpRepairForm
repairForm
=
repairFormMapper
.
selectById
(
settlementMaintainRepairForm
.
getRepairFormId
());
if
(
ObjectUtil
.
isEmpty
(
repairForm
))
{
throw
new
ServiceException
(
"报修单不存在,请联系管理员!"
);
}
SysDept
sysDept
=
sysDeptMapper
.
selectById
(
repairForm
.
getRepairerDeptId
());
if
(
ObjectUtil
.
isEmpty
(
sysDept
))
{
throw
new
ServiceException
(
"维修车间不存在,请联系管理员!"
);
}
if
(
ObjectUtil
.
isEmpty
(
sysDept
.
getTerminalCode
()))
{
throw
new
ServiceException
(
"当前车间未填写终端号,请联系管理员添加!"
);
}
if
(
ObjectUtil
.
isEmpty
(
maintain
))
{
throw
new
ServiceException
(
"当前支付订单不存在,请刷新后重试!"
);
}
...
...
@@ -232,7 +253,7 @@ public class ErpSettlementMaintainServiceImpl implements IErpSettlementMaintainS
// 生成一个时间戳单号
String
orderNo
=
String
.
valueOf
(
System
.
currentTimeMillis
());
int
money
=
maintain
.
getPracticalMoney
().
movePointRight
(
2
).
intValue
();
PayResponse
response
=
yinLianPayApi
.
pay
(
orderNo
,
money
,
bo
.
getPaymentAccount
());
PayResponse
response
=
yinLianPayApi
.
pay
(
orderNo
,
money
,
bo
.
getPaymentAccount
()
,
sysDept
.
getTerminalCode
()
);
if
(!
response
.
getErrCode
().
equals
(
"00"
))
{
throw
new
ServiceException
(
"结算单支付失败:"
+
response
.
getErrInfo
());
}
...
...
maintain-common/src/main/java/com/maintain/common/core/domain/entity/SysDept.java
View file @
b7fb9d30
...
...
@@ -85,5 +85,9 @@ public class SysDept extends TreeEntity<SysDept> {
* 类型(1总公司 2分公司 3车队 4车间 5总公司管理部门 6分公司管理部门 7维修点)
*/
private
String
type
;
/**
* 终端号
*/
private
String
terminalCode
;
}
maintain-common/src/main/java/com/maintain/common/pay/YinLianPayApi.java
View file @
b7fb9d30
...
...
@@ -29,8 +29,6 @@ public class YinLianPayApi {
private
String
url
;
@Value
(
"${pay.merchantCode}"
)
private
String
merchantCode
;
@Value
(
"${pay.terminalCode}"
)
private
String
terminalCode
;
@Value
(
"${pay.deviceType}"
)
private
String
deviceType
;
@Value
(
"${pay.payMode}"
)
...
...
@@ -70,9 +68,10 @@ public class YinLianPayApi {
* @param merchantOrderId 订单号
* @param transactionAmount 交易金额
* @param payCode 支付码
* @param terminalCode 终端号
* @return 支付结果
*/
public
PayResponse
pay
(
String
merchantOrderId
,
int
transactionAmount
,
String
payCode
)
{
public
PayResponse
pay
(
String
merchantOrderId
,
int
transactionAmount
,
String
payCode
,
String
terminalCode
)
{
// 组建请求报文
PayBody
reqBody
=
new
PayBody
();
reqBody
.
merchantCode
=
merchantCode
;
...
...
maintain-ui/src/views/system/dept/index.vue
View file @
b7fb9d30
...
...
@@ -172,6 +172,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
v-if=
"form.type == 4"
>
<el-form-item
label=
"终端号"
prop=
"terminalCode"
>
<el-input
v-model=
"form.terminalCode"
placeholder=
"请输入终端号"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -284,7 +289,8 @@ export default {
phone
:
undefined
,
email
:
undefined
,
status
:
"
0
"
,
type
:
undefined
type
:
undefined
,
terminalCode
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
...
...
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