|
|
|
@ -2,20 +2,20 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.glxp.api.dao.inout.IoOrderDao">
|
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.inout.IoOrderResponse">
|
|
|
|
|
select io_order.*,
|
|
|
|
|
bu.name billTypeName,
|
|
|
|
|
auth_user.employeeName createUserName,
|
|
|
|
|
auth_dept.name deptName,
|
|
|
|
|
auth_warehouse.name invName
|
|
|
|
|
from io_order
|
|
|
|
|
left join basic_bussiness_type bu on io_order.action = bu.action
|
|
|
|
|
left join auth_user on auth_user.id = io_order.createUser or auth_user.id = io_order.updateUser
|
|
|
|
|
or auth_user.id = io_order.reviewUser
|
|
|
|
|
left join auth_dept on auth_dept.code = io_order.deptCode
|
|
|
|
|
left join auth_warehouse on auth_warehouse.code = io_order.invCode
|
|
|
|
|
select io.*,
|
|
|
|
|
(select name from basic_bussiness_type bus where bus.action = io.action) billTypeName,
|
|
|
|
|
(select name from auth_dept ad where ad.code = io.deptCode) deptName,
|
|
|
|
|
(select name from auth_warehouse aw where aw.code = io.invCode) invName,
|
|
|
|
|
(select employeeName from auth_user au where au.id = io.createUser) createUserName,
|
|
|
|
|
(select employeeName from auth_user au2 where au2.id = io.updateUser) updateUserName,
|
|
|
|
|
(select employeeName from auth_user au3 where au3.id = io.reviewUser) reviewUserName,
|
|
|
|
|
(select name from auth_dept ad2 where ad2.code = io.fromDeptCode) fromDeptName,
|
|
|
|
|
(select name from auth_warehouse aw2 where aw2.code = io.fromInvCode) fromInvName,
|
|
|
|
|
(select name from basic_corp bc where bc.erpId = io.fromCorp) fromCorpName
|
|
|
|
|
from io_order as io
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null and id != ''">
|
|
|
|
|
AND io_order.id = #{id}
|
|
|
|
|
AND id = #{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="billNo != null and billNo != ''">
|
|
|
|
|
AND billNo like concat('%', #{billNo}, '%')
|
|
|
|
@ -30,19 +30,20 @@
|
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
|
|
AND io_order.createTime between #{startTime} and #{endTime}
|
|
|
|
|
AND createTime between #{startTime} and #{endTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
|
|
AND io_order.createTime >= #{startTime}
|
|
|
|
|
AND createTime >= #{startTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
|
|
AND io_order.createTime <= #{endTime}
|
|
|
|
|
AND createTime <= #{endTime}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="filterOrderList" resultType="com.glxp.api.entity.inout.IoOrderEntity">
|
|
|
|
|
select * from io_order
|
|
|
|
|
select *
|
|
|
|
|
from io_order
|
|
|
|
|
<where>
|
|
|
|
|
<if test="billNo != null and billNo != ''">
|
|
|
|
|
AND billNo like concat('%', #{billNo}, '%')
|
|
|
|
|