Эх сурвалжийг харах

app端,新增物流结算详情接口 调整贸易结算接口

xucaiqin 2 жил өмнө
parent
commit
df5c37ec57
16 өөрчлөгдсөн 319 нэмэгдсэн , 25 устгасан
  1. 23 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/app/AppKwpSettlementLogisticsController.java
  2. 1 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/operate/SettlementTradeController.java
  3. 9 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementLogisticsMapper.java
  4. 9 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementOfflineMapper.java
  5. 4 5
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementRecordMapper.java
  6. 9 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementWalletMapper.java
  7. 1 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsDto.java
  8. 109 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/SettlementVo.java
  9. 41 5
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java
  10. 9 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementOfflineService.java
  11. 17 5
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementTradeService.java
  12. 5 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java
  13. 3 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/PayCenterService.java
  14. 36 0
      sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementLogisticsMapper.xml
  15. 13 2
      sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementOfflineMapper.xml
  16. 30 0
      sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementWalletMapper.xml

+ 23 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/app/AppKwpSettlementLogisticsController.java

@@ -1,6 +1,7 @@
 package com.sckw.payment.controller.app;
 
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.payment.model.constant.LogisticsUnitType;
 import com.sckw.payment.model.vo.req.SettlementReq;
 import com.sckw.payment.service.KwpSettlementLogisticsService;
 import jakarta.annotation.Resource;
@@ -36,6 +37,17 @@ public class AppKwpSettlementLogisticsController {
         return HttpResult.ok(kwpSettlementLogisticsService.detailCollection(id));
     }
 
+    /**
+     * 承运方 app端
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("carrierDetail")
+    public HttpResult carrierDetail(@RequestParam("id") String id) {
+        return HttpResult.ok(kwpSettlementLogisticsService.queryDetail(Long.parseLong(id), LogisticsUnitType.SHIPPER));
+    }
+
 
     //   ========= 运费付款 托运方 =========
     @PostMapping(name = "运费付款-物流订单列表", path = "pageListPayment")
@@ -52,4 +64,15 @@ public class AppKwpSettlementLogisticsController {
     public HttpResult detailPayment(@RequestParam("id") Long id) {
         return HttpResult.ok(kwpSettlementLogisticsService.detailPayment(id));
     }
+
+    /**
+     * app端详情
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("shipperDetail")
+    public HttpResult shipperDetail(@RequestParam("id") String id) {
+        return HttpResult.ok(kwpSettlementLogisticsService.queryDetail(Long.parseLong(id), LogisticsUnitType.CARRIER));
+    }
 }

+ 1 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/operate/SettlementTradeController.java

@@ -63,7 +63,7 @@ public class SettlementTradeController {
      * @param settlementReq
      * @return
      */
-    @PostMapping(name = "收款-表尾金额结算数据", path = "sum")
+    @PostMapping( "sum")
     public HttpResult sum(@RequestBody @Valid SettlementTradeReq settlementReq) {
         settlementReq.check();
         return HttpResult.ok(settlementTradeService.sumMoney(settlementReq));

+ 9 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementLogisticsMapper.java

@@ -110,4 +110,13 @@ public interface KwpSettlementLogisticsMapper extends BaseMapper<KwpSettlementLo
     List<MoneyType> sumMoneyType(@Param("entId") Long entId, @Param("cur") List<LocalDateTime> cur, @Param("pre") List<LocalDateTime> pre, @Param("unitType") Integer unitType);
 
     List<KwpSettlementRecord> queryRecord();
+
+    /**
+     * app端详情
+     *
+     * @param id
+     * @param unitType
+     * @return
+     */
+    SettlementLogisticsDto selectDetail(@Param("id")Long id, @Param("unitType")Integer unitType);
 }

+ 9 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementOfflineMapper.java

@@ -3,6 +3,7 @@ package com.sckw.payment.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpSettlementOffline;
 import com.sckw.payment.model.dto.SettlementOfflineDto;
+import com.sckw.payment.model.vo.SettlementVo;
 import com.sckw.payment.model.vo.req.SettlementOfflineReq;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -19,10 +20,17 @@ public interface KwpSettlementOfflineMapper extends BaseMapper<KwpSettlementOffl
 
     SettlementOfflineDto detailLogisticsCollection(@Param("id") Long id);
 
-    Integer confirmLogisticsCollection(@Param("id") Long id, @Param("price") Float price);
 
     List<SettlementOfflineDto> pageList(@Param("offlineReq") SettlementOfflineReq settlementOfflineReq);
 
+    /**
+     * app端查询列表
+     *
+     * @param settlementOfflineReq
+     * @return
+     */
+    List<SettlementVo> appList(@Param("offlineReq") SettlementOfflineReq settlementOfflineReq);
+
     /**
      * 运营端查询
      *

+ 4 - 5
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementRecordMapper.java

@@ -2,19 +2,18 @@ package com.sckw.payment.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpSettlementRecord;
-import com.sckw.payment.model.vo.req.FinanceCount;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
 /**
-* @date 2023-09-13 18:48:30
-* @author xucaiqin
-*/
+ * @author xucaiqin
+ * @date 2023-09-13 18:48:30
+ */
 @Mapper
 public interface KwpSettlementRecordMapper extends BaseMapper<KwpSettlementRecord> {
     void insertBatch(@Param("list") List<KwpSettlementRecord> list);
 
-    void countByDay(FinanceCount financeCount);
+    void countByDay(@Param("time") List<String> time);
 }

+ 9 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementWalletMapper.java

@@ -3,6 +3,7 @@ package com.sckw.payment.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpSettlementWallet;
 import com.sckw.payment.model.dto.SettlementWalletDto;
+import com.sckw.payment.model.vo.SettlementVo;
 import com.sckw.payment.model.vo.req.SettlementWalletReq;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -31,6 +32,14 @@ public interface KwpSettlementWalletMapper extends BaseMapper<KwpSettlementWalle
 
     List<SettlementWalletDto> pageList(@Param("walletReq") SettlementWalletReq walletReq);
 
+    /**
+     * app端结算列表
+     *
+     * @param walletReq
+     * @return
+     */
+    List<SettlementVo> appList(@Param("walletReq") SettlementWalletReq walletReq);
+
     /**
      * 运营端查询钱包结算记录
      *

+ 1 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsDto.java

@@ -188,4 +188,5 @@ public class SettlementLogisticsDto implements ISettlement  {
      */
     private String attachmentUrl;
 
+    private String percentage;
 }

+ 109 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/SettlementVo.java

@@ -0,0 +1,109 @@
+package com.sckw.payment.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 结算记录 线下和电子钱包
+ */
+@Getter
+@Setter
+public class SettlementVo {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业类型
+     */
+    private Long entId;
+
+    /**
+     * 结算id(交易订单结算/物流订单结算)
+     */
+    private Long settlementId;
+
+    /**
+     * 1-物流 2-交易
+     */
+    private Integer orderType;
+
+    /**
+     * 线上渠道 1-huifu
+     */
+    private Integer channel;
+
+    /**
+     * 回款时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date payTime;
+
+    /**
+     * 金额
+     */
+    private BigDecimal payPrice;
+
+    /**
+     * 剩余待付金额
+     */
+    private BigDecimal topayPrice;
+
+    /**
+     * 类型(0付款、1退款)
+     */
+    private Integer type;
+    /**
+     * 附件地址
+     */
+    private String url;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态(0扣款、1结算、2异常、)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建人名称
+     */
+    private String createByLabel;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新人名称
+     */
+    private String updateByLabel;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+}

+ 41 - 5
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java

@@ -12,9 +12,10 @@ import com.sckw.payment.dao.KwpSettlementLogisticsMapper;
 import com.sckw.payment.model.KwpSettlementLogistics;
 import com.sckw.payment.model.constant.LogisticsUnitType;
 import com.sckw.payment.model.constant.SettlementEnum;
-import com.sckw.payment.model.dto.LedgerUnitDto;
-import com.sckw.payment.model.dto.MoneyType;
-import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.payment.model.constant.SettlementOrderTypeEnum;
+import com.sckw.payment.model.constant.TradingEnum;
+import com.sckw.payment.model.dto.*;
+import com.sckw.payment.model.vo.SettlementVo;
 import com.sckw.payment.model.vo.req.SettlementReq;
 import com.sckw.payment.model.vo.res.SettlementLogisticsStatusCountVo;
 import com.sckw.payment.model.vo.res.SettlementLogisticsSumVo;
@@ -23,6 +24,7 @@ import com.sckw.payment.utils.PageMoreRes;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
+import jakarta.annotation.Resource;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -45,7 +47,10 @@ public class KwpSettlementLogisticsService {
     private RemoteSystemService remoteSystemService;
     private final KwpSettlementLogisticsMapper settlementLogisticsMapper;
     private final KwpLedgerLogisticsUnitService logisticsUnitService;
-
+    @Resource
+    private KwpSettlementWalletService kwpSettlementWalletService;
+    @Resource
+    private KwpSettlementOfflineService kwpSettlementOfflineService;
 
     public void save(KwpSettlementLogistics settlementLogistics) {
         settlementLogisticsMapper.insert(settlementLogistics);
@@ -98,7 +103,38 @@ public class KwpSettlementLogisticsService {
         settlementReq.setUnitTypeTwo(LogisticsUnitType.SHIPPER);
         return pageSelect(settlementReq);
     }
-
+    /**
+     * 查询贸易结算详情
+     *
+     * @param id       结算单id
+     * @param unitType 企业类型
+     * @return
+     */
+    public SettlementDetailDto<SettlementLogisticsDto, SettlementVo> queryDetail(Long id, Integer unitType) {
+        SettlementLogisticsDto settlementLogisticsDto = settlementLogisticsMapper.selectDetail(id, unitType);
+        if (Objects.isNull(settlementLogisticsDto)) {
+            throw new BusinessException("结算单不存在");
+        }
+        Map<String, SysDictResDto> dictResDtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.TRADE_TYPE.getType());
+        String trading = settlementLogisticsDto.getTrading();
+        SysDictResDto sysDictResDto = dictResDtoMap.get(trading);
+        if (Objects.nonNull(sysDictResDto)) {
+            settlementLogisticsDto.setTradingLabel(sysDictResDto.getLabel());
+        }
+        settlementLogisticsDto.setPercentage(settlementLogisticsDto.changePercentage(settlementLogisticsDto.getActualPrice(), settlementLogisticsDto.getTotalPrice()));
+        settlementLogisticsDto.setStatusLabel(SettlementEnum.getStatusDesc(settlementLogisticsDto.getStatus()));
+        Integer payType = TradingEnum.getPrefix(trading);
+        List<SettlementVo> settlementVoList = new ArrayList<>();
+        if (Objects.nonNull(payType)) {
+            if(payType==TradingEnum.OFFLINE_PAY.getStatus()){
+                settlementVoList = kwpSettlementOfflineService.queryList(id, SettlementOrderTypeEnum.LOGISTICS.getStatus(), payType);
+            }else {
+                settlementVoList = kwpSettlementWalletService.queryList(id, SettlementOrderTypeEnum.LOGISTICS.getStatus(), payType);
+            }
+        }
+        List<SettlementVo> settlementWallet = kwpSettlementWalletService.queryList(id, SettlementOrderTypeEnum.LOGISTICS.getStatus(), TradingEnum.getPrefix(trading));
+        return new SettlementDetailDto<>(settlementLogisticsDto, settlementVoList);
+    }
     /**
      * 运费收款-物流订单详情
      *

+ 9 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementOfflineService.java

@@ -21,6 +21,7 @@ import com.sckw.payment.model.constant.*;
 import com.sckw.payment.model.dto.SettlementLogisticsDto;
 import com.sckw.payment.model.dto.SettlementOfflineDto;
 import com.sckw.payment.model.dto.SettlementTradeDto;
+import com.sckw.payment.model.vo.SettlementVo;
 import com.sckw.payment.model.vo.req.OfflinePaymentReq;
 import com.sckw.payment.model.vo.req.SettlementOfflinePayReq;
 import com.sckw.payment.model.vo.req.SettlementOfflineReq;
@@ -416,4 +417,12 @@ public class KwpSettlementOfflineService {
         }
         return "请勿重复提交";
     }
+
+    public List<SettlementVo> queryList(Long id, int status, Integer payType) {
+        SettlementOfflineReq settlementWalletReq = new SettlementOfflineReq();
+        settlementWalletReq.setPayType(payType);
+        settlementWalletReq.setOrderType(status);
+        settlementWalletReq.setId(String.valueOf(id));
+        return settlementOfflineMapper.appList(settlementWalletReq);
+    }
 }

+ 17 - 5
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementTradeService.java

@@ -16,6 +16,7 @@ import com.sckw.payment.model.constant.SettlementOrderTypeEnum;
 import com.sckw.payment.model.constant.TradeUnitType;
 import com.sckw.payment.model.constant.TradingEnum;
 import com.sckw.payment.model.dto.*;
+import com.sckw.payment.model.vo.SettlementVo;
 import com.sckw.payment.model.vo.req.SettlementTradeReq;
 import com.sckw.payment.model.vo.res.SettlementSumVo;
 import com.sckw.system.api.RemoteSystemService;
@@ -47,6 +48,8 @@ public class KwpSettlementTradeService {
     private final KwpLedgerTradeUnitService tradeUnitService;
     @Resource
     private KwpSettlementWalletService kwpSettlementWalletService;
+    @Resource
+    private KwpSettlementOfflineService kwpSettlementOfflineService;
 
 
     /**
@@ -246,7 +249,7 @@ public class KwpSettlementTradeService {
      * @param unitType 企业类型
      * @return
      */
-    public SettlementDetailDto<SettlementTradeDto, SettlementWalletDto> queryDetail(Long id, Integer unitType) {
+    public SettlementDetailDto<SettlementTradeDto, SettlementVo> queryDetail(Long id, Integer unitType) {
         SettlementTradeDto settlementTradeDto = settlementTradeMapper.selectDetail(id, unitType);
         if (Objects.isNull(settlementTradeDto)) {
             throw new BusinessException("结算单不存在");
@@ -259,14 +262,23 @@ public class KwpSettlementTradeService {
         }
         settlementTradeDto.setPercentage(settlementTradeDto.changePercentage(settlementTradeDto.getActualPrice(), settlementTradeDto.getTotalPrice()));
         settlementTradeDto.setStatusLabel(SettlementEnum.getStatusDesc(settlementTradeDto.getStatus()));
-        List<SettlementWalletDto> settlementWallet = kwpSettlementWalletService.queryList(id, SettlementOrderTypeEnum.TRADE.getStatus(), TradingEnum.getPrefix(trading));
-        return new SettlementDetailDto<>(settlementTradeDto, settlementWallet);
+        Integer payType = TradingEnum.getPrefix(trading);
+        List<SettlementVo> settlementVoList = new ArrayList<>();
+        if (Objects.nonNull(payType)) {
+            if(payType==TradingEnum.OFFLINE_PAY.getStatus()){
+                settlementVoList = kwpSettlementOfflineService.queryList(id, SettlementOrderTypeEnum.TRADE.getStatus(), payType);
+
+            }else {
+                settlementVoList = kwpSettlementWalletService.queryList(id, SettlementOrderTypeEnum.TRADE.getStatus(), payType);
+            }
+        }
+        return new SettlementDetailDto<>(settlementTradeDto, settlementVoList);
     }
 
     /**
      * @param entId    顶级企业id
-     * @param cur       当月/周
-     * @param pre       上月/周
+     * @param cur      当月/周
+     * @param pre      上月/周
      * @param unitType 企业类型 2-销售 1-采购
      */
     public List<MoneyType> moneySum(Long entId, List<LocalDateTime> cur, List<LocalDateTime> pre, Integer unitType) {

+ 5 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java

@@ -26,6 +26,7 @@ import com.sckw.payment.model.dto.LedgerUnitDto;
 import com.sckw.payment.model.dto.SettlementLogisticsDto;
 import com.sckw.payment.model.dto.SettlementTradeDto;
 import com.sckw.payment.model.dto.SettlementWalletDto;
+import com.sckw.payment.model.vo.SettlementVo;
 import com.sckw.payment.model.vo.req.OfflinePaymentReq;
 import com.sckw.payment.model.vo.req.SettlementWalletReq;
 import com.sckw.payment.model.vo.req.WalletPayReq;
@@ -68,7 +69,8 @@ public class KwpSettlementWalletService {
     private final KwpSettlementLogisticsMapper kwpSettlementLogisticsMapper;
     private final KwpLedgerTradeOrderService tradeOrderService;
     private final KwpSettlementLogisticsService kwpSettlementLogisticsService;
-    private final KwpSettlementTradeService kwpSettlementTradeService;
+    @Resource
+    private KwpSettlementTradeService kwpSettlementTradeService;
     private final PayCenterService payCenterService;
     private final KwpWalletRelationService walletRelationService;
     private final RedisLockUtil redisLockUtil;
@@ -736,12 +738,12 @@ public class KwpSettlementWalletService {
      * @param status  订单类型 1-物流 2-贸易
      * @param payType 支付方式 1-预付款、2-货到付款
      */
-    public List<SettlementWalletDto> queryList(Long id, int status, Integer payType) {
+    public List<SettlementVo> queryList(Long id, int status, Integer payType) {
         SettlementWalletReq settlementWalletReq = new SettlementWalletReq();
         settlementWalletReq.setPayType(payType);
         settlementWalletReq.setOrderType(status);
         settlementWalletReq.setId(String.valueOf(id));
-        return settlementWalletMapper.pageList(settlementWalletReq);
+        return settlementWalletMapper.appList(settlementWalletReq);
     }
 }
 

+ 3 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/PayCenterService.java

@@ -365,9 +365,9 @@ public class PayCenterService {
         if (Objects.isNull(money)) {
             throw new BusinessException("提现金额不能为空");
         }
-        if (StringUtils.isBlank(remarks)) {
-            throw new BusinessException("备注不能为空");
-        }
+//        if (StringUtils.isBlank(remarks)) {
+//            throw new BusinessException("备注不能为空");
+//        }
         String sync = postHttp(PayCenterEnum.WITHDRAW_TAKE, new HashMap<>() {{
             put("uid", uid);
             put("channel", channel);

+ 36 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementLogisticsMapper.xml

@@ -340,6 +340,42 @@
             and lu2.unit_type = #{unitTypeTwo,jdbcType=INTEGER}
         </if>
     </select>
+    <select id="selectDetail" parameterType="java.lang.Long"
+            resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        select s.id,
+               s.ent_id                       as entId,
+               s.l_ledger_id                  as lLedgerId,
+               s.sl_order_no                  as slOrderNo,
+               s.total_price                  as totalPrice,
+               s.actual_price                 as actualPrice,
+               s.total_price - s.actual_price as waitPrice,
+               s.receipt_time                 as receiptTime,
+               s.remark,
+               s.audit_user                   as auditUser,
+               s.audit_phone                  as auditPhone,
+               s.success_user                 as successUser,
+               s.success_phone                as successPhone,
+               s.status,
+               s.create_by                    as createBy,
+               s.create_time                  as createTime,
+               s.update_by                    as updateBy,
+               s.update_time                  as updateTime,
+               l.name,
+               l.generate_time                as generateTime,
+               l.l_ledger_no                  as lLedgerNo,
+               l.trading                      as trading,
+               l.settle_price                 as settlePrice,
+               l.url                          as url,
+               lu.firm_name                   as firm_name
+        from kwp_settlement_logistics s
+                 inner join kwp_ledger_logistics l on s.l_ledger_id = l.id and l.del_flag = 0
+                 inner join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id and lu.del_flag = 0 and
+                                                            lu.unit_type = #{unitType,jdbcType=INTEGER}
+        <where>
+            s.del_flag = 0
+            and s.id = #{id,jdbcType=BIGINT}
+        </where>
+    </select>
 
     <!--  根据多个结算运费物流订单id查订单,用于导出   -->
     <select id="selectLogisticsList" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">

+ 13 - 2
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementOfflineMapper.xml

@@ -64,9 +64,20 @@
         </where>
     </select>
 
-    <select id="confirmLogisticsCollection" resultType="java.lang.Integer">
+    <select id="appList" resultType="com.sckw.payment.model.vo.SettlementVo">
+        select
+        <include refid="Base_Column_List"/>
+        FROM kwp_settlement_offline
+        <where>
+            del_flag = 0
+            <if test="offlineReq.orderType != null">
+                and order_type = #{offlineReq.orderType,jdbcType=INTEGER}
+            </if>
+            <if test="offlineReq.id != null and offlineReq.id != ''">
+                and settlement_id = #{offlineReq.id,jdbcType=INTEGER}
+            </if>
+        </where>
     </select>
-
     <select id="pageList" resultType="com.sckw.payment.model.dto.SettlementOfflineDto">
         select
         <include refid="Base_Column_List"/>

+ 30 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementWalletMapper.xml

@@ -121,6 +121,36 @@
             </if>
         </where>
     </select>
+    <select id="appList" resultType="com.sckw.payment.model.vo.SettlementVo">
+        select ksw.id,
+               ksw.ent_id,
+               ksw.settlement_id,
+               ksw.order_type,
+               ksw.channel,
+               ksw.order_type,
+               ksw.pay_time,
+               ksw.pay_price,
+               ksw.topay_price,
+               ksw.type,
+               ksw.remark,
+               ksw.create_by,
+               ksw.create_time,
+               ksw.update_by,
+               ksw.update_time
+        from kwp_settlement_wallet ksw
+        <where>
+            ksw.del_flag = 0
+            <if test="walletReq.id != null and walletReq.id != ''">
+                and ksw.settlement_id = #{walletReq.id,jdbcType=INTEGER}
+            </if>
+            <if test="walletReq.orderType != null">
+                and ksw.order_type = #{walletReq.orderType,jdbcType=INTEGER}
+            </if>
+            <if test="walletReq.payType != null">
+                and ksw.type = #{walletReq.payType,jdbcType=INTEGER}
+            </if>
+        </where>
+    </select>
     <select id="list" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
         select ksw.id,
                ksw.ent_id,