44 lines
2.1 KiB
XML
44 lines
2.1 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.WmsOutCostcenterTicketMapper">
|
|
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.OutCostcenterVO">
|
|
SELECT oct.id,oct."no" as "ticket_no",oct.create_by,oct.create_time,oct.mat_doc,oct.doc_year,oct.finish
|
|
,oct.audit_state,oct.audit_by,oct.audit_time,oct.audit_msg,oc.*
|
|
FROM wms_out_costcenter_ticket oct
|
|
INNER JOIN wms_out_costcenter oc ON oct.order_id=oc."id"
|
|
<where>
|
|
<if test="request.startDate != null">
|
|
and oct.create_time >= #{request.startDate}
|
|
</if>
|
|
<if test="request.endDate != null">
|
|
and oct.create_time <= #{request.endDate}
|
|
</if>
|
|
<if test="request.no != null and request.no!=''">
|
|
and oc."no" ilike concat('%', #{request.no}, '%')
|
|
</if>
|
|
<if test="request.aufnr != null and request.aufnr!=''">
|
|
and oc.aufnr ilike concat('%', #{request.aufnr}, '%')
|
|
</if>
|
|
<if test="request.werks != null and request.werks!=''">
|
|
and oc.werks like concat('%', #{request.werks}, '%')
|
|
</if>
|
|
<if test="request.rsnum != null and request.rsnum!=''">
|
|
and oc.rsnum like concat('%', #{request.rsnum}, '%')
|
|
</if>
|
|
<if test="request.kostl != null and request.kostl!=''">
|
|
and oc.kostl like concat('%', #{request.kostl}, '%')
|
|
</if>
|
|
</where>
|
|
order by oct.id desc
|
|
</select>
|
|
|
|
<select id="getInfo" resultType="com.nflg.wms.common.pojo.vo.OutCostcenterInfoVO">
|
|
SELECT oct.id,oct.lgort,oct."no" as "ticket_no",oct.create_by,oct.create_time,oct.mat_doc,oct.doc_year
|
|
,oct.finish,oct.audit_state,oc.*
|
|
FROM wms_out_costcenter_ticket oct
|
|
INNER JOIN wms_out_costcenter oc ON oct.order_id=oc."id"
|
|
WHERE oct."id"=#{id}
|
|
</select>
|
|
</mapper>
|