12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061 |
- <?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.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
- <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId" />
- <result column="RESULT_OUT_MODE" jdbcType="VARCHAR" property="resultOutMode" />
- <result column="RESULT_OUT_GATE_TIME" jdbcType="TIMESTAMP" property="resultOutGateTime" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername" />
- <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
- <result column="SEGMENT_SQE" jdbcType="DECIMAL" property="segmentSqe" />
- <result column="RESULT_TRUCK_SNAPSHOT_PICTURE" jdbcType="BLOB" property="resultTruckSnapshotPicture" />
- </resultMap>
- <sql id="columns">
- RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, RESULT_OUT_MODE, RESULT_OUT_GATE_TIME, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_USERNAME,
- DELETE_TIME, SEGMENT_SQE, RESULT_TRUCK_SNAPSHOT_PICTURE
- </sql>
- <sql id="columns_alias">
- t.RESULT_ID, t.RESULT_TOTAL_ID, t.GATEPOST_ID, t.RESULT_OUT_MODE, t.RESULT_OUT_GATE_TIME,
- t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
- t.DELETE_USERNAME, t.DELETE_TIME, t.SEGMENT_SQE, t.RESULT_TRUCK_SNAPSHOT_PICTURE
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM TMSTRUCK_LEAVE_FACTORY_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM TMSTRUCK_LEAVE_FACTORY_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="gatepostId != null">
- and GATEPOST_ID = #{gatepostId}
- </if>
- <if test="resultOutMode != null and resultOutMode != ''">
- and RESULT_OUT_MODE = #{resultOutMode}
- </if>
- <if test="resultOutGateTime != null">
- and TO_CHAR(RESULT_OUT_GATE_TIME,'yyyy-MM-dd') = #{resultOutGateTime}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleteUsername != null and deleteUsername != ''">
- and DELETE_USERNAME = #{deleteUsername}
- </if>
- <if test="deleteTime != null">
- and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
- </if>
- <if test="segmentSqe != null">
- and SEGMENT_SQE = #{segmentSqe}
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="gatepostId != null">
- and GATEPOST_ID = #{gatepostId}
- </if>
- <if test="resultOutMode != null and resultOutMode != ''">
- and RESULT_OUT_MODE LIKE '%${resultOutMode}%'
- </if>
- <if test="resultOutGateTime != null">
- and TO_CHAR(RESULT_OUT_GATE_TIME,'yyyy-MM-dd') = #{resultOutGateTime}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- <if test="deleteUsername != null and deleteUsername != ''">
- and DELETE_USERNAME LIKE '%${deleteUsername}%'
- </if>
- <if test="deleteTime != null">
- and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
- </if>
- <if test="segmentSqe != null">
- and SEGMENT_SQE = #{segmentSqe}
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from TMSTRUCK_LEAVE_FACTORY_RESULT
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from TMSTRUCK_LEAVE_FACTORY_RESULT
- where 1!=1
- <if test="resultTotalId != null">
- or RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="gatepostId != null">
- or GATEPOST_ID = #{gatepostId}
- </if>
- <if test="resultOutMode != null and resultOutMode != ''">
- or RESULT_OUT_MODE = #{resultOutMode}
- </if>
- <if test="resultOutGateTime != null">
- or TO_CHAR(RESULT_OUT_GATE_TIME,'yyyy-MM-dd') = '#{resultOutGateTime}'
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleteUsername != null and deleteUsername != ''">
- or DELETE_USERNAME = #{deleteUsername}
- </if>
- <if test="deleteTime != null">
- or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
- </if>
- <if test="segmentSqe != null">
- or SEGMENT_SQE = #{segmentSqe}
- </if>
- <if test="resultTruckSnapshotPicture != null">
- or RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
- insert into TMSTRUCK_LEAVE_FACTORY_RESULT (RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID,
- RESULT_OUT_MODE, RESULT_OUT_GATE_TIME, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETE_USERNAME, DELETE_TIME,
- SEGMENT_SQE, RESULT_TRUCK_SNAPSHOT_PICTURE)
- values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL},
- #{resultOutMode,jdbcType=VARCHAR}, #{resultOutGateTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR},
- #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
- #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleteUsername,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP},
- #{segmentSqe,jdbcType=DECIMAL}, #{resultTruckSnapshotPicture,jdbcType=BLOB})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
- insert into TMSTRUCK_LEAVE_FACTORY_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- RESULT_ID,
- </if>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID,
- </if>
- <if test="gatepostId != null">
- GATEPOST_ID,
- </if>
- <if test="resultOutMode != null">
- RESULT_OUT_MODE,
- </if>
- <if test="resultOutGateTime != null">
- RESULT_OUT_GATE_TIME,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="deleteUsername != null">
- DELETE_USERNAME,
- </if>
- <if test="deleteTime != null">
- DELETE_TIME,
- </if>
- <if test="segmentSqe != null">
- SEGMENT_SQE,
- </if>
- <if test="resultTruckSnapshotPicture != null">
- RESULT_TRUCK_SNAPSHOT_PICTURE,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- #{resultId,jdbcType=DECIMAL},
- </if>
- <if test="resultTotalId != null">
- #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="gatepostId != null">
- #{gatepostId,jdbcType=DECIMAL},
- </if>
- <if test="resultOutMode != null">
- #{resultOutMode,jdbcType=VARCHAR},
- </if>
- <if test="resultOutGateTime != null">
- #{resultOutGateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUsername != null">
- #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleteUsername != null">
- #{deleteUsername,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="segmentSqe != null">
- #{segmentSqe,jdbcType=DECIMAL},
- </if>
- <if test="resultTruckSnapshotPicture != null">
- #{resultTruckSnapshotPicture,jdbcType=BLOB},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
- update TMSTRUCK_LEAVE_FACTORY_RESULT
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
- RESULT_OUT_MODE = #{resultOutMode,jdbcType=VARCHAR},
- RESULT_OUT_GATE_TIME = #{resultOutGateTime,jdbcType=TIMESTAMP},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
- SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
- RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture,jdbcType=BLOB}
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
- update TMSTRUCK_LEAVE_FACTORY_RESULT
- <set>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="gatepostId != null">
- GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
- </if>
- <if test="resultOutMode != null">
- RESULT_OUT_MODE = #{resultOutMode,jdbcType=VARCHAR},
- </if>
- <if test="resultOutGateTime != null">
- RESULT_OUT_GATE_TIME = #{resultOutGateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- </if>
- <if test="deleteUsername != null">
- DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="segmentSqe != null">
- SEGMENT_SQE = #{segmentSqe,jdbcType=DECIMAL},
- </if>
- <if test="resultTruckSnapshotPicture != null">
- RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture,jdbcType=BLOB},
- </if>
- </set>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="ResultMapWithBLOBs">
- <include refid="select"/>
- <include refid="where"/>
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="ResultMapWithBLOBs">
- <include refid="select"/>
- <include refid="whereLike"/>
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into TMSTRUCK_LEAVE_FACTORY_RESULT
- (RESULT_ID,
- RESULT_TOTAL_ID, GATEPOST_ID, RESULT_OUT_MODE,
- RESULT_OUT_GATE_TIME, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETE_USERNAME, DELETE_TIME,
- SEGMENT_SQE, RESULT_TRUCK_SNAPSHOT_PICTURE
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.resultId,jdbcType=DECIMAL},
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL}, #{item.resultOutMode,jdbcType=VARCHAR},
- #{item.resultOutGateTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
- #{item.deleteUsername,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP},
- #{item.segmentSqe,jdbcType=DECIMAL}, #{item.resultTruckSnapshotPicture,jdbcType=BLOB}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSTRUCK_LEAVE_FACTORY_RESULT
- set
- RESULT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TOTAL_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
- </foreach>
- ,GATEPOST_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.gatepostId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_OUT_MODE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultOutMode,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_OUT_GATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultOutGateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteUsername,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
- </foreach>
- ,SEGMENT_SQE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.segmentSqe,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TRUCK_SNAPSHOT_PICTURE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTruckSnapshotPicture,jdbcType=BLOB}
- </foreach>
- where RESULT_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from TMSTRUCK_LEAVE_FACTORY_RESULT
- where RESULT_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <sql id="orderByOutTime">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- <if test="orderField == null ">
- order by "resultOutGateTime" desc
- </if>
- </sql>
- <!-- 查询采购所有的出厂实绩 -->
- <select id="getCGLeaveFactoryResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
- select *
- from (
- select
- TLFR.RESULT_ID "resultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RG.GATEPOST_NAME "gatepostName",
- TLFR.RESULT_OUT_MODE "resultOutMode",
- TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
- TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
- from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on OO.ORDER_ID = TTR.ORDER_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
- left join DIL_BATCH DB
- on DB.BATCH_ID = APO.BATCH_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_GATEPOST RG
- on RG.GATEPOST_ID = TLFR.GATEPOST_ID
- where RESULT_OUT_GATE_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="orderNumber != null">
- and
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="gatepostName != null">
- and
- <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
- "gatepostName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutMode != null">
- and
- <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
- "resultOutMode" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutGateTime != null">
- and
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
- "resultOutGateTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and
- <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
- "resultTruckSnapshotPicture" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderByOutTime"></include>
- </select>
- <!-- 通过运输订单号查询 路段顺序号是否为 4 :已计皮-->
- <select id="selectTransportRoute" parameterType="string" resultType="int">
- select ORDER_LINE_SEQUENCE
- from OMSTRUCK_ORDER
- where ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 通过运输订单号查询 出厂门岗ID 和 实绩ID -->
- <select id="selectCnAndGnByOrderNumber" parameterType="string" resultType="java.util.Map">
- select RL.LINE_END_NODE_ID "lineEndNodeId",
- TTR.RESULT_TOTAL_ID "resultTotalId"
- from OMSTRUCK_ORDER OO
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TTR.ORDER_ID = OO.ORDER_ID
- left join RMS_LINE RL
- on RL.LINE_ID = OO.LINE_ID
- where OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 通过运输订单号获取实绩ID -->
- <select id="selectResultId" parameterType="string" resultType="java.util.Map">
- select TLFR.RESULT_ID "resultId",
- OO.ORDER_ID "orderId",
- OO.ORDER_TYPE "orderTypee",
- TTR.RESULT_TOTAL_ID "resultTotalId",
- OO.CAPACITY_ID "capacityId"
- from OMSTRUCK_ORDER OO
- left join TMSTRUCK_TOTAL_RESULT TTR
- on OO.ORDER_ID = TTR.ORDER_ID
- left join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- where OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!--销售物流查询所有的出厂实绩-->
- <select id="selectAllLeaveFacatoryForSale" resultType="java.util.Map">
- SELECT
- *
- FROM
- (
- SELECT
- -- 出厂时间
- TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
- --出厂抓拍图片
- TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture",
- -- 出厂方式
- TLFR.RESULT_OUT_MODE "resultOutMode",
- -- 门岗名称
- RG.GATEPOST_NAME "gatepostName",
- -- 运输订单号
- OO.ORDER_NUMBER "orderNumber",
- -- 车牌号
- RC.CAPACITY_NUMBER "capacityNumber",
- -- 运输订单id
- OO.ORDER_ID "orderId",
- -- 根据订单类型查询销售订单号/发运计划号
- ( CASE
- -- 运输订单类型等于1的查询销售订单表
- WHEN OO.ORDER_TYPE = 1
- THEN (
- SELECT
- -- 销售订单号
- ASO.SALE_NUMBER
- FROM
- -- 销售订单
- AMS_SALE_ORDER ASO
- WHERE OO.ORDER_PLAN_ID = ASO.SALE_ORDER_ID
- )
- -- 运输订单类型等于2,3的查询发运计划表
- WHEN OO.ORDER_TYPE IN ( 2, 3 )
- THEN(
- SELECT
- -- 发运计划号
- ARD.DAYPLAN_NO
- -- 发运计划
- FROM AMSTRUCK_RAIL_DAYPLAN ARD
- WHERE OO.ORDER_PLAN_ID = ARD.DAYPLAN_ID
- )
- END) "saleNum",
- --根据订单类型查询发货单位
- (CASE
- WHEN OO.ORDER_TYPE = 1
- THEN (
- SELECT
- -- 发货单位
- RS.SHIPPER_NAME
- FROM
- --销售订单
- AMS_SALE_ORDER ASO --托运人
- LEFT JOIN RMS_SHIPPER RS ON ASO.SHIPPER_ID = RS.SHIPPER_ID
- WHERE OO.ORDER_PLAN_ID = ASO.SALE_ORDER_ID
- )
- -- 运输订单类型等于2,3的查询发运计划表
- WHEN OO.ORDER_TYPE IN ( 2, 3 )
- THEN (
- SELECT
- --发货单位
- RS.SHIPPER_NAME
- --发运计划
- FROM
- AMSTRUCK_RAIL_DAYPLAN ARD
- -- 托运人
- LEFT JOIN RMS_SHIPPER RS ON ARD.SHIPMENT_UNIT_ID = RS.SHIPPER_ID
- WHERE OO.ORDER_PLAN_ID = ARD.DAYPLAN_ID
- )
- END) "shipperName",
- --根据订单类型查询收货单位
- ( CASE
- WHEN OO.ORDER_TYPE = 1
- THEN (
- SELECT
- --收货单位
- RS.SUPPLIER_NAME
- FROM
- -- 销售订单
- AMS_SALE_ORDER ASO
- -- 托运人
- LEFT JOIN RMS_SUPPLIER RS ON ASO.SHIPPER_ID = RS.SUPPLIER_ID
- WHERE OO.ORDER_PLAN_ID = ASO.SALE_ORDER_ID
- ) -- 运输订单类型等于2,3的查询发运计划表
- WHEN OO.ORDER_TYPE IN ( 2, 3 )
- THEN (
- SELECT
- --发货单位
- RS.SUPPLIER_NAME --发运计划
- FROM
- AMSTRUCK_RAIL_DAYPLAN ARD
- --托运人
- LEFT JOIN RMS_SUPPLIER RS ON ARD.SHIPMENT_UNIT_ID = RS.SUPPLIER_ID
- WHERE OO.ORDER_PLAN_ID = ARD.DAYPLAN_ID
- )
- END) "supplierName"
- FROM
- -- 出厂实绩
- TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- -- 门岗
- LEFT JOIN RMS_GATEPOST RG ON TLFR.GATEPOST_ID = RG.GATEPOST_ID
- -- 总实绩
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- -- 运输订单
- LEFT JOIN OMSTRUCK_ORDER OO ON TTR.ORDER_ID = OO.ORDER_ID
- -- 运力信息
- LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
- WHERE
- -- 判断出厂实绩的出厂时间不为空
- TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
- -- 并且订单类型等于1(销售订单),2(焦炭发运计划),3(水渣发运计划)
- AND OO.ORDER_TYPE IN ( 1, 2, 3 )
- )
- <where>
- <if test="resultOutGateTime != null">
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
- "resultOutGateTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and
- <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
- "resultTruckSnapshotPicture" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutMode != null">
- and
- <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
- "resultOutMode" like '%${item}%'
- </foreach>
- </if>
- <if test="gatepostName != null">
- and
- <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
- "gatepostName" like '%${item}%'
- </foreach>
- </if>
- <if test="orderNumber != null">
- and
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="saleNum != null">
- and
- <foreach collection="saleNum" item="item" open="(" separator="or" close=")">
- "saleNum" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="supplierName != null">
- and
- <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
- "supplierName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderByOutTime"></include>
- </select>
- <!-- 通过总实绩Id 查询出厂实绩ID -->
- <select id="getResultIdByTotalId" parameterType="int" resultType="java.math.BigDecimal">
- select TLFR.RESULT_ID
- from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- where TLFR.RESULT_TOTAL_ID = #{resultTotalId}
- </select>
- <select id="getTruckFactoryResult" resultType="java.util.Map">
-
- SELECT * from(
-
- SELECT
- -- 出厂时间
- to_char(TLFR.RESULT_OUT_GATE_TIME,'yyyy-mm-dd hh24:mi:ss') "resultOutGateTime",
- --出厂抓拍图片
- TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture",
- --出厂方式
- TLFR.RESULT_OUT_MODE "resultOutMode",
- --门岗名称
- RG.GATEPOST_NAME "gatepostName",
- -- 运输订单号
- OO.ORDER_NUMBER "orderNumber",
- -- 车牌号
- RC.CAPACITY_NUMBER "capacityNumber",
- -- 运输订单id
- OO.ORDER_ID "orderId",
- -- 订单类型
- OO.ORDER_TYPE "orderType",
- -- 销售订单号
- ASO.SALE_NUMBER "saleNum",
- -- 收货地址
- RRA.ADDRESS_DELIVERY_ADDRESS "receiveAddress",
- -- 收货单位
- RS.SUPPLIER_NAME "supplierName" ,
- -- 发货单位
- RS2.SHIPPER_NAME "shipperName"
-
-
-
-
- FROM
- -- 出厂实绩
- TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- -- 总实绩
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- -- 运输订单
- LEFT JOIN OMSTRUCK_ORDER OO ON TTR.ORDER_ID = OO.ORDER_ID
- -- 销售订单信息
- LEFT JOIN AMS_SALE_ORDER ASO ON OO.ORDER_PLAN_ID = ASO.SALE_ORDER_ID
- -- 托运人
- LEFT JOIN RMS_SUPPLIER RS ON ASO.SHIPPER_ID = RS.SUPPLIER_ID
- -- 门岗
- LEFT JOIN RMS_GATEPOST RG ON TLFR.GATEPOST_ID = RG.GATEPOST_ID
- -- 运力信息
- LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
- -- 销售订单中间表
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID =OO.ORDER_PLAN_ID
- -- 收货地址
- LEFT JOIN RMS_RECEIVE_ADDRESS RRA ON ASOM.SALE_SHIPPING_ADDRESS_ID =RRA.ADDRESS_ID
- -- 收货单位
- LEFT JOIN RMS_SHIPPER RS2 ON ASO.SHIPPER_ID = RS2.SHIPPER_ID
-
- WHERE
- -- 判断出厂实绩的出厂时间不为空
- TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
- -- 并且订单类型等于1(销售订单),2(焦炭发运计划),3(水渣发运计划)
- AND OO.ORDER_TYPE =1 AND OO.ORDER_NUMBER=#{orderNumber}
-
- )
- </select>
- <!-- 查询内转钢材到异地库出厂实绩 -->
- <select id="selectSteelNzLeaveFactory" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT
- *
- FROM (
- SELECT
- OO.ORDER_ID "orderId",
- TLFR.RESULT_ID "resultId",
- AROD.DAYPLAN_NO "dayplanNo",
- OO.ORDER_NUMBER "orderNumber",
- RG.GATEPOST_NAME "gatepostName",
- TLFR.RESULT_OUT_MODE "resultOutMode",
- RC.CAPACITY_NUMBER "capacityNumber",
- TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
- TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
- FROM TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
- LEFT JOIN OMSTRUCK_ORDER OO
- ON OO.ORDER_ID = TTR.ORDER_ID
- LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
- ON AROD.DAYPLAN_ID = OO.ORDER_PLAN_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- LEFT JOIN RMS_GATEPOST RG
- ON RG.GATEPOST_ID = TLFR.GATEPOST_ID
- WHERE OO.ORDER_TYPE = 4
- AND TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
- )
- <where>
- <if test="dayplanNo != null">
- <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
- "dayplanNo" like '%${item}%'
- </foreach>
- </if>
- <if test="orderNumber != null">
- and
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="gatepostName != null">
- and
- <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
- "gatepostName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutMode != null">
- and
- <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
- "resultOutMode" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "dayplanNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutGateTime != null">
- and
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
- "resultOutGateTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and
- <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
- "resultTruckSnapshotPicture" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderByOutTime"></include>
- </select>
- <!-- 查询内转国产矿进口矿 -->
- <select id="getImportedDomesticNzEnFactoryResult" resultType="java.util.Map">
- select *
- from (
- select TLFR.RESULT_ID "resultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RG.GATEPOST_NAME "gatepostName",
- TLFR.RESULT_OUT_MODE "resultOutMode",
- TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
- TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
- from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on OO.ORDER_ID = TTR.ORDER_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
- left join DIL_BATCH DB
- on DB.BATCH_ID = APO.BATCH_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_GATEPOST RG
- on RG.GATEPOST_ID = TLFR.GATEPOST_ID
- where RESULT_OUT_GATE_TIME is not null
- and OO.ORDER_TYPE = 9
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="orderNumber != null">
- and
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="gatepostName != null">
- and
- <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
- "gatepostName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutMode != null">
- and
- <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
- "resultOutMode" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutGateTime != null">
- and
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
- "resultOutGateTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and
- <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
- "resultTruckSnapshotPicture" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderByOutTime"></include>
- </select>
- <!-- 查询内转厂内物资出厂实绩 -->
- <select id="getInFactoryOutFactoryResult" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select TLFR.RESULT_ID "resultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RG.GATEPOST_NAME "gatepostName",
- TLFR.RESULT_OUT_MODE "resultOutMode",
- TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
- TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
- from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on OO.ORDER_ID = TTR.ORDER_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_GATEPOST RG
- on RG.GATEPOST_ID = TLFR.GATEPOST_ID
- where RESULT_OUT_GATE_TIME is not null
- and OO.ORDER_TYPE = 11
- )
- <where>
- <if test="orderNumber != null">
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="gatepostName != null">
- and
- <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
- "gatepostName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutMode != null">
- and
- <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
- "resultOutMode" like '%${item}%'
- </foreach>
- </if>
- <if test="resultOutGateTime != null">
- and
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
- "resultOutGateTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTruckSnapshotPicture != null">
- and
- <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
- "resultTruckSnapshotPicture" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderByOutTime"></include>
- </select>
- </mapper>
|