You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
3.2 KiB
XML
70 lines
3.2 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.glxp.api.dao.inv.InvPlaceOrderDao">
|
|
<select id="filterList" resultType="com.glxp.api.res.inv.InvPlaceOrderResponse">
|
|
select t.recordId,
|
|
t.type,
|
|
t.orderId,
|
|
t2.invCode,
|
|
t2.invSpaceCode,
|
|
t.createUser,
|
|
(select employeeName from auth_user where id = t.createUser) operatorName,
|
|
(select name from auth_warehouse where code = t2.invCode) invName,
|
|
(select name from auth_space where code = t2.invSpaceCode) invSpaceName,
|
|
t.createTime,
|
|
t2.code,
|
|
t2.batchNo,
|
|
t2.relId,
|
|
bp.cpmctymc productName,
|
|
bp.ggxh,
|
|
pd.produceDate productionDate,
|
|
pd.expireDate,
|
|
bp.nameCode,
|
|
bp.zczbhhzbapzbh,
|
|
bp.ylqxzcrbarmc,
|
|
(select name from basic_corp where erpId = pd.supId) supName,
|
|
pd.serialNo,
|
|
bp.manufactory,
|
|
bp.measname
|
|
from inv_place_order t
|
|
right join inv_place_order_detail t2 on t.recordId = t2.recordId
|
|
left join inv_product_detail pd
|
|
on t2.invCode = pd.invCode and t2.invSpaceCode = pd.invSpaceCode and t2.relId = pd.relId
|
|
and t2.code = pd.code
|
|
left join basic_udirel bu on bu.id = t2.relId
|
|
left join basic_products bp on bp.uuid = bu.uuid
|
|
<where>
|
|
<if test="recordId != null and recordId != ''">
|
|
and t.recordId like concat('%', #{recordId}, '%')
|
|
</if>
|
|
<if test="invCode != null and invCode != ''">
|
|
and t2.invCode = #{invCode}
|
|
</if>
|
|
<if test="invSpaceCode != null and invSpaceCode != ''">
|
|
and t2.invSpaceCode = #{invSpaceCode}
|
|
</if>
|
|
<if test="type != null">
|
|
and t.type = #{type}
|
|
</if>
|
|
<if test="orderId != null and orderId != ''">
|
|
and t.orderId like concat('%', #{orderId}, '%')
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
and t2.code like concat('%', #{code}, '%')
|
|
</if>
|
|
<if test="nameCode != null and nameCode != ''">
|
|
and bp.nameCode like concat('%', #{nameCode}, '%')
|
|
</if>
|
|
<if test="productName != null and productName != ''">
|
|
and bp.cpmctymc like concat('%', #{productName}, '%')
|
|
</if>
|
|
<if test="batchNo != null and batchNo != ''">
|
|
and t2.batchNo like concat('%', #{batchNo}, '%')
|
|
</if>
|
|
<if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''">
|
|
and bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%')
|
|
</if>
|
|
</where>
|
|
group by t2.code
|
|
</select>
|
|
</mapper> |