diff --git a/fuintAdmin_zt/src/api/payConfig/paymentParameter.js b/fuintAdmin_zt/src/api/payConfig/paymentParameter.js
index 941345bb2..25863b306 100644
--- a/fuintAdmin_zt/src/api/payConfig/paymentParameter.js
+++ b/fuintAdmin_zt/src/api/payConfig/paymentParameter.js
@@ -55,3 +55,12 @@ export function getPaymentParameter(id) {
})
}
+
+// 根据deptId查询支付参数配置信息
+export function getPaymentParameterByDeptId(deptId) {
+ return request({
+ url: '/paymentParameterConfig/getListByDeptId/'+deptId,
+ method: 'get',
+ })
+}
+
diff --git a/fuintAdmin_zt/src/views/components/Service/payment.vue b/fuintAdmin_zt/src/views/components/Service/payment.vue
index 35f7487f0..897742807 100644
--- a/fuintAdmin_zt/src/views/components/Service/payment.vue
+++ b/fuintAdmin_zt/src/views/components/Service/payment.vue
@@ -78,7 +78,7 @@
width="100"
label="操作">
- 修改
+ 修改
@@ -204,7 +204,7 @@
-
+
+
+
+
+
+
+
@@ -365,11 +371,17 @@
clearable
style="width: 240px"
>
+
+
+
+
+
+
@@ -479,6 +491,7 @@ import {
getRuleConfig,
listRuleConfig
} from "@/api/payConfig/ruleConfig";
+import {getPaymentParameterByDeptId} from "@/api/payConfig/paymentParameter";
export default {
dicts: ['payment_channel'],
@@ -514,6 +527,7 @@ export default {
desc: '',
boxlist: [],
},
+ payChannel:[],
formRule: {
ruleList:[],
ruleType:1,
@@ -531,74 +545,8 @@ export default {
title: "",
boxlist: [],
merchantConfig: {},
- tableData: [{
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄',
- PaymentChannel: '富有',
- PaymentNum: '00004879449874854',
- price: '1587461740.00',
- status: '正在使用',
- remark: '',
- founder: 'xxxx',
- }, {
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄',
- PaymentChannel: '富有',
- PaymentNum: '00004879449874854',
- price: '1587461740.00',
- status: '正在使用',
- remark: '',
- founder: 'xxxx',
- }, {
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄',
- PaymentChannel: '富有',
- PaymentNum: '00004879449874854',
- price: '1587461740.00',
- status: '正在使用',
- remark: '',
- founder: 'xxxx',
- }, {
- date: '2016-05-02',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄',
- PaymentChannel: '富有',
- PaymentNum: '00004879449874854',
- price: '1587461740.00',
- status: '正在使用',
- remark: '',
- founder: 'xxxx',
- },],
- tableData1: [{
- date: '2016-05-02',
- name: '按交易类型分账',
- address: 'xxxxxxxxxxxxxxxxxxx',
- RuleName: '规则名字',
- PaymentNum: '00004879449874854',
- price: '1587461740.00',
- status: true,
- remark: '',
- founder: 'xxxx',
- }, {
- id: 2,
- date: '2016-05-04',
- name: '王小虎',
- address: 'xxxxxxxxxxxxxxxxxxx',
- }, {
- id: 3,
- date: '2016-05-01',
- name: '王小虎',
- address: 'xxxxxxxxxxxxxxxxxxx',
-
- }, {
- id: 4,
- date: '2016-05-03',
- name: '王小虎',
- address: 'xxxxxxxxxxxxxxxxxxx',
- }],
+ tableData: [],
+ tableData1: [],
rules: {
merchantName: [
{required: true, message: '请选择支付通道', trigger: 'blur'},
@@ -622,6 +570,7 @@ export default {
this.getList();
this.selectChildByDeptIdApi()
this.getOilGunList()
+ this.getDeptList(this.deptId)
},
methods: {
submitEnable(val){
@@ -753,6 +702,16 @@ export default {
this.form = {}
this.form.deptId = this.deptId
},
+ chooseDept(deptId){
+ this.form.merchantName = ""
+ this.getDeptList(deptId)
+ },
+ // 根据机构id获取支付通道信息
+ getDeptList(deptId){
+ getPaymentParameterByDeptId(deptId).then(res => {
+ this.payChannel = res.data
+ })
+ },
editRule(data){
getRuleConfig(data.id).then(res => {
this.Ruletitle = '修改商户信息'
diff --git a/fuintAdmin_zt/src/views/setting/pay/index.vue b/fuintAdmin_zt/src/views/setting/pay/index.vue
index 15ea2ffb3..5b097580f 100644
--- a/fuintAdmin_zt/src/views/setting/pay/index.vue
+++ b/fuintAdmin_zt/src/views/setting/pay/index.vue
@@ -162,7 +162,10 @@
/>
-
+
+
+
+
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/PaymentParameterConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/PaymentParameterConfigController.java
index d171d0095..b77d1ca9e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/PaymentParameterConfigController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/PaymentParameterConfigController.java
@@ -88,5 +88,11 @@ public class PaymentParameterConfigController extends BaseController {
public ResponseObject selectInfoById(@PathVariable Integer id){
return getSuccessResult(paymentParameterConfigService.selectInfoById(id));
}
+
+ @GetMapping("getListByDeptId/{deptId}")
+ public ResponseObject selectListByDeptID(@PathVariable Integer deptId){
+ return getSuccessResult(paymentParameterConfigService.selectListByDeptID(deptId));
+ }
+
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/PaymentParameterConfigMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/PaymentParameterConfigMapper.java
index c954fd52d..5587b2fbf 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/PaymentParameterConfigMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/PaymentParameterConfigMapper.java
@@ -16,7 +16,7 @@ import java.util.List;
* @since 2024-07-24 09:18:04
*/
public interface PaymentParameterConfigMapper extends BaseMapper {
- IPage selectListPage(Page page,@Param("entity") PaymentParameterConfigVo paymentParameterConfigVo);
+ IPage selectListPage(Page page,@Param("entity") PaymentParameterConfigVo paymentParameterConfigVo,@Param("ownDeptStr") String ownDeptStr);
PaymentParameterConfigVo selectInfoById(@Param("id") Integer id);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/PaymentParameterConfigMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/PaymentParameterConfigMapper.xml
index 19b464c74..4d5953059 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/PaymentParameterConfigMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/PaymentParameterConfigMapper.xml
@@ -7,6 +7,9 @@
LEFT JOIN sys_dept sd ON ppc.dept_id = sd.dept_id
LEFT JOIN t_account ta ON ppc.create_by = ta.acct_id
+
+ and sd.ancestors like concat(#{ownDeptStr},'%')
+
and ppc.dept_id = #{entity.deptId}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
index bdeeceaba..3c28a0eb4 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
@@ -452,7 +452,7 @@ public class FyPayServiceImpl implements FyPayService {
if (!reqMap.get("trans_stat").equals("USERPAYING")) {
String payChannel = "cashier";
if (ObjectUtil.isNotEmpty(map1.get("payChannel"))) payChannel = map1.get("payChannel");
- this.insertAllOrderInfo(receiveParameter, payStatus,discountAmount,payChannel);
+ this.insertAllOrderInfo(receiveParameter, payStatus,discountAmount,payChannel,merchantConfig);
}
if (ObjectUtil.isNotEmpty(merchantConfig)) {
@@ -570,7 +570,7 @@ public class FyPayServiceImpl implements FyPayService {
// 添加订单信息
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
- this.insertAllOrderInfo(receiveParameter, discountAmount);
+ this.insertAllOrderInfo(receiveParameter, discountAmount,merchantConfig);
res.put("code", "success");
res.put("msg", "成功");
@@ -601,7 +601,7 @@ public class FyPayServiceImpl implements FyPayService {
/**
* 添加所有订单信息
*/
- private void insertAllOrderInfo(ReceiveParameter receiveParameter, String payStatus,Double discountAmount,String payChannel) {
+ private void insertAllOrderInfo(ReceiveParameter receiveParameter, String payStatus,Double discountAmount,String payChannel,MerchantConfig merchantConfig) {
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(receiveParameter.getOrderNo());
allOrderInfo.setType(receiveParameter.getType());
@@ -616,6 +616,9 @@ public class FyPayServiceImpl implements FyPayService {
if (payStatus.equals("paid")) {
allOrderInfo.setPayTime(new Date());
}
+ allOrderInfo.setPaymentChannel(merchantConfig.getPaymentChannel());
+ allOrderInfo.setMchntCd(merchantConfig.getMchntCd());
+ allOrderInfo.setMId(merchantConfig.getId());
allOrderInfo.setContent(receiveParameter.getContent());
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
if (ObjectUtil.isEmpty(allOrderInfo1)) {
@@ -626,7 +629,7 @@ public class FyPayServiceImpl implements FyPayService {
/**
* 添加所有订单信息
*/
- private void insertAllOrderInfo(ReceiveParameter receiveParameter,Double discountAmount) {
+ private void insertAllOrderInfo(ReceiveParameter receiveParameter,Double discountAmount,MerchantConfig merchantConfig) {
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(receiveParameter.getOrderNo());
allOrderInfo.setType(receiveParameter.getType());
@@ -638,6 +641,9 @@ public class FyPayServiceImpl implements FyPayService {
allOrderInfo.setStatus("unpaid");
allOrderInfo.setContent(receiveParameter.getContent());
allOrderInfo.setDiscountAmount(discountAmount);
+ allOrderInfo.setPaymentChannel(merchantConfig.getPaymentChannel());
+ allOrderInfo.setMchntCd(merchantConfig.getMchntCd());
+ allOrderInfo.setMId(merchantConfig.getId());
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(receiveParameter.getOrderNo());
if (ObjectUtil.isEmpty(allOrderInfo1)) {
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
@@ -809,7 +815,7 @@ public class FyPayServiceImpl implements FyPayService {
BeanUtils.copyProperties(receiveParameterPos, receiveParameter);
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
- this.insertAllOrderInfo(receiveParameter, receiveParameterPos.getPayType(),discountAmount,"POS");
+ this.insertAllOrderInfo(receiveParameter, receiveParameterPos.getPayType(),discountAmount,"POS",merchantConfig);
if (reqMap.get("trans_stat").equals("SUCCESS")) {
payStatus = "paid";
if (!ObjectUtil.isEmpty(oilOrder)) {
@@ -953,7 +959,7 @@ public class FyPayServiceImpl implements FyPayService {
// 添加订单信息
Double discountAmount = 0.0;
if (ObjectUtil.isNotEmpty(oilOrder)) discountAmount = oilOrder.getDiscountAmount();
- this.insertAllOrderInfo(receiveParameter, discountAmount);
+ this.insertAllOrderInfo(receiveParameter, discountAmount,merchantConfig);
System.out.println(resMap);
}
return resMap;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentParameterConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentParameterConfigServiceImpl.java
index 25ddddba8..f3ee35b15 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentParameterConfigServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentParameterConfigServiceImpl.java
@@ -10,6 +10,12 @@ import com.fuint.api.fuyou.entity.PaymentParameterConfig;
import com.fuint.api.fuyou.mapper.PaymentParameterConfigMapper;
import com.fuint.api.fuyou.service.PaymentParameterConfigService;
import com.fuint.api.fuyou.vo.PaymentParameterConfigVo;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
+import com.fuint.system.dept.entity.SysDept;
+import com.fuint.system.dept.service.ISysDeptService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
@@ -26,6 +32,10 @@ import java.util.List;
@Service("paymentParameterConfigService")
public class PaymentParameterConfigServiceImpl extends ServiceImpl implements PaymentParameterConfigService {
+ @Autowired
+ @Lazy
+ private ISysDeptService deptService;
+
/**
* 通过ID查询单条数据
*
@@ -93,7 +103,13 @@ public class PaymentParameterConfigServiceImpl extends ServiceImpl selectListPage(Page page, PaymentParameterConfigVo paymentParameterConfigVo) {
- return baseMapper.selectListPage(page,paymentParameterConfigVo);
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ SysDept sysDept = deptService.getById(nowAccountInfo.getDeptId());
+ String ancestors = sysDept.getAncestors();
+ if (!"0".equals(sysDept.getAncestors())) {
+ ancestors = sysDept.getAncestors()+ "," +sysDept.getDeptId();
+ }
+ return baseMapper.selectListPage(page,paymentParameterConfigVo,ancestors);
}
@Override
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java
index 05eacc737..b2b19ba5a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java
@@ -293,6 +293,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
if ("CASH".equals(integralOrdersList.getPaymentType()) && integralOrdersList.getAllAmout().compareTo(0.0) > 0) {
try{
AllOrderInfo allOrderInfo = getAllOrderInfo(integralOrdersList,orderNo);
+ allOrderInfo.setPaymentChannel("现金支付");
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
}catch (Exception e) {
e.printStackTrace();
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
index 9f1543590..089082157 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
@@ -271,6 +271,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
// 当为现金支付时插入到总的订单表
if ("CASH".equals(cardFuelRecordDTO.getPaymentType())) {
AllOrderInfo allOrderInfo = getAllOrderInfo(cardFuelRecordDTO);
+ allOrderInfo.setPaymentChannel("现金支付");
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
CardValueOrders cardValueOrders = new CardValueOrders();
BeanUtils.copyProperties(allOrderInfo, cardValueOrders);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
index b00dd1b51..9e0f69191 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java
@@ -395,6 +395,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl i
allOrderInfo.setPayChannel(payChannel);
allOrderInfo.setStatus("paid");
allOrderInfo.setContent("挂账订单");
+ allOrderInfo.setPaymentChannel("挂账支付");
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
index 03e9aa024..96073522c 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
@@ -1463,6 +1463,7 @@ public class OilOrderServiceImpl extends ServiceImpl i
} else {
allOrderInfo.setContent("收银台订单");
}
+ allOrderInfo.setPaymentChannel("现金支付");
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
if (ObjectUtil.isEmpty(allOrderInfo1)) {
allOrderInfoService.insertAllOrderInfo(allOrderInfo);