|
@@ -0,0 +1,92 @@
|
|
|
+<?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="org.dromara.customerReconciliation.mapper.CustomerReconciliationVOMapper">
|
|
|
+ <resultMap id="customerReconciliationResultMap" type="org.dromara.customerReconciliation.domain.VO.CustomerReconciliationVO">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="purchase_code" column="purchase_code"/>
|
|
|
+ <result property="status" column="duizhang_status"/>
|
|
|
+
|
|
|
+ <association property="customer" javaType="org.dromara.customerReconciliation.domain.VO.CustomerReconciliationCustomerVo">
|
|
|
+ <result property="factoryName" column="garment_factory"/>
|
|
|
+ <result property="factoryContact" column="garment_factory_people"/>
|
|
|
+ <result property="factoryPhone" column="garment_factory_tel"/>
|
|
|
+ <result property="customerName" column="customer_customerName"/>
|
|
|
+ <result property="address" column="receiving_address"/>
|
|
|
+ </association>
|
|
|
+
|
|
|
+ <association property="delivery" javaType="org.dromara.customerReconciliation.domain.VO.DeliveryVO">
|
|
|
+ <result property="deliveryNo" column="delivery_deliveryNo"/>
|
|
|
+ <result property="styleNo" column="item_number"/>
|
|
|
+ <result property="baseCloth" column="base_cloth"/>
|
|
|
+ <result property="flowerNo" column="flower_no"/>
|
|
|
+ </association>
|
|
|
+
|
|
|
+ <association property="order" javaType="org.dromara.customerReconciliation.domain.VO.OrderVo">
|
|
|
+ <result property="amount" column="order_amount"/>
|
|
|
+ <result property="deliveryTime" column="delivery_date"/>
|
|
|
+ <result property="receiveTime" column="receive_time"/>
|
|
|
+ </association>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="get" resultMap="customerReconciliationResultMap">
|
|
|
+ SELECT p.id AS id,garment_factory,garment_factory_people,garment_factory_tel,'客户名称' AS customer_customerName,receiving_address,'大货编号' AS delivery_deliveryNo,item_number,base_cloth,'花型号' AS flower_no,all_money AS order_amount,delivery_date,confirm_delivery_time AS receive_time,purchase_code,duizhang_status
|
|
|
+ FROM fa_kuyou_plan AS p
|
|
|
+ LEFT JOIN fa_kuyou_plan_info AS pi ON pi.plan_id = p.id
|
|
|
+ <where>
|
|
|
+ <if test="dto.garmentFactory != null and dto.garmentFactory != ''">
|
|
|
+ AND pi.garment_factory = #{dto.garmentFactory}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ AND '送货单号' = '送货单号'
|
|
|
+
|
|
|
+ <if test="dto.baseCloth != null and dto.baseCloth != ''">
|
|
|
+ AND base_cloth = #{dto.baseCloth}
|
|
|
+ </if>
|
|
|
+ <if test="dto.itemNumber != null and dto.itemNumber != ''">
|
|
|
+ AND item_number = #{dto.itemNumber}
|
|
|
+ </if>
|
|
|
+ <if test="dto.deliveryStartTime != null and dto.deliveryStartTime != ''">
|
|
|
+ AND delivery_date >= #{dto.deliveryStartTime}
|
|
|
+ </if>
|
|
|
+ <if test="dto.deliveryEndTime != null and dto.deliveryEndTime != ''">
|
|
|
+ AND #{dto.deliveryEndTime} >= delivery_date
|
|
|
+ </if>
|
|
|
+ <if test="dto.isFirstProcessing != null and dto.isFirstProcessing != ''">
|
|
|
+ AND is_first_processing = #{dto.isFirstProcessing}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isFirstOrder != null and dto.isFirstOrder != ''">
|
|
|
+ AND is_first_order = #{dto.isFirstOrder}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isMulticolor != null and dto.isMulticolor != ''">
|
|
|
+ AND is_multicolor = #{dto.isMulticolor}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isQuickReturn != null and dto.isQuickReturn != ''">
|
|
|
+ AND is_quick_return = #{dto.isQuickReturn}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isBurnFlowers != null and dto.isBurnFlowers != ''">
|
|
|
+ AND is_burn_flowers = #{dto.isBurnFlowers}
|
|
|
+ </if>
|
|
|
+ <if test="dto.printStatus != null and dto.printStatus != ''">
|
|
|
+ AND print_status = #{dto.printStatus}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isBuhuo != null and dto.isBuhuo != ''">
|
|
|
+ AND is_buhuo = #{dto.isBuhuo}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isUrgent != null and dto.isUrgent != ''">
|
|
|
+ AND is_urgent = #{dto.isUrgent}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isSys != null and dto.isSys != ''">
|
|
|
+ AND is_sys = #{dto.isSys}
|
|
|
+ </if>
|
|
|
+ <if test="dto.duiZhangStatus != null and dto.duiZhangStatus != ''">
|
|
|
+ AND duizhang_status = #{dto.duiZhangStatus}
|
|
|
+ </if>
|
|
|
+ <if test="dto.craftStatus != null and dto.craftStatus != ''">
|
|
|
+ AND craft_status = #{dto.craftStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
+ </select>
|
|
|
+</mapper>
|