Merge remote-tracking branch 'origin/master'

This commit is contained in:
DESKTOP-369JRHT\12997 2024-07-31 15:22:17 +08:00
commit de99cf135d
14 changed files with 104 additions and 88 deletions

View File

@ -55,3 +55,12 @@ export function getPaymentParameter(id) {
})
}
// 根据deptId查询支付参数配置信息
export function getPaymentParameterByDeptId(deptId) {
return request({
url: '/paymentParameterConfig/getListByDeptId/'+deptId,
method: 'get',
})
}

View File

@ -78,7 +78,7 @@
width="100"
label="操作">
<template slot-scope="scope">
<div style="color: #409EFF;cursor: pointer" v-hasPermi="['Merchant:edit']" @click="editMerchant(scope.row)">修改</div>
<div style="color: #409EFF;cursor: pointer" v-hasPermi="['Merchant:edit']" v-if="scope.row.isUse!=1" @click="editMerchant(scope.row)">修改</div>
</template>
</el-table-column>
</el-table>
@ -204,7 +204,7 @@
<el-dialog :title="addMerchantTitile" :visible.sync="addMerchants" width="550px">
<el-form :model="form" ref="formAdd" :rules="rules">
<el-form-item label="所属机构" :label-width="formLabelWidth" prop="deptId">
<el-select v-model="form.deptId+''" placeholder="请选择所属机构" style="width: 350px">
<el-select v-model="form.deptId+''" disabled placeholder="请选择所属机构" style="width: 350px">
<el-option
v-for="item in deptListSelect"
:key="item.deptId"
@ -220,11 +220,17 @@
clearable
style="width: 350px"
>
<!-- <el-option-->
<!-- v-for="dict in dict.type.payment_channel"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<el-option
v-for="dict in dict.type.payment_channel"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="(item,index) in payChannel"
:key="index"
:label="item.paymentChannel"
:value="item.paymentChannel"
/>
</el-select>
</el-form-item>
@ -365,11 +371,17 @@
clearable
style="width: 240px"
>
<!-- <el-option-->
<!-- v-for="dict in dict.type.payment_channel"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<el-option
v-for="dict in dict.type.payment_channel"
:key="dict.value"
:label="dict.label"
:value="dict.value"
v-for="(item,index) in payChannel"
:key="index"
:label="item.paymentChannel"
:value="item.paymentChannel"
/>
</el-select>
</el-form-item>
@ -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 = '修改商户信息'

View File

@ -162,7 +162,10 @@
/>
</el-select>
</el-form-item>
<el-form-item label="机构号" prop="">
<el-form-item label="机构号" prop="" v-if="deviceInfo.paymentChannel!='富友'">
<el-input v-model="deviceInfo.insCd" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="机构号" prop="insCd" v-else>
<el-input v-model="deviceInfo.insCd" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="公钥" prop="publicKey">

View File

@ -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));
}
}

View File

@ -16,7 +16,7 @@ import java.util.List;
* @since 2024-07-24 09:18:04
*/
public interface PaymentParameterConfigMapper extends BaseMapper<PaymentParameterConfig> {
IPage<PaymentParameterConfigVo> selectListPage(Page page,@Param("entity") PaymentParameterConfigVo paymentParameterConfigVo);
IPage<PaymentParameterConfigVo> selectListPage(Page page,@Param("entity") PaymentParameterConfigVo paymentParameterConfigVo,@Param("ownDeptStr") String ownDeptStr);
PaymentParameterConfigVo selectInfoById(@Param("id") Integer id);
}

View File

@ -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
<where>
<if test="ownDeptStr !=null and ownDeptStr !=''">
and sd.ancestors like concat(#{ownDeptStr},'%')
</if>
<if test="entity.deptId != null and entity.deptId != ''">
and ppc.dept_id = #{entity.deptId}
</if>

View File

@ -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;

View File

@ -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<PaymentParameterConfigMapper,PaymentParameterConfig> implements PaymentParameterConfigService {
@Autowired
@Lazy
private ISysDeptService deptService;
/**
* 通过ID查询单条数据
*
@ -93,7 +103,13 @@ public class PaymentParameterConfigServiceImpl extends ServiceImpl<PaymentParame
@Override
public IPage<PaymentParameterConfigVo> 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

View File

@ -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();

View File

@ -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);

View File

@ -395,6 +395,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
// 当为现金支付时插入到总的订单表
if ("CASH".equals(cardValueRecordDTO.getPaymentType())) {
AllOrderInfo allOrderInfo = getAllOrderInfo(cardValueRecordDTO);
allOrderInfo.setPaymentChannel("现金支付");
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
}

View File

@ -88,9 +88,18 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
* 退款原因
*/
private String reasonRefund;
/**
*商户号
*/
private String mchntCd;
/**
*支付通道
*/
private String paymentChannel;
private Long mId;
/**
*商户id
*/
private Integer mId;
/**
* 退款订单
*/

View File

@ -252,6 +252,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
allOrderInfo.setPayChannel(payChannel);
allOrderInfo.setStatus("paid");
allOrderInfo.setContent("挂账订单");
allOrderInfo.setPaymentChannel("挂账支付");
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
}

View File

@ -1463,6 +1463,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
} else {
allOrderInfo.setContent("收银台订单");
}
allOrderInfo.setPaymentChannel("现金支付");
AllOrderInfo allOrderInfo1 = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
if (ObjectUtil.isEmpty(allOrderInfo1)) {
allOrderInfoService.insertAllOrderInfo(allOrderInfo);