xucaiqin 2 лет назад
Родитель
Сommit
c0b0c71816

+ 14 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpLedgerLogisticsUnitMapper.java

@@ -0,0 +1,14 @@
+package com.sckw.payment.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.payment.model.KwpLedgerLogisticsUnit;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-13 17:32:34
+ */
+
+@Mapper
+public interface KwpLedgerLogisticsUnitMapper extends BaseMapper<KwpLedgerLogisticsUnit> {
+}

+ 14 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpLedgerTradeUnitMapper.java

@@ -0,0 +1,14 @@
+package com.sckw.payment.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.payment.model.KwpLedgerTradeUnit;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-14 09:23:57
+ */
+
+@Mapper
+public interface KwpLedgerTradeUnitMapper extends BaseMapper<KwpLedgerTradeUnit> {
+}

+ 112 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpLedgerLogisticsUnit.java

@@ -0,0 +1,112 @@
+package com.sckw.payment.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-13 17:32:34
+ */
+
+/**
+    * 物流对账单托运方或承运方企业信息
+    */
+@Getter
+@Setter
+@ToString
+@TableName(value = "kwp_ledger_logistics_unit")
+public class KwpLedgerLogisticsUnit {
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.INPUT)
+    private Long id;
+
+    /**
+     * 物流对账单id
+     */
+    @TableField(value = "l_ledger_id")
+    private Long lLedgerId;
+
+    /**
+     * 物流对账单编号
+     */
+    @TableField(value = "l_ledger_no")
+    private String lLedgerNo;
+
+    /**
+     * 单位类型(1托运方、2承运方)
+     */
+    @TableField(value = "unit_type")
+    private Integer unitType;
+
+    /**
+     * 企业id
+     */
+    @TableField(value = "ent_id")
+    private Long entId;
+
+    /**
+     * 顶级企业ID
+     */
+    @TableField(value = "top_ent_id")
+    private Long topEntId;
+
+    /**
+     * 企业名称
+     */
+    @TableField(value = "firm_name")
+    private String firmName;
+
+    /**
+     * 联系人姓名
+     */
+    @TableField(value = "contacts")
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    @TableField(value = "phone")
+    private String phone;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    private String remark;
+
+    /**
+     * 用户状态(0正常、1已锁)
+     */
+    @TableField(value = "`status`")
+    private Integer status;
+
+    @TableField(value = "create_by")
+    private Long createBy;
+
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    @TableField(value = "update_by")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    @TableField(value = "del_flag")
+    private Integer delFlag;
+}

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

@@ -0,0 +1,109 @@
+package com.sckw.payment.model;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.time.LocalDateTime;
+
+/**
+ * 销售方/采购方企业信息
+ * @author xucaiqin
+ * @date 2023-07-14 09:23:57
+ */
+@Getter
+@Setter
+@ToString
+@TableName(value = "kwp_ledger_trade_unit")
+public class KwpLedgerTradeUnit {
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.INPUT)
+    private Long id;
+
+    /**
+     * 贸易对账单id
+     */
+    @TableField(value = "t_ledger_id")
+    private Long tLedgerId;
+
+    /**
+     * 贸易对账单编号
+     */
+    @TableField(value = "t_ledger_no")
+    private String tLedgerNo;
+
+    /**
+     * 单位类型(1采购方、2销售方)
+     */
+    @TableField(value = "unit_type")
+    private Integer unitType;
+
+    /**
+     * 企业id
+     */
+    @TableField(value = "ent_id")
+    private Long entId;
+
+    /**
+     * 顶级企业ID
+     */
+    @TableField(value = "top_ent_id")
+    private Long topEntId;
+
+    /**
+     * 企业名称
+     */
+    @TableField(value = "firm_name")
+    private String firmName;
+
+    /**
+     * 联系人姓名
+     */
+    @TableField(value = "contacts")
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    @TableField(value = "phone")
+    private String phone;
+
+    /**
+     * 备注
+     */
+    @TableField(value = "remark")
+    private String remark;
+
+    /**
+     * 用户状态(0正常、1已锁)
+     */
+    @TableField(value = "`status`")
+    private Integer status;
+
+    @TableField(value = "create_by")
+    private Long createBy;
+
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    @TableField(value = "update_by")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    @TableField(value = "del_flag")
+    private Integer delFlag;
+}

+ 11 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerLogisticsUnitService.java

@@ -0,0 +1,11 @@
+package com.sckw.payment.service;
+
+import org.springframework.stereotype.Service;
+/**
+ * @author xucaiqin
+ * @date 2023-07-13 17:32:34
+ */
+@Service
+public class KwpLedgerLogisticsUnitService  {
+
+}

+ 39 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerTradeUnitService.java

@@ -0,0 +1,39 @@
+package com.sckw.payment.service;
+
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.sckw.payment.dao.KwpLedgerTradeUnitMapper;
+import com.sckw.payment.model.KwpLedgerTradeUnit;
+import lombok.AllArgsConstructor;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @author xucaiqin
+ * @date 2023-07-13 17:32:40
+ */
+@Service
+@AllArgsConstructor
+public class KwpLedgerTradeUnitService {
+    private final KwpLedgerTradeUnitMapper tradeUnitMapper;
+
+    public void saveList(List<KwpLedgerTradeUnit> list) {
+        if (!CollectionUtils.isEmpty(list)) {
+            for (KwpLedgerTradeUnit kwpLedgerTradeUnit : list) {
+                tradeUnitMapper.insert(kwpLedgerTradeUnit);
+            }
+        }
+    }
+
+    public void remove(Long tLedgerId) {
+        KwpLedgerTradeUnit kwpLedgerTradeUnit = new KwpLedgerTradeUnit();
+        kwpLedgerTradeUnit.setDelFlag(1);
+        kwpLedgerTradeUnit.setUpdateTime(LocalDateTime.now());
+        LambdaUpdateWrapper<KwpLedgerTradeUnit> wrapper = new LambdaUpdateWrapper<>();
+        wrapper.eq(KwpLedgerTradeUnit::getTLedgerId, tLedgerId);
+        wrapper.eq(KwpLedgerTradeUnit::getDelFlag, 0);
+        tradeUnitMapper.update(kwpLedgerTradeUnit, wrapper);
+    }
+}

+ 29 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/KwpLedgerLogisticsUnitMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sckw.payment.dao.KwpLedgerLogisticsUnitMapper">
+  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpLedgerLogisticsUnit">
+    <!--@mbg.generated-->
+    <!--@Table kwp_ledger_logistics_unit-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="l_ledger_id" jdbcType="BIGINT" property="lLedgerId" />
+    <result column="l_ledger_no" jdbcType="VARCHAR" property="lLedgerNo" />
+    <result column="unit_type" jdbcType="INTEGER" property="unitType" />
+    <result column="ent_id" jdbcType="BIGINT" property="entId" />
+    <result column="top_ent_id" jdbcType="BIGINT" property="topEntId" />
+    <result column="firm_name" jdbcType="VARCHAR" property="firmName" />
+    <result column="contacts" jdbcType="VARCHAR" property="contacts" />
+    <result column="phone" jdbcType="VARCHAR" property="phone" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, l_ledger_id, l_ledger_no, unit_type, ent_id, top_ent_id, firm_name, contacts, 
+    phone, remark, `status`, create_by, create_time, update_by, update_time, del_flag
+  </sql>
+</mapper>

+ 29 - 0
sckw-modules/sckw-payment/src/main/resources/mapper/KwpLedgerTradeUnitMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.sckw.payment.dao.KwpLedgerTradeUnitMapper">
+  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpLedgerTradeUnit">
+    <!--@mbg.generated-->
+    <!--@Table kwp_ledger_trade_unit-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="t_ledger_id" jdbcType="BIGINT" property="tLedgerId" />
+    <result column="t_ledger_no" jdbcType="VARCHAR" property="tLedgerNo" />
+    <result column="unit_type" jdbcType="INTEGER" property="unitType" />
+    <result column="ent_id" jdbcType="BIGINT" property="entId" />
+    <result column="top_ent_id" jdbcType="BIGINT" property="topEntId" />
+    <result column="firm_name" jdbcType="VARCHAR" property="firmName" />
+    <result column="contacts" jdbcType="VARCHAR" property="contacts" />
+    <result column="phone" jdbcType="VARCHAR" property="phone" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_by" jdbcType="BIGINT" property="createBy" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, t_ledger_id, t_ledger_no, unit_type, ent_id, top_ent_id, firm_name, contacts, 
+    phone, remark, `status`, create_by, create_time, update_by, update_time, del_flag
+  </sql>
+</mapper>