<?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.ruoyi.production.mapper.ProductOrderMapper">
|
|
|
<resultMap id="basicMap" type="com.ruoyi.production.pojo.ProductOrder">
|
<id property="id" column="id"/>
|
<result property="productModelId" column="product_model_id"/>
|
<result property="tenantId" column="tenant_id"/>
|
<result property="salesLedgerId" column="sales_ledger_id"/>
|
<result property="routeId" column="route_id"/>
|
<result property="npsNo" column="nps_no"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateTime" column="update_time"/>
|
</resultMap>
|
<select id="pageProductOrder" resultType="com.ruoyi.production.dto.ProductOrderDto">
|
select po.*,sl.sales_contract_no,sl.customer_name,slp.product_category,slp.specification_model
|
from product_order po
|
left join sales_ledger sl on po.sales_ledger_id = sl.id
|
left join sales_ledger_product slp on po.product_model_id = slp.id
|
left join process_route pr on po.route_id = pr.id
|
<where>
|
<if test="c.npsNo != null and c.npsNo != ''">
|
and po.nps_no like concat('%',#{c.npsNo},'%')
|
</if>
|
<if test="c.salesContractNo != null and c.salesContractNo != ''">
|
and sl.sales_contract_no like concat('%',#{c.salesContractNo},'%')
|
</if>
|
<if test="c.customerName != null and c.customerName != ''">
|
and sl.customer_name like concat('%',#{c.customerName},'%')
|
</if>
|
<if test="c.productCategory != null and c.productCategory != ''">
|
and slp.product_category like concat('%',#{c.productCategory},'%')
|
</if>
|
<if test="c.specificationModel != null and c.specificationModel != ''">
|
and slp.specification_model like concat('%',#{c.specificationModel},'%')
|
</if>
|
</where>
|
</select>
|
|
|
</mapper>
|