|
|
|
<?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.DeviceReceiveOrderDao">
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.inv.DeviceReceiveOrderResponse">
|
|
|
|
SELECT
|
|
|
|
dro.id,
|
|
|
|
dro.orderId,
|
|
|
|
dro.deptCode,
|
|
|
|
dro.createUser,
|
|
|
|
dro.auditUser,
|
|
|
|
dro.createTime,
|
|
|
|
dro.updateTime,
|
|
|
|
dro.STATUS,
|
|
|
|
dro.fromInvSpaceCode,
|
|
|
|
dro.receiveUser,
|
|
|
|
( SELECT employeeName FROM auth_user WHERE id = dro.receiveUser ) receiveUserName,
|
|
|
|
( SELECT `name` FROM auth_dept WHERE CODE = dro.fromDeptCode ) fromDeptName,
|
|
|
|
( SELECT `code` FROM auth_dept WHERE CODE = dro.fromDeptCode ) fromDeptCode,
|
|
|
|
( SELECT `name` FROM auth_warehouse WHERE CODE = dro.fromInvCode ) fromInvName,
|
|
|
|
( SELECT `code` FROM auth_warehouse WHERE CODE = dro.fromInvCode ) fromInvCode,
|
|
|
|
( SELECT `name` FROM auth_space WHERE CODE = dro.fromInvSpaceCode ) fromInvSpaceName
|
|
|
|
FROM
|
|
|
|
device_receive_order dro
|
|
|
|
<where>
|
|
|
|
<if test="status != null">
|
|
|
|
AND status = #{status}
|
|
|
|
</if>
|
|
|
|
<if test="orderId != null and orderId != ''">
|
|
|
|
AND orderId like concat('%', #{orderId}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="fromDeptCode != null and fromDeptCode != ''">
|
|
|
|
AND fromDeptCode = #{fromDeptCode}
|
|
|
|
</if>
|
|
|
|
<if test="fromInvCode != null and fromInvCode != ''">
|
|
|
|
AND fromInvCode = #{fromInvCode}
|
|
|
|
</if>
|
|
|
|
<if test="fromInvSpaceCode != null and fromInvSpaceCode != ''">
|
|
|
|
AND fromInvSpaceCode = #{fromInvSpaceCode}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
order by updateTime desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectOrderIdById" resultType="java.lang.String">
|
|
|
|
select orderId
|
|
|
|
from device_receive_order
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectIdByOrderId" resultType="java.lang.Integer">
|
|
|
|
select id
|
|
|
|
from device_receive_order
|
|
|
|
where orderId = #{orderId}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<update id="updateStatusById">
|
|
|
|
update device_receive_order set status = #{status} where id = #{id}
|
|
|
|
</update>
|
|
|
|
</mapper>
|