浏览代码

销售订单

fubin 2 年之前
父节点
当前提交
7dd271a0b7

+ 24 - 0
src/main/java/com/dk/mdm/controller/sale/OrderItemController.java

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.sale;
+
+import com.dk.mdm.model.pojo.sale.OrderItem;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.sale.OrderItemService;
+
+@Api(tags = "销售明细API接口")
+@RestController
+@RequestMapping("/orderItem")
+public class OrderItemController{
+
+    public BaseService<OrderItem> getService() {
+        return orderItemService;
+    }
+
+    @Autowired
+    private OrderItemService orderItemService;
+
+}

+ 14 - 0
src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.java

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.sale;
+
+import com.dk.mdm.model.pojo.sale.OrderItem;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  销售明细 Mapper
+*/
+@Repository
+public interface OrderItemMapper extends BaseMapper<OrderItem>{
+	
+}
+

+ 237 - 0
src/main/java/com/dk/mdm/mapper/sale/OrderItemMapper.xml

@@ -0,0 +1,237 @@
+<?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.dk.mdm.mapper.sale.OrderItemMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        item_id, order_id, item_index, sku_id, item_qty, price_std, amt_std, price_sale, item_amt, price_discount, non_std_code, out_status, outing_qty, outing_amt, out_qty, out_amt, return_qty, return_amt, remarks, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.sale.OrderItem">
+        <id column="item_id" property="itemId"/>
+                <result column="order_id" property="orderId" typeHandler="UuidTypeHandler"/>
+                <result column="item_index" property="itemIndex"/>
+                <result column="sku_id" property="skuId" typeHandler="UuidTypeHandler"/>
+                <result column="item_qty" property="itemQty"/>
+                <result column="price_std" property="priceStd"/>
+                <result column="amt_std" property="amtStd"/>
+                <result column="price_sale" property="priceSale"/>
+                <result column="item_amt" property="itemAmt"/>
+                <result column="price_discount" property="priceDiscount"/>
+                <result column="non_std_code" property="nonStdCode"/>
+                <result column="out_status" property="outStatus"/>
+                <result column="outing_qty" property="outingQty"/>
+                <result column="outing_amt" property="outingAmt"/>
+                <result column="out_qty" property="outQty"/>
+                <result column="out_amt" property="outAmt"/>
+                <result column="return_qty" property="returnQty"/>
+                <result column="return_amt" property="returnAmt"/>
+                <result column="remarks" property="remarks"/>
+                <result column="flg_valid" property="flgValid"/>
+                <result column="cp_id" property="cpId"/>
+            <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
+            <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
+                <result column="op_app_code" property="opAppCode"/>
+            <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
+                <result column="op_db_user" property="opDbUser"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="orderId != null and orderId != ''">
+                AND order_id = #{orderId}
+            </if>
+            <if test="itemIndex != null">
+                AND item_index = #{itemIndex}
+            </if>
+            <if test="skuId != null and skuId != ''">
+                AND sku_id = #{skuId}
+            </if>
+            <if test="itemQty != null">
+                AND item_qty = #{itemQty}
+            </if>
+            <if test="priceStd != null">
+                AND price_std = #{priceStd}
+            </if>
+            <if test="amtStd != null">
+                AND amt_std = #{amtStd}
+            </if>
+            <if test="priceSale != null">
+                AND price_sale = #{priceSale}
+            </if>
+            <if test="itemAmt != null">
+                AND item_amt = #{itemAmt}
+            </if>
+            <if test="priceDiscount != null">
+                AND price_discount = #{priceDiscount}
+            </if>
+            <if test="nonStdCode != null and nonStdCode != ''">
+                AND non_std_code = #{nonStdCode}
+            </if>
+            <if test="outStatus != null and outStatus != ''">
+                AND out_status = #{outStatus}
+            </if>
+            <if test="outingQty != null">
+                AND outing_qty = #{outingQty}
+            </if>
+            <if test="outingAmt != null">
+                AND outing_amt = #{outingAmt}
+            </if>
+            <if test="outQty != null">
+                AND out_qty = #{outQty}
+            </if>
+            <if test="outAmt != null">
+                AND out_amt = #{outAmt}
+            </if>
+            <if test="returnQty != null">
+                AND return_qty = #{returnQty}
+            </if>
+            <if test="returnAmt != null">
+                AND return_amt = #{returnAmt}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </if>
+            <if test="opCreateTime != null">
+                AND op_create_time = #{opCreateTime}
+            </if>
+            <if test="opCreateUserId != null and opCreateUserId != ''">
+                AND op_create_user_id = #{opCreateUserId}
+            </if>
+            <if test="opUpdateTime != null">
+                AND op_update_time = #{opUpdateTime}
+            </if>
+            <if test="opUpdateUserId != null and opUpdateUserId != ''">
+                AND op_update_user_id = #{opUpdateUserId}
+            </if>
+            <if test="opAppCode != null and opAppCode != ''">
+                AND op_app_code = #{opAppCode}
+            </if>
+            <if test="opTimestamp != null">
+                AND op_timestamp = #{opTimestamp}
+            </if>
+            <if test="opDbUser != null and opDbUser != ''">
+                AND op_db_user = #{opDbUser}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键itemId批量操作 -->
+        WHERE item_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_psi_order_item,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_psi_order_item
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_psi_order_item,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_psi_order_item
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_psi_order_item的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_psi_order_item
+        WHERE item_id = #{itemId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_psi_order_item的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_psi_order_item
+        WHERE item_id = #{itemId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_psi_order_item的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_psi_order_item
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_psi_order_item
+        (
+        <trim suffixOverrides=",">
+            order_id,
+            item_index,
+            sku_id,
+            item_qty,
+            price_std,
+            amt_std,
+            price_sale,
+            item_amt,
+            price_discount,
+            non_std_code,
+            out_status,
+            outing_qty,
+            outing_amt,
+            out_qty,
+            out_amt,
+            return_qty,
+            return_amt,
+            remarks,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.orderId}::uuid,
+                #{item.itemIndex},
+                #{item.skuId}::uuid,
+                #{item.itemQty},
+                #{item.priceStd},
+                #{item.amtStd},
+                #{item.priceSale},
+                #{item.itemAmt},
+                #{item.priceDiscount},
+                #{item.nonStdCode},
+                #{item.outStatus},
+                #{item.outingQty},
+                #{item.outingAmt},
+                #{item.outQty},
+                #{item.outAmt},
+                #{item.returnQty},
+                #{item.returnAmt},
+                #{item.remarks},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 85 - 61
src/main/java/com/dk/mdm/mapper/sale/OrderMapper.xml

@@ -9,7 +9,7 @@
     </sql>
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.sale.Order">
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.response.sale.OrderResponse">
         <id column="order_id" property="orderId"/>
                 <result column="order_no" property="orderNo"/>
                 <result column="order_type" property="orderType"/>
@@ -59,130 +59,109 @@
     <sql id="Condition">
         <where>
             <if test="orderNo != null and orderNo != ''">
-                AND order_no = #{orderNo}
+                AND tpo.order_no = #{orderNo}
             </if>
             <if test="orderType != null and orderType != ''">
-                AND order_type = #{orderType}
+                AND tpo.order_type = #{orderType}
             </if>
             <if test="orgId != null and orgId != ''">
-                AND org_id = #{orgId}
+                AND tpo.org_id = #{orgId}
             </if>
             <if test="staffId != null and staffId != ''">
-                AND staff_id = #{staffId}
+                AND tpo.staff_id = #{staffId}
             </if>
             <if test="cusId != null and cusId != ''">
-                AND cus_id = #{cusId}
+                AND tpo.cus_id = #{cusId}
             </if>
             <if test="addressArea != null and addressArea != ''">
-                AND address_area = #{addressArea}
+                AND tpo.address_area = #{addressArea}
             </if>
             <if test="addressName != null and addressName != ''">
-                AND address_name = #{addressName}
+                AND tpo.address_name = #{addressName}
             </if>
             <if test="addressNo != null and addressNo != ''">
-                AND address_no = #{addressNo}
+                AND tpo.address_no = #{addressNo}
             </if>
             <if test="addressGcj02 != null and addressGcj02 != ''">
-                AND address_gcj02 = #{addressGcj02}
+                AND tpo.address_gcj02 = #{addressGcj02}
             </if>
             <if test="addressFull != null and addressFull != ''">
-                AND address_full = #{addressFull}
+                AND tpo.address_full = #{addressFull}
             </if>
             <if test="contactName != null and contactName != ''">
-                AND contact_name = #{contactName}
+                AND tpo.contact_name = #{contactName}
             </if>
             <if test="contactPhone != null and contactPhone != ''">
-                AND contact_phone = #{contactPhone}
+                AND tpo.contact_phone = #{contactPhone}
             </if>
             <if test="salesChannel != null and salesChannel != ''">
-                AND sales_channel = #{salesChannel}
+                AND tpo.sales_channel = #{salesChannel}
             </if>
             <if test="deliveryDate != null">
-                AND delivery_date = #{deliveryDate}
+                AND tpo.delivery_date = #{deliveryDate}
             </if>
             <if test="sumQuantity != null">
-                AND sum_quantity = #{sumQuantity}
+                AND tpo.sum_quantity = #{sumQuantity}
             </if>
             <if test="sumStandard != null">
-                AND sum_standard = #{sumStandard}
+                AND tpo.sum_standard = #{sumStandard}
             </if>
             <if test="sumAmount != null">
-                AND sum_amount = #{sumAmount}
+                AND tpo.sum_amount = #{sumAmount}
             </if>
             <if test="saleDiscount != null">
-                AND sale_discount = #{saleDiscount}
+                AND tpo.sale_discount = #{saleDiscount}
             </if>
             <if test="orderStatus != null and orderStatus != ''">
-                AND order_status = #{orderStatus}
+                AND tpo.order_status = #{orderStatus}
             </if>
             <if test="outStatus != null and outStatus != ''">
-                AND out_status = #{outStatus}
+                AND tpo.out_status = #{outStatus}
             </if>
             <if test="outingQty != null">
-                AND outing_qty = #{outingQty}
+                AND tpo.outing_qty = #{outingQty}
             </if>
             <if test="outingAmt != null">
-                AND outing_amt = #{outingAmt}
+                AND tpo.outing_amt = #{outingAmt}
             </if>
             <if test="outQty != null">
-                AND out_qty = #{outQty}
+                AND tpo.out_qty = #{outQty}
             </if>
             <if test="outAmt != null">
-                AND out_amt = #{outAmt}
+                AND tpo.out_amt = #{outAmt}
             </if>
             <if test="returnQty != null">
-                AND return_qty = #{returnQty}
+                AND tpo.return_qty = #{returnQty}
             </if>
             <if test="returnAmt != null">
-                AND return_amt = #{returnAmt}
+                AND tpo.return_amt = #{returnAmt}
             </if>
             <if test="amtReceivable != null">
-                AND amt_receivable = #{amtReceivable}
+                AND tpo.amt_receivable = #{amtReceivable}
             </if>
             <if test="amtHandle != null">
-                AND amt_handle = #{amtHandle}
+                AND tpo.amt_handle = #{amtHandle}
             </if>
             <if test="amtResidue != null">
-                AND amt_residue = #{amtResidue}
+                AND tpo.amt_residue = #{amtResidue}
             </if>
             <if test="remarks != null and remarks != ''">
-                AND remarks = #{remarks}
+                AND tpo.remarks = #{remarks}
             </if>
             <if test="annexPaths != null and annexPaths != ''">
-                AND annex_paths = #{annexPaths}
+                AND tpo.annex_paths = #{annexPaths}
             </if>
             <if test="makeStaff != null and makeStaff != ''">
-                AND make_staff = #{makeStaff}
+                AND tpo.make_staff = #{makeStaff}
             </if>
             <if test="makeTime != null">
-                AND make_time = #{makeTime}
+                AND tpo.make_time = #{makeTime}
             </if>
             <if test="flgValid != null">
-                AND flg_valid = #{flgValid}
+                AND tpo.flg_valid = #{flgValid}
             </if>
             <if test="cpId != null">
-                AND cp_id = #{cpId}
-            </if>
-            <if test="opCreateTime != null">
-                AND op_create_time = #{opCreateTime}
-            </if>
-            <if test="opCreateUserId != null and opCreateUserId != ''">
-                AND op_create_user_id = #{opCreateUserId}
-            </if>
-            <if test="opUpdateTime != null">
-                AND op_update_time = #{opUpdateTime}
-            </if>
-            <if test="opUpdateUserId != null and opUpdateUserId != ''">
-                AND op_update_user_id = #{opUpdateUserId}
-            </if>
-            <if test="opAppCode != null and opAppCode != ''">
-                AND op_app_code = #{opAppCode}
-            </if>
-            <if test="opTimestamp != null">
-                AND op_timestamp = #{opTimestamp}
-            </if>
-            <if test="opDbUser != null and opDbUser != ''">
-                AND op_db_user = #{opDbUser}
+                AND tpo.cp_id = #{cpId}
             </if>
         </where>
     </sql>
@@ -197,9 +176,54 @@
 
     <!-- 查询表t_psi_order,(条件查询+分页)列表 -->
     <select id="selectByCond" resultMap="BaseResultMap">
-        SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_psi_order
+        SELECT tpo.order_id,
+               tpo.order_no,
+               tpo.order_type,
+               tpo.org_id,
+               tmo.org_name         as "orgName",
+               tpo.staff_id,
+               tms.staff_name       as "staffName",
+               tpo.cus_id,
+               tmc.cus_code         as "cusCode",
+               tmc.cus_name         as "cusName",
+               tmc.cus_phone        as "cusPhone",
+               tmdd.data_value      as "cusFromName",
+               tpo.address_area,
+               tpo.address_name,
+               tpo.address_no,
+               tpo.address_gcj02,
+               tpo.address_full,
+               tpo.contact_name,
+               tpo.contact_phone,
+               tpo.sales_channel,
+               tmsc.channel_name    as "channelName",
+               tpo.delivery_date,
+               tpo.sum_quantity,
+               tpo.sum_standard,
+               tpo.sum_amount,
+               tpo.sale_discount,
+               tpo.order_status,
+               tpo.out_status,
+               tpo.outing_qty,
+               tpo.outing_amt,
+               tpo.out_qty,
+               tpo.out_amt,
+               tpo.return_qty,
+               tpo.return_amt,
+               tpo.amt_receivable,
+               tpo.amt_handle,
+               tpo.amt_residue,
+               tpo.remarks,
+               tpo.annex_paths,
+               makestaff.staff_name as "makeStaff",
+               tpo.make_time
+        FROM dkic_b.t_psi_order as tpo
+             inner join dkic_b.t_mst_sale_channel tmsc on tpo.sales_channel = tmsc.channel_id
+             inner join dkic_b.t_mst_org tmo on tpo.org_id = tmo.org_id
+             inner join dkic_b.t_mst_staff tms on tpo.staff_id = tms.staff_id
+             inner join dkic_b.t_mst_staff as makestaff on tpo.make_staff = makestaff.staff_id
+             inner join dkic_b.t_mst_customer tmc on tpo.cus_id = tmc.cus_id
+             left join dkic_b.t_mst_dictionary_data tmdd on tmc.cus_from = tmdd.data_id
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -210,7 +234,7 @@
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM t_psi_order
+        FROM dkic_b.t_psi_order as tpo
         <include refid="Condition"/>
     </select>
 

+ 289 - 0
src/main/java/com/dk/mdm/model/pojo/sale/OrderItem.java

@@ -0,0 +1,289 @@
+package com.dk.mdm.model.pojo.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  销售明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售明细")
+@TableName(value = "t_psi_order_item", autoResultMap = true)
+@ApiModel(value="实体类:销售明细", description="表名:t_psi_order_item")
+public class OrderItem extends PageInfo<OrderItem> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 订单ID
+     */
+    @Excel(name = "订单ID")
+    @ApiModelProperty(value = "订单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 商品顺序
+     */
+    @Excel(name = "商品顺序")
+    @ApiModelProperty(value = "商品顺序")
+    private Integer itemIndex;
+
+
+    /**
+     * 商品ID
+     */
+    @Excel(name = "商品ID")
+    @ApiModelProperty(value = "商品ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String skuId;
+
+
+    /**
+     * 商品数量
+     */
+    @Excel(name = "商品数量")
+    @ApiModelProperty(value = "商品数量")
+    private BigDecimal itemQty;
+
+
+    /**
+     * 标价
+     */
+    @Excel(name = "标价")
+    @ApiModelProperty(value = "标价")
+    private BigDecimal priceStd;
+
+
+    /**
+     * 标价金额 (商品数量*标价)
+     */
+    @Excel(name = "标价金额 (商品数量*标价)")
+    @ApiModelProperty(value = "标价金额 (商品数量*标价)")
+    private BigDecimal amtStd;
+
+
+    /**
+     * 售价
+     */
+    @Excel(name = "售价")
+    @ApiModelProperty(value = "售价")
+    private BigDecimal priceSale;
+
+
+    /**
+     * 售价金额 (商品数量*售价)
+     */
+    @Excel(name = "售价金额 (商品数量*售价)")
+    @ApiModelProperty(value = "售价金额 (商品数量*售价)")
+    private BigDecimal itemAmt;
+
+
+    /**
+     * 折扣 (售价/标价)
+     */
+    @Excel(name = "折扣 (售价/标价)")
+    @ApiModelProperty(value = "折扣 (售价/标价)")
+    private BigDecimal priceDiscount;
+
+
+    /**
+     * 非标号
+     */
+    @Excel(name = "非标号")
+    @ApiModelProperty(value = "非标号")
+    private String nonStdCode;
+
+
+    /**
+     * 出库状态
+     */
+    @Excel(name = "出库状态")
+    @ApiModelProperty(value = "出库状态")
+    private String outStatus;
+
+
+    /**
+     * 出库中数量
+     */
+    @Excel(name = "出库中数量")
+    @ApiModelProperty(value = "出库中数量")
+    private BigDecimal outingQty;
+
+
+    /**
+     * 出库中金额
+     */
+    @Excel(name = "出库中金额")
+    @ApiModelProperty(value = "出库中金额")
+    private BigDecimal outingAmt;
+
+
+    /**
+     * 已出库数量
+     */
+    @Excel(name = "已出库数量")
+    @ApiModelProperty(value = "已出库数量")
+    private BigDecimal outQty;
+
+
+    /**
+     * 已出库金额
+     */
+    @Excel(name = "已出库金额")
+    @ApiModelProperty(value = "已出库金额")
+    private BigDecimal outAmt;
+
+
+    /**
+     * 已出库退货数量
+     */
+    @Excel(name = "已出库退货数量")
+    @ApiModelProperty(value = "已出库退货数量")
+    private BigDecimal returnQty;
+
+
+    /**
+     * 已出库退货金额
+     */
+    @Excel(name = "已出库退货金额")
+    @ApiModelProperty(value = "已出库退货金额")
+    private BigDecimal returnAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 290 - 0
src/main/java/com/dk/mdm/model/query/sale/OrderItemQuery.java

@@ -0,0 +1,290 @@
+package com.dk.mdm.model.query.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+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 com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ *  销售明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售明细")
+@TableName(value = "t_psi_order_item", autoResultMap = true)
+@ApiModel(value="实体类:销售明细", description="表名:t_psi_order_item")
+public class OrderItemQuery extends PageInfo<OrderItemQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 订单ID
+     */
+    @Excel(name = "订单ID")
+    @ApiModelProperty(value = "订单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 商品顺序
+     */
+    @Excel(name = "商品顺序")
+    @ApiModelProperty(value = "商品顺序")
+    private Integer itemIndex;
+
+
+    /**
+     * 商品ID
+     */
+    @Excel(name = "商品ID")
+    @ApiModelProperty(value = "商品ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String skuId;
+
+
+    /**
+     * 商品数量
+     */
+    @Excel(name = "商品数量")
+    @ApiModelProperty(value = "商品数量")
+    private BigDecimal itemQty;
+
+
+    /**
+     * 标价
+     */
+    @Excel(name = "标价")
+    @ApiModelProperty(value = "标价")
+    private BigDecimal priceStd;
+
+
+    /**
+     * 标价金额 (商品数量*标价)
+     */
+    @Excel(name = "标价金额 (商品数量*标价)")
+    @ApiModelProperty(value = "标价金额 (商品数量*标价)")
+    private BigDecimal amtStd;
+
+
+    /**
+     * 售价
+     */
+    @Excel(name = "售价")
+    @ApiModelProperty(value = "售价")
+    private BigDecimal priceSale;
+
+
+    /**
+     * 售价金额 (商品数量*售价)
+     */
+    @Excel(name = "售价金额 (商品数量*售价)")
+    @ApiModelProperty(value = "售价金额 (商品数量*售价)")
+    private BigDecimal itemAmt;
+
+
+    /**
+     * 折扣 (售价/标价)
+     */
+    @Excel(name = "折扣 (售价/标价)")
+    @ApiModelProperty(value = "折扣 (售价/标价)")
+    private BigDecimal priceDiscount;
+
+
+    /**
+     * 非标号
+     */
+    @Excel(name = "非标号")
+    @ApiModelProperty(value = "非标号")
+    private String nonStdCode;
+
+
+    /**
+     * 出库状态
+     */
+    @Excel(name = "出库状态")
+    @ApiModelProperty(value = "出库状态")
+    private String outStatus;
+
+
+    /**
+     * 出库中数量
+     */
+    @Excel(name = "出库中数量")
+    @ApiModelProperty(value = "出库中数量")
+    private BigDecimal outingQty;
+
+
+    /**
+     * 出库中金额
+     */
+    @Excel(name = "出库中金额")
+    @ApiModelProperty(value = "出库中金额")
+    private BigDecimal outingAmt;
+
+
+    /**
+     * 已出库数量
+     */
+    @Excel(name = "已出库数量")
+    @ApiModelProperty(value = "已出库数量")
+    private BigDecimal outQty;
+
+
+    /**
+     * 已出库金额
+     */
+    @Excel(name = "已出库金额")
+    @ApiModelProperty(value = "已出库金额")
+    private BigDecimal outAmt;
+
+
+    /**
+     * 已出库退货数量
+     */
+    @Excel(name = "已出库退货数量")
+    @ApiModelProperty(value = "已出库退货数量")
+    private BigDecimal returnQty;
+
+
+    /**
+     * 已出库退货金额
+     */
+    @Excel(name = "已出库退货金额")
+    @ApiModelProperty(value = "已出库退货金额")
+    private BigDecimal returnAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 290 - 0
src/main/java/com/dk/mdm/model/response/sale/OrderItemResponse.java

@@ -0,0 +1,290 @@
+package com.dk.mdm.model.response.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+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 com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ *  销售明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售明细")
+@TableName(value = "t_psi_order_item", autoResultMap = true)
+@ApiModel(value="实体类:销售明细", description="表名:t_psi_order_item")
+public class OrderItemResponse extends PageInfo<OrderItemResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 订单ID
+     */
+    @Excel(name = "订单ID")
+    @ApiModelProperty(value = "订单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 商品顺序
+     */
+    @Excel(name = "商品顺序")
+    @ApiModelProperty(value = "商品顺序")
+    private Integer itemIndex;
+
+
+    /**
+     * 商品ID
+     */
+    @Excel(name = "商品ID")
+    @ApiModelProperty(value = "商品ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String skuId;
+
+
+    /**
+     * 商品数量
+     */
+    @Excel(name = "商品数量")
+    @ApiModelProperty(value = "商品数量")
+    private BigDecimal itemQty;
+
+
+    /**
+     * 标价
+     */
+    @Excel(name = "标价")
+    @ApiModelProperty(value = "标价")
+    private BigDecimal priceStd;
+
+
+    /**
+     * 标价金额 (商品数量*标价)
+     */
+    @Excel(name = "标价金额 (商品数量*标价)")
+    @ApiModelProperty(value = "标价金额 (商品数量*标价)")
+    private BigDecimal amtStd;
+
+
+    /**
+     * 售价
+     */
+    @Excel(name = "售价")
+    @ApiModelProperty(value = "售价")
+    private BigDecimal priceSale;
+
+
+    /**
+     * 售价金额 (商品数量*售价)
+     */
+    @Excel(name = "售价金额 (商品数量*售价)")
+    @ApiModelProperty(value = "售价金额 (商品数量*售价)")
+    private BigDecimal itemAmt;
+
+
+    /**
+     * 折扣 (售价/标价)
+     */
+    @Excel(name = "折扣 (售价/标价)")
+    @ApiModelProperty(value = "折扣 (售价/标价)")
+    private BigDecimal priceDiscount;
+
+
+    /**
+     * 非标号
+     */
+    @Excel(name = "非标号")
+    @ApiModelProperty(value = "非标号")
+    private String nonStdCode;
+
+
+    /**
+     * 出库状态
+     */
+    @Excel(name = "出库状态")
+    @ApiModelProperty(value = "出库状态")
+    private String outStatus;
+
+
+    /**
+     * 出库中数量
+     */
+    @Excel(name = "出库中数量")
+    @ApiModelProperty(value = "出库中数量")
+    private BigDecimal outingQty;
+
+
+    /**
+     * 出库中金额
+     */
+    @Excel(name = "出库中金额")
+    @ApiModelProperty(value = "出库中金额")
+    private BigDecimal outingAmt;
+
+
+    /**
+     * 已出库数量
+     */
+    @Excel(name = "已出库数量")
+    @ApiModelProperty(value = "已出库数量")
+    private BigDecimal outQty;
+
+
+    /**
+     * 已出库金额
+     */
+    @Excel(name = "已出库金额")
+    @ApiModelProperty(value = "已出库金额")
+    private BigDecimal outAmt;
+
+
+    /**
+     * 已出库退货数量
+     */
+    @Excel(name = "已出库退货数量")
+    @ApiModelProperty(value = "已出库退货数量")
+    private BigDecimal returnQty;
+
+
+    /**
+     * 已出库退货金额
+     */
+    @Excel(name = "已出库退货金额")
+    @ApiModelProperty(value = "已出库退货金额")
+    private BigDecimal returnAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 22 - 0
src/main/java/com/dk/mdm/model/response/sale/OrderResponse.java

@@ -406,7 +406,29 @@ public class OrderResponse extends PageInfo<OrderResponse> implements Serializab
     @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
     private String opDbUser;
 
+    @ApiModelProperty(value = "组织名称")
+    private String orgName;
 
+    @ApiModelProperty(value = "员工姓名")
+    private String staffName;
+
+    @ApiModelProperty(value = "客户编码")
+    private String cusCode;
+
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+    @ApiModelProperty(value = "客户来源")
+    private String cusFromName;
+
+    @ApiModelProperty(value = "销售渠道")
+    private String channelName;
+
+    @ApiModelProperty(value = "制单员")
+    private String makeStaffName;
     /*
      * 相关属性
      * @TableField(exist = false)

+ 290 - 0
src/main/java/com/dk/mdm/model/vo/sale/OrderItemVO.java

@@ -0,0 +1,290 @@
+package com.dk.mdm.model.vo.sale;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+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 com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ *  销售明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("销售明细")
+@TableName(value = "t_psi_order_item", autoResultMap = true)
+@ApiModel(value="实体类:销售明细", description="表名:t_psi_order_item")
+public class OrderItemVO extends PageInfo<OrderItemVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 明细ID
+     */
+    @TableId(value = "item_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "明细ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String itemId;
+
+
+    /**
+     * 订单ID
+     */
+    @Excel(name = "订单ID")
+    @ApiModelProperty(value = "订单ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orderId;
+
+
+    /**
+     * 商品顺序
+     */
+    @Excel(name = "商品顺序")
+    @ApiModelProperty(value = "商品顺序")
+    private Integer itemIndex;
+
+
+    /**
+     * 商品ID
+     */
+    @Excel(name = "商品ID")
+    @ApiModelProperty(value = "商品ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String skuId;
+
+
+    /**
+     * 商品数量
+     */
+    @Excel(name = "商品数量")
+    @ApiModelProperty(value = "商品数量")
+    private BigDecimal itemQty;
+
+
+    /**
+     * 标价
+     */
+    @Excel(name = "标价")
+    @ApiModelProperty(value = "标价")
+    private BigDecimal priceStd;
+
+
+    /**
+     * 标价金额 (商品数量*标价)
+     */
+    @Excel(name = "标价金额 (商品数量*标价)")
+    @ApiModelProperty(value = "标价金额 (商品数量*标价)")
+    private BigDecimal amtStd;
+
+
+    /**
+     * 售价
+     */
+    @Excel(name = "售价")
+    @ApiModelProperty(value = "售价")
+    private BigDecimal priceSale;
+
+
+    /**
+     * 售价金额 (商品数量*售价)
+     */
+    @Excel(name = "售价金额 (商品数量*售价)")
+    @ApiModelProperty(value = "售价金额 (商品数量*售价)")
+    private BigDecimal itemAmt;
+
+
+    /**
+     * 折扣 (售价/标价)
+     */
+    @Excel(name = "折扣 (售价/标价)")
+    @ApiModelProperty(value = "折扣 (售价/标价)")
+    private BigDecimal priceDiscount;
+
+
+    /**
+     * 非标号
+     */
+    @Excel(name = "非标号")
+    @ApiModelProperty(value = "非标号")
+    private String nonStdCode;
+
+
+    /**
+     * 出库状态
+     */
+    @Excel(name = "出库状态")
+    @ApiModelProperty(value = "出库状态")
+    private String outStatus;
+
+
+    /**
+     * 出库中数量
+     */
+    @Excel(name = "出库中数量")
+    @ApiModelProperty(value = "出库中数量")
+    private BigDecimal outingQty;
+
+
+    /**
+     * 出库中金额
+     */
+    @Excel(name = "出库中金额")
+    @ApiModelProperty(value = "出库中金额")
+    private BigDecimal outingAmt;
+
+
+    /**
+     * 已出库数量
+     */
+    @Excel(name = "已出库数量")
+    @ApiModelProperty(value = "已出库数量")
+    private BigDecimal outQty;
+
+
+    /**
+     * 已出库金额
+     */
+    @Excel(name = "已出库金额")
+    @ApiModelProperty(value = "已出库金额")
+    private BigDecimal outAmt;
+
+
+    /**
+     * 已出库退货数量
+     */
+    @Excel(name = "已出库退货数量")
+    @ApiModelProperty(value = "已出库退货数量")
+    private BigDecimal returnQty;
+
+
+    /**
+     * 已出库退货金额
+     */
+    @Excel(name = "已出库退货金额")
+    @ApiModelProperty(value = "已出库退货金额")
+    private BigDecimal returnAmt;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 23 - 0
src/main/java/com/dk/mdm/service/sale/OrderItemService.java

@@ -0,0 +1,23 @@
+package com.dk.mdm.service.sale;
+
+import com.dk.mdm.model.pojo.sale.OrderItem;
+import com.dk.mdm.mapper.sale.OrderItemMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class OrderItemService extends BaseService<OrderItem> {
+
+	@Override
+	public BaseMapper<OrderItem> getRepository() {
+		return orderItemMapper;
+	}
+
+	@Autowired
+	private OrderItemMapper orderItemMapper;
+
+}