提交 1aa196b5 authored 作者: liuhaiquan's avatar liuhaiquan

1.修改付款详情借出方信息

2.修改借款表借出方和借款方字段定义,并修改相应接口。
上级 f18a4723
......@@ -22,8 +22,13 @@ public class OwnerLoanRecordParam {
@MoneyInConvert
private BigDecimal loanBalance;
@ApiModelProperty(value = "借款方", example = "伟华煤炭运销公司")
@NotBlank(message = "借款方不能为空")
@ApiModelProperty(value = "借出方ID", example = "伟华煤炭运销公司")
@NotNull(message = "借出方ID不能为空")
private Integer borrowerId;
@ApiModelProperty(value = "借出方", example = "诚联信网络科技有限公司")
@NotBlank(message = "借出方不能为空")
private String borrower;
@ApiModelProperty(value = "收款方")
......@@ -32,12 +37,13 @@ public class OwnerLoanRecordParam {
@ApiModelProperty(value = "收款方账户")
private String payeeAccount;
@ApiModelProperty(value = "借出方", example = "诚联信网络科技有限公司")
@NotBlank(message = "借出方不能为空")
@ApiModelProperty(value = "借款方", example = "伟华煤炭运销公司")
@NotBlank(message = "借款方不能为空")
private String lendingParty;
@ApiModelProperty(value = "借方账户", example = "诚联信银行账户")
@NotBlank(message = "借方不能为空")
@ApiModelProperty(value = "借方账户", example = "诚联信银行账户")
@NotBlank(message = "借方不能为空")
private String lendingPartyAccount;
@ApiModelProperty(value = "借出时效(天)", example = "2")
......
......@@ -20,22 +20,22 @@ import java.math.BigDecimal;
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class OwnerOrderPaymentDetailVO {
public class CarrierOwnerOrderPaymentDetailVO {
@ApiModelProperty("借款单号")
private Long loanNo;
@ApiModelProperty("付款方")
private String lendingParty;
@ApiModelProperty("付款方(借款记录中的借出方为现在的付款方)")
private String payer;
@ApiModelProperty("付款账户")
private String lendingPartyAccount;
@ApiModelProperty("付款账户(借款记录中的借出方账户为现在的付款方账户)")
private String payerAccount;
@ApiModelProperty("收款方")
private String borrower;
@ApiModelProperty(value = "收款方",example = "馨祥和")
private String payee;
@ApiModelProperty("收款账户")
private String borrowerAccount;
private String payeeAccount;
@MoneyOutConvert
@ApiModelProperty("订单金额")
......
......@@ -72,11 +72,11 @@ public class ExportOwnerLoanRecordVO {
private String borrower;
@ApiModelProperty("借方")
@ApiModelProperty("借方")
private String lendingParty;
@ApiModelProperty("借方账户")
@ApiModelProperty("借方账户")
private String lendingPartyAccount;
......
......@@ -66,14 +66,13 @@ public class OwnerLoanRecordVO {
@ApiModelProperty("借款方")
private String borrower;
@ApiModelProperty("借出方ID")
private String lendingPartyId;
@ApiModelProperty("借出方")
@ApiModelProperty("借款方")
private String lendingParty;
@ApiModelProperty("借方账户")
@ApiModelProperty("借方账户")
private String lendingPartyAccount;
......
......@@ -16,6 +16,9 @@ import lombok.Setter;
@Setter
public class BorrowerSelectVO {
@ApiModelProperty("id")
private Integer id;
@ApiModelProperty("借出方")
private String name;
......
......@@ -5,7 +5,7 @@ import com.clx.performance.param.pc.loan.carrier.*;
import com.clx.performance.param.pc.loan.owner.ExportPaymentApplicationFormParam;
import com.clx.performance.service.loan.OwnerLoanRecordService;
import com.clx.performance.vo.pc.loan.carrier.CarrierCashierInfoVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerOrderPaymentDetailVO;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerOrderPaymentDetailVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerLoanRecordVO;
import com.clx.performance.vo.pc.loan.carrier.CarrierTransferPaymentDetailVO;
import com.msl.common.base.PageData;
......@@ -67,8 +67,8 @@ public class CarrierOwnerLoanRecordController {
@ApiOperation(value = "订单支付详情",notes = "<br>By:刘海泉")
@GetMapping("/getOrderPaymentDetail")
@UnitCovert(param = false)
public Result<OwnerOrderPaymentDetailVO> getOrderPaymentDetail(@Param("id") @NotNull(message = "id不能为空") Integer id) {
OwnerOrderPaymentDetailVO vo = ownerLoanRecordService.getOrderPaymentDetail(id);
public Result<CarrierOwnerOrderPaymentDetailVO> getOrderPaymentDetail(@Param("id") @NotNull(message = "id不能为空") Integer id) {
CarrierOwnerOrderPaymentDetailVO vo = ownerLoanRecordService.getOrderPaymentDetail(id);
return Result.ok(vo);
}
......
......@@ -84,12 +84,9 @@ public class OwnerLoanRecord implements HasKey<Integer> {
@ApiModelProperty("汇款识别码")
private String remittanceIdentificationCode;
@TableField("lending_party_id")
@ApiModelProperty("借出方ID")
private String lendingPartyId;
@TableField("lending_party")
@ApiModelProperty("借方")
@ApiModelProperty("借方")
private String lendingParty;
@TableField("lending_party_account")
......
......@@ -52,17 +52,12 @@ import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Consumer;
import java.util.stream.Collectors;
/**
......@@ -102,6 +97,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
private final ContractTemplateFeign contractTemplateFeign;
private final PaymentFromConfig paymentFromConfig;
private final NbBankConfig nbBankConfig;
private final ClxPayeeConfig clxPayeeConfig;
@Override
public IPage<OwnerLoanRecordVO> pageOwnerLoanRecord(PageCarrierOwnerLoanRecordParam param) {
......@@ -337,10 +333,15 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
@Override
public OwnerOrderPaymentDetailVO getOrderPaymentDetail(Integer id) {
public CarrierOwnerOrderPaymentDetailVO getOrderPaymentDetail(Integer id) {
OwnerLoanRecord ownerLoanRecord = ownerLoanRecordDao.getEntityByKey(id).orElseThrow(
PerformanceResultEnum.DATA_NOT_FIND);
OwnerOrderPaymentDetailVO vo = ownerLoanRecordStruct.convertOrderPaymentDetail(ownerLoanRecord);
CarrierOwnerOrderPaymentDetailVO vo = ownerLoanRecordStruct.convertOrderPaymentDetail(ownerLoanRecord);
vo.setPayer(ownerLoanRecord.getBorrower());
vo.setPayerAccount(ownerLoanRecord.getPayeeAccount());
ClxPayeeConfig.PayeeConfig payeeMap = ClxPayeeConfig.getPayeeMap(ClxPayeeConfig.XXH_ID);
vo.setPayee(payeeMap.getName());
vo.setPayeeAccount(payeeMap.getAccount());
//计算倒计时时间,下单时间 + 30天 为截止时间
LocalDateTime endTime = ownerLoanRecord.getCreateTime().plusDays(30);
vo.setFinalPaymentTime(DateUtils.formatDateTime(endTime).get());
......
......@@ -8,7 +8,7 @@ import com.clx.performance.param.pc.loan.owner.OwnerLoanRecordParam;
import com.clx.performance.vo.pc.loan.carrier.CarrierCashierInfoVO;
import com.clx.performance.vo.pc.loan.carrier.CarrierTransferPaymentDetailVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerLoanRecordVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerOrderPaymentDetailVO;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerOrderPaymentDetailVO;
import com.clx.performance.vo.pc.loan.owner.OwnerLoanRecordDetail;
......@@ -31,7 +31,7 @@ public interface OwnerLoanRecordService {
CarrierCashierInfoVO getCashierInfo(Integer id);
OwnerOrderPaymentDetailVO getOrderPaymentDetail(Integer id);
CarrierOwnerOrderPaymentDetailVO getOrderPaymentDetail(Integer id);
CarrierTransferPaymentDetailVO getTransferPaymentDetail(Integer id);
......
......@@ -33,7 +33,7 @@ public class BorrowerSqlProvider {
public String selectAllBorrowConfig() {
return new SQL(){{
SELECT(" a.name,a.bank_card_no as bankCardNo,b.type,b.day ");
SELECT(" a.id,a.name,a.bank_card_no as bankCardNo,b.type,b.day ");
FROM("borrower a");
LEFT_OUTER_JOIN("borrower_config b on a.id = b.borrower_id ");
WHERE("a.delete_status = " + DeleteStatusEnum.NO.getCode());
......
......@@ -19,7 +19,7 @@ public class OwnerLoanRecordSqlProvider {
" running_water_open_no as runningWaterOpenNo, merchant_running_water_no as merchantRunningWaterNo, " +
" loan_no as loanNo, loan_type as loanType, loan_balance as loanBalance, " +
" borrower, borrower_account as borrowerAccount, remittance_identification_code as remittanceIdentificationCode, " +
" lending_party_id as lendingPartyId, lending_party as lendingParty, lending_party_account as lendingPartyAccount, " +
" lending_party as lendingParty, lending_party_account as lendingPartyAccount, " +
" payee, payee_account as payeeAccount, " +
" status, " +
" date_format(approve_time, '%Y-%m-%d %H:%i:%s') as approveTime, approve_by as approveBy, " +
......
......@@ -2,8 +2,8 @@ package com.clx.performance.struct.loan;
import com.clx.performance.model.loan.OwnerLoanRecord;
import com.clx.performance.vo.pc.loan.carrier.CarrierCashierInfoVO;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerOrderPaymentDetailVO;
import com.clx.performance.vo.pc.loan.carrier.ExportOwnerLoanRecordVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerOrderPaymentDetailVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerLoanRecordVO;
import com.msl.common.utils.DateStructUtil;
import org.mapstruct.Mapper;
......@@ -19,7 +19,7 @@ public interface OwnerLoanRecordStruct {
CarrierCashierInfoVO convertCashierInfo(OwnerLoanRecord ownerLoanRecord);
OwnerOrderPaymentDetailVO convertOrderPaymentDetail(OwnerLoanRecord ownerLoanRecord);
CarrierOwnerOrderPaymentDetailVO convertOrderPaymentDetail(OwnerLoanRecord ownerLoanRecord);
ExportOwnerLoanRecordVO convert(OwnerLoanRecord ownerLoanRecord);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论