2025-12-15 16:11:16 +08:00
|
|
|
<?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.klp.crm.mapper.CrmOrderMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.crm.domain.CrmOrder" id="CrmOrderResult">
|
|
|
|
|
<result property="orderId" column="order_id"/>
|
|
|
|
|
<result property="orderCode" column="order_code"/>
|
|
|
|
|
<result property="orderType" column="order_type"/>
|
|
|
|
|
<result property="customerId" column="customer_id"/>
|
|
|
|
|
<result property="orderAmount" column="order_amount"/>
|
|
|
|
|
<result property="salesman" column="salesman"/>
|
|
|
|
|
<result property="deliveryDate" column="delivery_date"/>
|
|
|
|
|
<result property="preOrderStatus" column="pre_order_status"/>
|
|
|
|
|
<result property="auditUser" column="audit_user"/>
|
|
|
|
|
<result property="auditTime" column="audit_time"/>
|
|
|
|
|
<result property="orderStatus" column="order_status"/>
|
|
|
|
|
<result property="financeStatus" column="finance_status"/>
|
|
|
|
|
<result property="unpaidAmount" column="unpaid_amount"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
2026-02-03 11:26:10 +08:00
|
|
|
<result property="contractCode" column="contract_code"/>
|
2026-04-13 16:50:18 +08:00
|
|
|
<result property="contractName" column="contract_name"/>
|
|
|
|
|
<result property="supplier" column="supplier"/>
|
|
|
|
|
<result property="customer" column="customer"/>
|
|
|
|
|
<result property="signTime" column="sign_time"/>
|
|
|
|
|
<result property="signLocation" column="sign_location"/>
|
|
|
|
|
<result property="productContent" column="product_content"/>
|
|
|
|
|
<result property="contractContent" column="contract_content"/>
|
|
|
|
|
<result property="supplierAddress" column="supplier_address"/>
|
|
|
|
|
<result property="supplierPhone" column="supplier_phone"/>
|
|
|
|
|
<result property="supplierBank" column="supplier_bank"/>
|
|
|
|
|
<result property="supplierAccount" column="supplier_account"/>
|
|
|
|
|
<result property="supplierTaxNo" column="supplier_tax_no"/>
|
|
|
|
|
<result property="customerAddress" column="customer_address"/>
|
|
|
|
|
<result property="customerPhone" column="customer_phone"/>
|
|
|
|
|
<result property="customerBank" column="customer_bank"/>
|
|
|
|
|
<result property="customerAccount" column="customer_account"/>
|
|
|
|
|
<result property="customerTaxNo" column="customer_tax_no"/>
|
|
|
|
|
<result property="techAnnex" column="tech_annex"/>
|
|
|
|
|
<result property="businessAnnex" column="business_annex"/>
|
|
|
|
|
<result property="productionSchedule" column="production_schedule"/>
|
|
|
|
|
<result property="status" column="status"/>
|
2026-03-30 13:39:27 +08:00
|
|
|
<result property="contractId" column="contract_id"/>
|
|
|
|
|
<result property="annexFiles" column="annex_files"/>
|
2025-12-15 16:11:16 +08:00
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
</resultMap>
|
2025-12-16 16:38:39 +08:00
|
|
|
<select id="selectVoPagePlus" resultType="com.klp.crm.domain.vo.CrmOrderVo">
|
|
|
|
|
SELECT
|
2025-12-17 14:16:39 +08:00
|
|
|
co.order_id AS orderId,
|
|
|
|
|
co.order_code AS orderCode,
|
|
|
|
|
co.order_type AS orderType,
|
|
|
|
|
co.customer_id AS customerId,
|
|
|
|
|
co.order_amount AS orderAmount,
|
|
|
|
|
co.salesman,
|
|
|
|
|
co.delivery_date AS deliveryDate,
|
|
|
|
|
co.pre_order_status AS preOrderStatus,
|
|
|
|
|
co.audit_user AS auditUser,
|
|
|
|
|
co.audit_time AS auditTime,
|
|
|
|
|
co.order_status AS orderStatus,
|
|
|
|
|
co.finance_status AS financeStatus,
|
|
|
|
|
co.unpaid_amount AS unpaidAmount,
|
|
|
|
|
co.remark,
|
2026-02-03 11:26:10 +08:00
|
|
|
co.contract_code AS contractCode,
|
2026-04-13 16:50:18 +08:00
|
|
|
co.contract_name AS contractName,
|
|
|
|
|
co.supplier,
|
|
|
|
|
co.customer,
|
|
|
|
|
co.sign_time AS signTime,
|
|
|
|
|
co.sign_location AS signLocation,
|
|
|
|
|
co.product_content AS productContent,
|
|
|
|
|
co.contract_content AS contractContent,
|
|
|
|
|
co.supplier_address AS supplierAddress,
|
|
|
|
|
co.supplier_phone AS supplierPhone,
|
|
|
|
|
co.supplier_bank AS supplierBank,
|
|
|
|
|
co.supplier_account AS supplierAccount,
|
|
|
|
|
co.supplier_tax_no AS supplierTaxNo,
|
|
|
|
|
co.customer_address AS customerAddress,
|
|
|
|
|
co.customer_phone AS customerPhone,
|
|
|
|
|
co.customer_bank AS customerBank,
|
|
|
|
|
co.customer_account AS customerAccount,
|
|
|
|
|
co.customer_tax_no AS customerTaxNo,
|
|
|
|
|
co.tech_annex AS techAnnex,
|
|
|
|
|
co.business_annex AS businessAnnex,
|
|
|
|
|
co.production_schedule AS productionSchedule,
|
|
|
|
|
co.status,
|
2026-03-30 13:39:27 +08:00
|
|
|
co.contract_id AS contractId,
|
|
|
|
|
co.annex_files AS annexFiles,
|
2025-12-17 14:16:39 +08:00
|
|
|
co.create_by AS createBy,
|
|
|
|
|
co.create_time AS createTime,
|
|
|
|
|
co.update_by AS updateBy,
|
|
|
|
|
co.update_time AS updateTime,
|
|
|
|
|
cu.customer_code AS customerCode,
|
|
|
|
|
cu.contact_person AS contactPerson,
|
2026-02-02 10:55:15 +08:00
|
|
|
cu.contact_way AS contactWay,
|
|
|
|
|
cu.company_name AS companyName,
|
2025-12-17 14:16:39 +08:00
|
|
|
cu.address AS address
|
2025-12-16 16:38:39 +08:00
|
|
|
FROM crm_order co
|
|
|
|
|
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
|
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
</select>
|
2025-12-15 16:11:16 +08:00
|
|
|
|
|
|
|
|
|
2026-02-03 11:26:10 +08:00
|
|
|
<select id="selectVoById" resultType="com.klp.crm.domain.vo.CrmOrderVo">
|
|
|
|
|
SELECT
|
|
|
|
|
co.order_id AS orderId,
|
|
|
|
|
co.order_code AS orderCode,
|
|
|
|
|
co.order_type AS orderType,
|
|
|
|
|
co.customer_id AS customerId,
|
|
|
|
|
co.order_amount AS orderAmount,
|
|
|
|
|
co.salesman,
|
|
|
|
|
co.delivery_date AS deliveryDate,
|
|
|
|
|
co.pre_order_status AS preOrderStatus,
|
|
|
|
|
co.audit_user AS auditUser,
|
|
|
|
|
co.audit_time AS auditTime,
|
|
|
|
|
co.order_status AS orderStatus,
|
|
|
|
|
co.finance_status AS financeStatus,
|
|
|
|
|
co.unpaid_amount AS unpaidAmount,
|
|
|
|
|
co.remark,
|
|
|
|
|
co.contract_code AS contractCode,
|
2026-04-13 16:50:18 +08:00
|
|
|
co.contract_name AS contractName,
|
|
|
|
|
co.supplier,
|
|
|
|
|
co.customer,
|
|
|
|
|
co.sign_time AS signTime,
|
|
|
|
|
co.sign_location AS signLocation,
|
|
|
|
|
co.product_content AS productContent,
|
|
|
|
|
co.contract_content AS contractContent,
|
|
|
|
|
co.supplier_address AS supplierAddress,
|
|
|
|
|
co.supplier_phone AS supplierPhone,
|
|
|
|
|
co.supplier_bank AS supplierBank,
|
|
|
|
|
co.supplier_account AS supplierAccount,
|
|
|
|
|
co.supplier_tax_no AS supplierTaxNo,
|
|
|
|
|
co.customer_address AS customerAddress,
|
|
|
|
|
co.customer_phone AS customerPhone,
|
|
|
|
|
co.customer_bank AS customerBank,
|
|
|
|
|
co.customer_account AS customerAccount,
|
|
|
|
|
co.customer_tax_no AS customerTaxNo,
|
|
|
|
|
co.tech_annex AS techAnnex,
|
|
|
|
|
co.business_annex AS businessAnnex,
|
|
|
|
|
co.production_schedule AS productionSchedule,
|
|
|
|
|
co.status,
|
2026-03-30 13:39:27 +08:00
|
|
|
co.contract_id AS contractId,
|
|
|
|
|
co.annex_files AS annexFiles,
|
2026-02-03 11:26:10 +08:00
|
|
|
co.create_by AS createBy,
|
|
|
|
|
co.create_time AS createTime,
|
|
|
|
|
co.update_by AS updateBy,
|
|
|
|
|
co.update_time AS updateTime,
|
|
|
|
|
cu.customer_code AS customerCode,
|
|
|
|
|
cu.contact_person AS contactPerson,
|
|
|
|
|
cu.contact_way AS contactWay,
|
|
|
|
|
cu.company_name AS companyName,
|
|
|
|
|
cu.address AS address
|
|
|
|
|
FROM crm_order co
|
|
|
|
|
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
|
|
|
|
WHERE co.order_id = #{orderId}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-12-15 16:11:16 +08:00
|
|
|
</mapper>
|