Răsfoiți Sursa

修改了一个方法

sptkw 2 ani în urmă
părinte
comite
70f6df5d02

+ 4 - 4
pom.xml

@@ -332,12 +332,12 @@
 
     <profiles>
         <profile>
-            <id>xcq</id>
+            <id>pdy</id>
             <properties>
                 <!-- 环境标识,需要与配置文件的名称相对应 -->
-                <profiles.active>xcq</profiles.active>
-                <nacos.server>127.0.0.1:8848</nacos.server>
-                <nacos.namespace>6dec4f5e-496f-4420-ad0e-09a42921e4d9</nacos.namespace>
+                <profiles.active>pdy</profiles.active>
+                <nacos.server>10.10.10.230:8848</nacos.server>
+                <nacos.namespace>sckw_pdy</nacos.namespace>
             </properties>
             <activation>
                 <!-- 默认环境 -->

+ 8 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementLogisticsController.java

@@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.*;
 
 /**
  * 结算-物流订单
- *
- * @author xucaiqin
+ * @author Aick Spt
+ * @date 2023-07-18 16:34
  */
 @RestController
 @RequestMapping(name = "结算-物流订单", path = "/kwpSettlementLogistics")
@@ -26,5 +26,11 @@ public class KwpSettlementLogisticsController {
         return HttpResult.ok(kwpSettlementLogisticsService.pageList(settlementReq));
     }
 
+    @GetMapping(name = "结算-物流订单详情",path = "detail")
+    public HttpResult detail(@RequestParam("id") String id){
+        return HttpResult.ok(kwpSettlementLogisticsService.detail(id));
+    }
+
+
 
 }

+ 3 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementLogisticsMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpLedgerLogistics;
 import com.sckw.payment.model.KwpSettlementLogistics;
 import com.sckw.payment.model.dto.LedgerLogisticsDto;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
 import com.sckw.payment.model.vo.req.LogisticsReq;
 import com.sckw.payment.model.vo.req.SettlementReq;
 import org.apache.ibatis.annotations.Mapper;
@@ -21,8 +22,8 @@ public interface KwpSettlementLogisticsMapper extends BaseMapper<KwpLedgerLogist
 
     /**
      * @param settlementReq 过滤参数
-     * @param ids          客户单位id
      */
-    List<LedgerLogisticsDto> pageSelect(@Param("settlementReq") SettlementReq settlementReq);
+    List<SettlementLogisticsDto> pageSelect(@Param("settlementReq") SettlementReq settlementReq);
 
+    SettlementLogisticsDto detail(@Param("id") String id);
 }

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

@@ -0,0 +1,119 @@
+package com.sckw.payment.model.dto;
+
+/**
+ * @author Administrator
+ * @date 2023-07-18 17:33
+ */
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Getter
+@Setter
+public class SettlementLogisticsDto {
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 物流订单对账id
+     */
+    private Long lLedgerId;
+
+    /**
+     * 结算单编号
+     */
+    private String slOrderNo;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 对账金额
+     */
+    private BigDecimal totalPrice;
+
+    /**
+     * 已收账款
+     */
+    private BigDecimal actualPrice;
+
+    /**
+     * 预计收款日期
+     */
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date receiptTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 对账审核人名称
+     */
+    private String auditUser;
+
+    /**
+     * 对账审核人电话
+     */
+    private String auditPhone;
+
+    /**
+     * 对账完成人名称
+     */
+    private String successUser;
+
+    /**
+     * 对账完成人电话
+     */
+    private String successPhone;
+
+    /**
+     * 状态(待回款、部分回款、全部回款、回退)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    // Getters and Setters
+}

+ 119 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementOfflineDto.java

@@ -0,0 +1,119 @@
+package com.sckw.payment.model.dto;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author Administrator
+ * @date 2023-07-19 11:54
+ */
+@Getter
+@Setter
+public class SettlementOfflineDto {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业类型
+     */
+    private Long entId;
+
+    /**
+     * 结算id(交易订单结算/物流订单结算)
+     */
+    private Long settlementId;
+
+    /**
+     * 结算单类型 1-物流 2-贸易
+     */
+    private Byte orderType;
+
+    /**
+     * 付款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date payTime;
+
+    /**
+     * 付款金额
+     */
+    private BigDecimal payPrice;
+
+    /**
+     * 待付金额
+     */
+    private BigDecimal topayPrice;
+
+    /**
+     * 付款附件
+     */
+    private String url;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态:0正常/1锁定
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 删除标识(0正常/1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+    @Override
+    public String toString() {
+        return "SettlementOfflineDto{" +
+                "id=" + id +
+                ", entId=" + entId +
+                ", settlementId=" + settlementId +
+                ", orderType=" + orderType +
+                ", payTime=" + payTime +
+                ", payPrice=" + payPrice +
+                ", topayPrice=" + topayPrice +
+                ", url='" + url + '\'' +
+                ", remark='" + remark + '\'' +
+                ", status=" + status +
+                ", createBy=" + createBy +
+                ", createTime=" + createTime +
+                ", updateBy=" + updateBy +
+                ", updateTime=" + updateTime +
+                ", delFlag=" + delFlag +
+                '}';
+    }
+}
+

+ 5 - 5
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementReq.java

@@ -28,22 +28,22 @@ public class SettlementReq extends BasePara {
 
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @NotNull(message = "创建时间开始日期不能为空")
+//    @NotNull(message = "创建时间开始日期不能为空")
     private LocalDateTime startCreateTime;
 
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @NotNull(message = "创建时间结束日期不能为空")
+//    @NotNull(message = "创建时间结束日期不能为空")
     private LocalDateTime endCreateTime;
 
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @NotNull(message = "预计回款开始日期不能为空")
+//    @NotNull(message = "预计回款开始日期不能为空")
     private LocalDateTime startReceiptTime;
 
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @NotNull(message = "预计回款结束日期不能为空")
+//    @NotNull(message = "预计回款结束日期不能为空")
     private LocalDateTime endReceiptTime;
 
     /**

+ 15 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.sckw.core.model.page.PageRes;
 import com.sckw.payment.dao.KwpSettlementLogisticsMapper;
 import com.sckw.payment.model.dto.LedgerLogisticsDto;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
 import com.sckw.payment.model.vo.req.SettlementReq;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.StringUtils;
@@ -22,7 +23,7 @@ import java.util.List;
 public class KwpSettlementLogisticsService {
     private final KwpSettlementLogisticsMapper settlementLogisticsMapper;
 
-    public PageRes<LedgerLogisticsDto> pageList(SettlementReq settlementReq) {
+    public PageRes<SettlementLogisticsDto> pageList(SettlementReq settlementReq) {
         //todo 查询缓存,获取客户企业id
         String keywords = settlementReq.getKeywords();
         if (StringUtils.isNotBlank(keywords)) {
@@ -30,9 +31,21 @@ public class KwpSettlementLogisticsService {
         }
         PageHelper.startPage(settlementReq.getPage(), settlementReq.getPageSize());
 
-        List<LedgerLogisticsDto> kwpLedgerLogisticsList = settlementLogisticsMapper.pageSelect(settlementReq);
+        List<SettlementLogisticsDto> kwpLedgerLogisticsList = settlementLogisticsMapper.pageSelect(settlementReq);
 
         return new PageRes<>(new PageInfo<>(kwpLedgerLogisticsList));
     }
 
+
+    /**
+     * 结算-物流订单详情
+     * @author Administrator
+     * @date 2023-07-19 09:11
+     * @param id 结算物流订单id
+     */
+    public SettlementLogisticsDto detail(String id){
+        SettlementLogisticsDto settlementLogistics = settlementLogisticsMapper.detail(id);
+        return settlementLogistics;
+    }
+
 }

+ 31 - 1
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementLogisticsMapper.xml

@@ -47,6 +47,27 @@
         update_time,
         del_flag
     </sql>
+    <sql id="Join_Column_List">
+        s.id,
+        s.ent_id,
+        s.l_ledger_id,
+        s.sl_order_no,
+        s.`name`,
+        s.total_price,
+        s.actual_price,
+        s.receipt_time,
+        s.remark,
+        s.audit_user,
+        s.audit_phone,
+        s.success_user,
+        s.success_phone,
+        s.`status`,
+        s.create_by,
+        s.create_time,
+        s.update_by,
+        s.update_time,
+        s.del_flag
+    </sql>
 
 
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -57,7 +78,7 @@
         where id = #{id,jdbcType=BIGINT}
     </select>
 
-    <select id="pageSelect" resultType="com.sckw.payment.model.dto.LedgerLogisticsDto">
+    <select id="pageSelect" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
         select s.id,
                s.ent_id,
                s.l_ledger_id,
@@ -105,4 +126,13 @@
         </where>
         order by update_time desc
     </select>
+
+    <select id="detail"  parameterType="java.lang.Long"  resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        select
+        <include refid="Join_Column_List"/>
+        from kwp_settlement_logistics s
+        left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+        left join kwp_ledger_logistics_unit u on l.id = u.l_ledger_id
+        where s.id = #{id,jdbcType=BIGINT}
+    </select>
 </mapper>