66 lines
3.3 KiB
XML
66 lines
3.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.nflg.wms.repository.mapper.WmsTransferCompanyTicketMapper">
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.TransferCompanyTicketVO">
|
|
select tct.id,tct.no as "ticket_no",tct.create_by,tct.state,tct.create_time,tct.update_by,tct.update_time,tct.mat_doc
|
|
,tct.doc_year,tct.finish,tct.audit_state,tct.audit_by,tct.audit_time,tct.audit_msg,tc.*
|
|
from wms_transfer_company tc
|
|
inner join wms_transfer_company_ticket tct on tc.id = tct.order_id
|
|
<where>
|
|
<if test="request.startDate!=null">
|
|
and tct.create_time >= #{request.startDate}
|
|
</if>
|
|
<if test="request.endDate!=null">
|
|
and tct.create_time <= #{request.endDate}
|
|
</if>
|
|
<if test="request.no!=null and request.no!=''">
|
|
and tc."no" like concat('%',#{request.no},'%')
|
|
</if>
|
|
<if test="request.werks!=null and request.werks!=''">
|
|
and werks like concat('%',#{request.werks},'%')
|
|
</if>
|
|
<if test="request.bukrs!=null and request.bukrs!=''">
|
|
and bukrs like concat('%',#{request.bukrs},'%')
|
|
</if>
|
|
<if test="request.bukrs1!=null and request.bukrs1!=''">
|
|
and bukrs1 like concat('%',#{request.bukrs1},'%')
|
|
</if>
|
|
<if test="request.lgort!=null and request.lgort!=''">
|
|
and tc.lgort like concat('%',#{request.lgort},'%')
|
|
</if>
|
|
<if test="request.reswk!=null and request.reswk!=''">
|
|
and reswk like concat('%',#{request.reswk},'%')
|
|
</if>
|
|
<if test="request.lgfsb1!=null and request.lgfsb1!=''">
|
|
and lgfsb1 like concat('%',#{request.lgfsb1},'%')
|
|
</if>
|
|
</where>
|
|
order by tct.id desc
|
|
</select>
|
|
|
|
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.TransferCompanyTicketVO">
|
|
select tct.id,tct.no as "ticket_no",tct.create_by,tct.create_time,tct.update_by,tct.update_time,tct.mat_doc
|
|
,tct.doc_year,tct.state,tct.finish,tct.audit_state,tc.*
|
|
from wms_transfer_company tc
|
|
inner join wms_transfer_company_ticket tct on tc.id = tct.order_id
|
|
where tct.id=#{id}
|
|
</select>
|
|
|
|
<select id="getByNo" resultType="com.nflg.wms.common.pojo.vo.TransferCompanyTicketVO">
|
|
select tct.id,tct.no as "ticket_no",tct.create_by,tct.create_time,tct.update_by,tct.update_time,tct.mat_doc
|
|
,tct.doc_year,tct.state,tc.*
|
|
from wms_transfer_company tc
|
|
inner join wms_transfer_company_ticket tct on tc.id = tct.order_id
|
|
where tct.finish and tct."no"=#{no}
|
|
</select>
|
|
|
|
<select id="getVOByOrderNo" resultType="com.nflg.wms.common.pojo.vo.TransferCompanyTicketVO">
|
|
select tct.id,tct.no as "ticket_no",tct.create_by,tct.create_time,tct.update_by,tct.update_time,tct.mat_doc
|
|
,tct.doc_year,tct.state,tct.finish,tct.audit_state,tct.audit_by,tct.audit_time,tct.audit_msg,tc.*
|
|
from wms_transfer_company tc
|
|
inner join wms_transfer_company_ticket tct on tc.id = tct.order_id
|
|
where tct.state=0 and tct.finish and tc."no"=#{no}
|
|
</select>
|
|
</mapper>
|