Files
nanguangszwlback/mhd_oms/src/main/resources/mapper/salesOrder/SalesOrderMapper.xml
T
2026-01-19 15:20:20 +08:00

191 lines
9.3 KiB
XML

<?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.mhd.oms.domain.salesOrder.repository.mapper.SalesOrderMapper">
<resultMap type="com.mhd.oms.domain.salesOrder.repository.po.SalesOrderPO" id="SalesOrderResult">
<result property="id" column="id" />
<result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="auditBy" column="audit_by" />
<result property="auditTime" column="audit_time" />
<result property="auditState" column="audit_state" />
<result property="auditResult" column="audit_result" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="orderNo" column="order_no" />
<result property="orderState" column="order_state" />
<result property="scoNo" column="sco_no" />
<result property="customerId" column="customer_id" />
<result property="customer" column="customer" />
<result property="totalAmount" column="total_amount" />
<result property="taxAmount" column="tax_amount" />
<result property="inStorageNum" column="in_storage_num" />
<result property="orderTypeId" column="order_type_id" />
<result property="orderType" column="order_type" />
<result property="shipperId" column="shipper_id" />
<result property="shipper" column="shipper" />
<result property="contractNo" column="contract_no" />
<result property="projectId" column="project_id" />
<result property="project" column="project" />
<result property="tacklState" column="tackl_state" />
<result property="tacklTime" column="tackl_time" />
<result property="source" column="source" />
<result property="orgId" column="org_id" />
<result property="org" column="org" />
<result property="orderTime" column="order_time" />
<result property="deliveryWarehouseId" column="delivery_warehouse_id" />
<result property="deliveryWarehouse" column="delivery_warehouse" />
<result property="deliveryDate" column="delivery_date" />
<result property="customerOrders" column="customer_orders" />
<result property="checkInventory" column="check_inventory" />
<result property="rateConcession" column="rate_concession" />
<result property="discountAmount" column="discount_amount" />
<result property="fileUrl" column="file_url" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSalesOrderPo">
select id, create_by, create_by_name, create_time, update_by, update_by_name, update_time, del_flag, audit_by, audit_time, audit_state, audit_result, top_organization_id, organization_id, organization_name, order_no, order_state, sco_no, customer_id, customer, total_amount, tax_amount, in_storage_num, order_type_id, order_type, shipper_id, shipper, contract_no, project_id, project, tackl_state, tackl_time, source, org_id, org, order_time, delivery_warehouse_id, delivery_warehouse, delivery_date, customer_orders, check_inventory, rate_concession, discount_amount, file_url, remark from oms_sales_order
where del_flag = 1
</sql>
<sql id="selectSalesOrderPo1">
<!-- <if test="createByName != null and createByName != ''">-->
<!-- and create_by_name like concat('%', #{createByName}, '%')-->
<!-- </if>-->
<!-- <if test="updateByName != null and updateByName != ''">-->
<!-- and update_by_name like concat('%', #{updateByName}, '%')-->
<!-- </if>-->
<if test="auditBy != null and auditBy != ''">
and audit_by = #{auditBy}
</if>
<if test="auditTime != null ">
and audit_time = #{auditTime}
</if>
<if test="auditState != null ">
and audit_state = #{auditState}
</if>
<if test="auditResult != null and auditResult != ''">
and audit_result = #{auditResult}
</if>
<if test="topOrganizationId != null ">
and top_organization_id = #{topOrganizationId}
</if>
<if test="organizationId != null ">
and organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="orderNo != null and orderNo != ''">
and order_no = #{orderNo}
</if>
<if test="orderState != null ">
and order_state = #{orderState}
</if>
<if test="scoNo != null and scoNo != ''">
and sco_no = #{scoNo}
</if>
<if test="customerId != null ">
and customer_id = #{customerId}
</if>
<if test="customer != null and customer != ''">
and customer = #{customer}
</if>
<if test="totalAmount != null ">
and total_amount = #{totalAmount}
</if>
<if test="taxAmount != null ">
and tax_amount = #{taxAmount}
</if>
<if test="inStorageNum != null ">
and in_storage_num = #{inStorageNum}
</if>
<if test="orderTypeId != null ">
and order_type_id = #{orderTypeId}
</if>
<if test="orderType != null and orderType != ''">
and order_type = #{orderType}
</if>
<if test="shipperId != null ">
and shipper_id = #{shipperId}
</if>
<if test="shipper != null and shipper != ''">
and shipper = #{shipper}
</if>
<if test="contractNo != null and contractNo != ''">
and contract_no = #{contractNo}
</if>
<if test="projectId != null and projectId != ''">
and project_id = #{projectId}
</if>
<if test="project != null and project != ''">
and project = #{project}
</if>
<if test="tacklState != null ">
and tackl_state = #{tacklState}
</if>
<if test="tacklTime != null ">
and tackl_time = #{tacklTime}
</if>
<if test="source != null ">
and source = #{source}
</if>
<if test="orgId != null ">
and org_id = #{orgId}
</if>
<if test="org != null and org != ''">
and org = #{org}
</if>
<if test="orderTime != null ">
and order_time = #{orderTime}
</if>
<if test="deliveryWarehouseId != null ">
and delivery_warehouse_id = #{deliveryWarehouseId}
</if>
<if test="deliveryWarehouse != null and deliveryWarehouse != ''">
and delivery_warehouse = #{deliveryWarehouse}
</if>
<if test="deliveryDate != null ">
and delivery_date = #{deliveryDate}
</if>
<if test="customerOrders != null and customerOrders != ''">
and customer_orders = #{customerOrders}
</if>
<if test="checkInventory != null ">
and check_inventory = #{checkInventory}
</if>
<if test="rateConcession != null ">
and rate_concession = #{rateConcession}
</if>
<if test="discountAmount != null ">
and discount_amount = #{discountAmount}
</if>
<if test="fileUrl != null and fileUrl != ''">
and file_url = #{fileUrl}
</if>
</sql>
<select id="queryList" parameterType="com.mhd.oms.domain.salesOrder.repository.todo.SalesOrderDO" resultMap="SalesOrderResult">
<include refid="selectSalesOrderPo"/>
<include refid="selectSalesOrderPo1"/>
</select>
<select id="getInfosById" parameterType="java.util.List" resultType="com.mhd.oms.domain.salesOrder.repository.po.SalesOrderPO">
select id, create_by, create_by_name, create_time, update_by, update_by_name, update_time, del_flag, audit_by, audit_time, audit_state, audit_result, top_organization_id, organization_id, organization_name, order_no, order_state, sco_no, customer_id, customer, total_amount, tax_amount, in_storage_num, order_type_id, order_type, shipper_id, shipper, contract_no, project_id, project, tackl_state, tackl_time, source, org_id, org, order_time, delivery_warehouse_id, delivery_warehouse, delivery_date, customer_orders, check_inventory, rate_concession, discount_amount, file_url, remark from oms_sales_order
where del_flag = 1
and id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>