12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273 |
- <?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.QmsQueueResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.QmsQueueResult">
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
- <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
- <result column="RESULT_APPLYFOR_TIME" jdbcType="TIMESTAMP" property="resultApplyforTime" />
- <result column="RESULT_APPLYFOR_LOCATION" jdbcType="VARCHAR" property="resultApplyforLocation" />
- <result column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
- <result column="RESULT_DOWN_TIME" jdbcType="TIMESTAMP" property="resultDownTime" />
- <result column="RESULT_ACCEPT_TIME" jdbcType="TIMESTAMP" property="resultAcceptTime" />
- <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime" />
- <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime" />
- <result column="RESULT_CANCEL_TIME" jdbcType="TIMESTAMP" property="resultCancelTime" />
- <result column="RESULT_CANCEL_REASON" jdbcType="VARCHAR" property="resultCancelReason" />
- <result column="RESULT_INSERT_TIME" jdbcType="TIMESTAMP" property="resultInsertTime" />
- <result column="RESULT_INSERT_REASON" jdbcType="VARCHAR" property="resultInsertReason" />
- <result column="RESULT_TRANSFER_TIME" jdbcType="TIMESTAMP" property="resultTransferTime" />
- <result column="RESULT_TRANSFER_REASON" jdbcType="VARCHAR" property="resultTransferReason" />
- <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="LIST_ID" jdbcType="DECIMAL" property="listId" />
- <result column="AREA_ID" jdbcType="VARCHAR" property="areaId" />
- <result column="IS_SPELLING" jdbcType="DECIMAL" property="isSpelling" />
- <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId" />
- </resultMap>
- <sql id="columns">
- RESULT_ID, RESULT_TOTAL_ID, CAPACITY_ID, RESULT_APPLYFOR_TIME, RESULT_APPLYFOR_LOCATION,
- GRID_ID, RESULT_DOWN_TIME, RESULT_ACCEPT_TIME, RESULT_START_TIME, RESULT_END_TIME,
- RESULT_CANCEL_TIME, RESULT_CANCEL_REASON, RESULT_INSERT_TIME, RESULT_INSERT_REASON,
- RESULT_TRANSFER_TIME, RESULT_TRANSFER_REASON, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, LIST_ID, AREA_ID, IS_SPELLING, GATEPOST_ID
- </sql>
- <sql id="columns_alias">
- t.RESULT_ID, t.RESULT_TOTAL_ID, t.CAPACITY_ID, t.RESULT_APPLYFOR_TIME, t.RESULT_APPLYFOR_LOCATION,
- t.GRID_ID, t.RESULT_DOWN_TIME, t.RESULT_ACCEPT_TIME, t.RESULT_START_TIME, t.RESULT_END_TIME,
- t.RESULT_CANCEL_TIME, t.RESULT_CANCEL_REASON, t.RESULT_INSERT_TIME, t.RESULT_INSERT_REASON,
- t.RESULT_TRANSFER_TIME, t.RESULT_TRANSFER_REASON, t.INSERT_USERNAME, t.INSERT_TIME,
- t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.LIST_ID, t.AREA_ID, t.IS_SPELLING,
- t.GATEPOST_ID
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM QMS_QUEUE_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM QMS_QUEUE_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="capacityId != null">
- and CAPACITY_ID = #{capacityId}
- </if>
- <if test="resultApplyforTime != null">
- and TO_CHAR(RESULT_APPLYFOR_TIME,'yyyy-MM-dd') = #{resultApplyforTime}
- </if>
- <if test="resultApplyforLocation != null and resultApplyforLocation != ''">
- and RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation}
- </if>
- <if test="gridId != null">
- and GRID_ID = #{gridId}
- </if>
- <if test="resultDownTime != null">
- and TO_CHAR(RESULT_DOWN_TIME,'yyyy-MM-dd') = #{resultDownTime}
- </if>
- <if test="resultAcceptTime != null">
- and TO_CHAR(RESULT_ACCEPT_TIME,'yyyy-MM-dd') = #{resultAcceptTime}
- </if>
- <if test="resultStartTime != null">
- and TO_CHAR(RESULT_START_TIME,'yyyy-MM-dd') = #{resultStartTime}
- </if>
- <if test="resultEndTime != null">
- and TO_CHAR(RESULT_END_TIME,'yyyy-MM-dd') = #{resultEndTime}
- </if>
- <if test="resultCancelTime != null">
- and TO_CHAR(RESULT_CANCEL_TIME,'yyyy-MM-dd') = #{resultCancelTime}
- </if>
- <if test="resultCancelReason != null and resultCancelReason != ''">
- and RESULT_CANCEL_REASON = #{resultCancelReason}
- </if>
- <if test="resultInsertTime != null">
- and TO_CHAR(RESULT_INSERT_TIME,'yyyy-MM-dd') = #{resultInsertTime}
- </if>
- <if test="resultInsertReason != null and resultInsertReason != ''">
- and RESULT_INSERT_REASON = #{resultInsertReason}
- </if>
- <if test="resultTransferTime != null">
- and TO_CHAR(RESULT_TRANSFER_TIME,'yyyy-MM-dd') = #{resultTransferTime}
- </if>
- <if test="resultTransferReason != null and resultTransferReason != ''">
- and RESULT_TRANSFER_REASON = #{resultTransferReason}
- </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="listId != null">
- and LIST_ID = #{listId}
- </if>
- <if test="areaId != null and areaId != ''">
- and AREA_ID = #{areaId}
- </if>
- <if test="isSpelling != null">
- and IS_SPELLING = #{isSpelling}
- </if>
- <if test="gatepostId != null">
- and GATEPOST_ID = #{gatepostId}
- </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="capacityId != null">
- and CAPACITY_ID = #{capacityId}
- </if>
- <if test="resultApplyforTime != null">
- and TO_CHAR(RESULT_APPLYFOR_TIME,'yyyy-MM-dd') = #{resultApplyforTime}
- </if>
- <if test="resultApplyforLocation != null and resultApplyforLocation != ''">
- and RESULT_APPLYFOR_LOCATION LIKE '%${resultApplyforLocation}%'
- </if>
- <if test="gridId != null">
- and GRID_ID = #{gridId}
- </if>
- <if test="resultDownTime != null">
- and TO_CHAR(RESULT_DOWN_TIME,'yyyy-MM-dd') = #{resultDownTime}
- </if>
- <if test="resultAcceptTime != null">
- and TO_CHAR(RESULT_ACCEPT_TIME,'yyyy-MM-dd') = #{resultAcceptTime}
- </if>
- <if test="resultStartTime != null">
- and TO_CHAR(RESULT_START_TIME,'yyyy-MM-dd') = #{resultStartTime}
- </if>
- <if test="resultEndTime != null">
- and TO_CHAR(RESULT_END_TIME,'yyyy-MM-dd') = #{resultEndTime}
- </if>
- <if test="resultCancelTime != null">
- and TO_CHAR(RESULT_CANCEL_TIME,'yyyy-MM-dd') = #{resultCancelTime}
- </if>
- <if test="resultCancelReason != null and resultCancelReason != ''">
- and RESULT_CANCEL_REASON LIKE '%${resultCancelReason}%'
- </if>
- <if test="resultInsertTime != null">
- and TO_CHAR(RESULT_INSERT_TIME,'yyyy-MM-dd') = #{resultInsertTime}
- </if>
- <if test="resultInsertReason != null and resultInsertReason != ''">
- and RESULT_INSERT_REASON LIKE '%${resultInsertReason}%'
- </if>
- <if test="resultTransferTime != null">
- and TO_CHAR(RESULT_TRANSFER_TIME,'yyyy-MM-dd') = #{resultTransferTime}
- </if>
- <if test="resultTransferReason != null and resultTransferReason != ''">
- and RESULT_TRANSFER_REASON LIKE '%${resultTransferReason}%'
- </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="listId != null">
- and LIST_ID = #{listId}
- </if>
- <if test="areaId != null and areaId != ''">
- and AREA_ID LIKE '%${areaId}%'
- </if>
- <if test="isSpelling != null">
- and IS_SPELLING = #{isSpelling}
- </if>
- <if test="gatepostId != null">
- and GATEPOST_ID = #{gatepostId}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from QMS_QUEUE_RESULT
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from QMS_QUEUE_RESULT
- where 1!=1
- <if test="resultTotalId != null">
- or RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="capacityId != null">
- or CAPACITY_ID = #{capacityId}
- </if>
- <if test="resultApplyforTime != null">
- or TO_CHAR(RESULT_APPLYFOR_TIME,'yyyy-MM-dd') = '#{resultApplyforTime}'
- </if>
- <if test="resultApplyforLocation != null and resultApplyforLocation != ''">
- or RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation}
- </if>
- <if test="gridId != null">
- or GRID_ID = #{gridId}
- </if>
- <if test="resultDownTime != null">
- or TO_CHAR(RESULT_DOWN_TIME,'yyyy-MM-dd') = '#{resultDownTime}'
- </if>
- <if test="resultAcceptTime != null">
- or TO_CHAR(RESULT_ACCEPT_TIME,'yyyy-MM-dd') = '#{resultAcceptTime}'
- </if>
- <if test="resultStartTime != null">
- or TO_CHAR(RESULT_START_TIME,'yyyy-MM-dd') = '#{resultStartTime}'
- </if>
- <if test="resultEndTime != null">
- or TO_CHAR(RESULT_END_TIME,'yyyy-MM-dd') = '#{resultEndTime}'
- </if>
- <if test="resultCancelTime != null">
- or TO_CHAR(RESULT_CANCEL_TIME,'yyyy-MM-dd') = '#{resultCancelTime}'
- </if>
- <if test="resultCancelReason != null and resultCancelReason != ''">
- or RESULT_CANCEL_REASON = #{resultCancelReason}
- </if>
- <if test="resultInsertTime != null">
- or TO_CHAR(RESULT_INSERT_TIME,'yyyy-MM-dd') = '#{resultInsertTime}'
- </if>
- <if test="resultInsertReason != null and resultInsertReason != ''">
- or RESULT_INSERT_REASON = #{resultInsertReason}
- </if>
- <if test="resultTransferTime != null">
- or TO_CHAR(RESULT_TRANSFER_TIME,'yyyy-MM-dd') = '#{resultTransferTime}'
- </if>
- <if test="resultTransferReason != null and resultTransferReason != ''">
- or RESULT_TRANSFER_REASON = #{resultTransferReason}
- </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="listId != null">
- or LIST_ID = #{listId}
- </if>
- <if test="areaId != null and areaId != ''">
- or AREA_ID = #{areaId}
- </if>
- <if test="isSpelling != null">
- or IS_SPELLING = #{isSpelling}
- </if>
- <if test="gatepostId != null">
- or GATEPOST_ID = #{gatepostId}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.QmsQueueResult">
- insert into QMS_QUEUE_RESULT (RESULT_ID, RESULT_TOTAL_ID, CAPACITY_ID,
- RESULT_APPLYFOR_TIME, RESULT_APPLYFOR_LOCATION,
- GRID_ID, RESULT_DOWN_TIME, RESULT_ACCEPT_TIME,
- RESULT_START_TIME, RESULT_END_TIME, RESULT_CANCEL_TIME,
- RESULT_CANCEL_REASON, RESULT_INSERT_TIME,
- RESULT_INSERT_REASON, RESULT_TRANSFER_TIME,
- RESULT_TRANSFER_REASON, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- LIST_ID, AREA_ID, IS_SPELLING,
- GATEPOST_ID)
- values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL},
- #{resultApplyforTime,jdbcType=TIMESTAMP}, #{resultApplyforLocation,jdbcType=VARCHAR},
- #{gridId,jdbcType=DECIMAL}, #{resultDownTime,jdbcType=TIMESTAMP}, #{resultAcceptTime,jdbcType=TIMESTAMP},
- #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP}, #{resultCancelTime,jdbcType=TIMESTAMP},
- #{resultCancelReason,jdbcType=VARCHAR}, #{resultInsertTime,jdbcType=TIMESTAMP},
- #{resultInsertReason,jdbcType=VARCHAR}, #{resultTransferTime,jdbcType=TIMESTAMP},
- #{resultTransferReason,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{listId,jdbcType=DECIMAL}, #{areaId,jdbcType=VARCHAR}, #{isSpelling,jdbcType=DECIMAL},
- #{gatepostId,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.QmsQueueResult">
- insert into QMS_QUEUE_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- RESULT_ID,
- </if>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID,
- </if>
- <if test="capacityId != null">
- CAPACITY_ID,
- </if>
- <if test="resultApplyforTime != null">
- RESULT_APPLYFOR_TIME,
- </if>
- <if test="resultApplyforLocation != null">
- RESULT_APPLYFOR_LOCATION,
- </if>
- <if test="gridId != null">
- GRID_ID,
- </if>
- <if test="resultDownTime != null">
- RESULT_DOWN_TIME,
- </if>
- <if test="resultAcceptTime != null">
- RESULT_ACCEPT_TIME,
- </if>
- <if test="resultStartTime != null">
- RESULT_START_TIME,
- </if>
- <if test="resultEndTime != null">
- RESULT_END_TIME,
- </if>
- <if test="resultCancelTime != null">
- RESULT_CANCEL_TIME,
- </if>
- <if test="resultCancelReason != null">
- RESULT_CANCEL_REASON,
- </if>
- <if test="resultInsertTime != null">
- RESULT_INSERT_TIME,
- </if>
- <if test="resultInsertReason != null">
- RESULT_INSERT_REASON,
- </if>
- <if test="resultTransferTime != null">
- RESULT_TRANSFER_TIME,
- </if>
- <if test="resultTransferReason != null">
- RESULT_TRANSFER_REASON,
- </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="listId != null">
- LIST_ID,
- </if>
- <if test="areaId != null">
- AREA_ID,
- </if>
- <if test="isSpelling != null">
- IS_SPELLING,
- </if>
- <if test="gatepostId != null">
- GATEPOST_ID,
- </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="capacityId != null">
- #{capacityId,jdbcType=DECIMAL},
- </if>
- <if test="resultApplyforTime != null">
- #{resultApplyforTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultApplyforLocation != null">
- #{resultApplyforLocation,jdbcType=VARCHAR},
- </if>
- <if test="gridId != null">
- #{gridId,jdbcType=DECIMAL},
- </if>
- <if test="resultDownTime != null">
- #{resultDownTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultAcceptTime != null">
- #{resultAcceptTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultStartTime != null">
- #{resultStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultEndTime != null">
- #{resultEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultCancelTime != null">
- #{resultCancelTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultCancelReason != null">
- #{resultCancelReason,jdbcType=VARCHAR},
- </if>
- <if test="resultInsertTime != null">
- #{resultInsertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultInsertReason != null">
- #{resultInsertReason,jdbcType=VARCHAR},
- </if>
- <if test="resultTransferTime != null">
- #{resultTransferTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultTransferReason != null">
- #{resultTransferReason,jdbcType=VARCHAR},
- </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="listId != null">
- #{listId,jdbcType=DECIMAL},
- </if>
- <if test="areaId != null">
- #{areaId,jdbcType=VARCHAR},
- </if>
- <if test="isSpelling != null">
- #{isSpelling,jdbcType=DECIMAL},
- </if>
- <if test="gatepostId != null">
- #{gatepostId,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.QmsQueueResult">
- update QMS_QUEUE_RESULT
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
- RESULT_APPLYFOR_TIME = #{resultApplyforTime,jdbcType=TIMESTAMP},
- RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation,jdbcType=VARCHAR},
- GRID_ID = #{gridId,jdbcType=DECIMAL},
- RESULT_DOWN_TIME = #{resultDownTime,jdbcType=TIMESTAMP},
- RESULT_ACCEPT_TIME = #{resultAcceptTime,jdbcType=TIMESTAMP},
- RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
- RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
- RESULT_CANCEL_TIME = #{resultCancelTime,jdbcType=TIMESTAMP},
- RESULT_CANCEL_REASON = #{resultCancelReason,jdbcType=VARCHAR},
- RESULT_INSERT_TIME = #{resultInsertTime,jdbcType=TIMESTAMP},
- RESULT_INSERT_REASON = #{resultInsertReason,jdbcType=VARCHAR},
- RESULT_TRANSFER_TIME = #{resultTransferTime,jdbcType=TIMESTAMP},
- RESULT_TRANSFER_REASON = #{resultTransferReason,jdbcType=VARCHAR},
- 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},
- LIST_ID = #{listId,jdbcType=DECIMAL},
- AREA_ID = #{areaId,jdbcType=VARCHAR},
- IS_SPELLING = #{isSpelling,jdbcType=DECIMAL},
- GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL}
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueResult">
- update QMS_QUEUE_RESULT
- <set>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="capacityId != null">
- CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
- </if>
- <if test="resultApplyforTime != null">
- RESULT_APPLYFOR_TIME = #{resultApplyforTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultApplyforLocation != null">
- RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation,jdbcType=VARCHAR},
- </if>
- <if test="gridId != null">
- GRID_ID = #{gridId,jdbcType=DECIMAL},
- </if>
- <if test="resultDownTime != null">
- RESULT_DOWN_TIME = #{resultDownTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultAcceptTime != null">
- RESULT_ACCEPT_TIME = #{resultAcceptTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultStartTime != null">
- RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultEndTime != null">
- RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultCancelTime != null">
- RESULT_CANCEL_TIME = #{resultCancelTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultCancelReason != null">
- RESULT_CANCEL_REASON = #{resultCancelReason,jdbcType=VARCHAR},
- </if>
- <if test="resultInsertTime != null">
- RESULT_INSERT_TIME = #{resultInsertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultInsertReason != null">
- RESULT_INSERT_REASON = #{resultInsertReason,jdbcType=VARCHAR},
- </if>
- <if test="resultTransferTime != null">
- RESULT_TRANSFER_TIME = #{resultTransferTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultTransferReason != null">
- RESULT_TRANSFER_REASON = #{resultTransferReason,jdbcType=VARCHAR},
- </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="listId != null">
- LIST_ID = #{listId,jdbcType=DECIMAL},
- </if>
- <if test="areaId != null">
- AREA_ID = #{areaId,jdbcType=VARCHAR},
- </if>
- <if test="isSpelling != null">
- IS_SPELLING = #{isSpelling,jdbcType=DECIMAL},
- </if>
- <if test="gatepostId != null">
- GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
- </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="BaseResultMap">
- <include refid="select" />
- <include refid="where" />
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="whereLike" />
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into QMS_QUEUE_RESULT
- (RESULT_ID,
- RESULT_TOTAL_ID, CAPACITY_ID, RESULT_APPLYFOR_TIME,
- RESULT_APPLYFOR_LOCATION, GRID_ID,
- RESULT_DOWN_TIME, RESULT_ACCEPT_TIME,
- RESULT_START_TIME, RESULT_END_TIME,
- RESULT_CANCEL_TIME, RESULT_CANCEL_REASON,
- RESULT_INSERT_TIME, RESULT_INSERT_REASON,
- RESULT_TRANSFER_TIME, RESULT_TRANSFER_REASON,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, LIST_ID, AREA_ID,
- IS_SPELLING, GATEPOST_ID)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.resultId,jdbcType=DECIMAL},
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.capacityId,jdbcType=DECIMAL}, #{item.resultApplyforTime,jdbcType=TIMESTAMP},
- #{item.resultApplyforLocation,jdbcType=VARCHAR}, #{item.gridId,jdbcType=DECIMAL},
- #{item.resultDownTime,jdbcType=TIMESTAMP}, #{item.resultAcceptTime,jdbcType=TIMESTAMP},
- #{item.resultStartTime,jdbcType=TIMESTAMP}, #{item.resultEndTime,jdbcType=TIMESTAMP},
- #{item.resultCancelTime,jdbcType=TIMESTAMP}, #{item.resultCancelReason,jdbcType=VARCHAR},
- #{item.resultInsertTime,jdbcType=TIMESTAMP}, #{item.resultInsertReason,jdbcType=VARCHAR},
- #{item.resultTransferTime,jdbcType=TIMESTAMP}, #{item.resultTransferReason,jdbcType=VARCHAR},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.listId,jdbcType=DECIMAL}, #{item.areaId,jdbcType=VARCHAR},
- #{item.isSpelling,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update QMS_QUEUE_RESULT
- set
- RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TOTAL_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
- </foreach>
- ,CAPACITY_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_APPLYFOR_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApplyforTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_APPLYFOR_LOCATION=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApplyforLocation,jdbcType=VARCHAR}
- </foreach>
- ,GRID_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_DOWN_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDownTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_ACCEPT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultAcceptTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_START_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultStartTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_END_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEndTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_CANCEL_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCancelTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_CANCEL_REASON=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCancelReason,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultInsertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_INSERT_REASON=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultInsertReason,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_TRANSFER_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTransferTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_TRANSFER_REASON=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTransferReason,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,LIST_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.listId,jdbcType=DECIMAL}
- </foreach>
- ,AREA_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.areaId,jdbcType=VARCHAR}
- </foreach>
- ,IS_SPELLING=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.isSpelling,jdbcType=DECIMAL}
- </foreach>
- ,GATEPOST_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.gatepostId,jdbcType=DECIMAL}
- </foreach>
- where RESULT_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from QMS_QUEUE_RESULT
- where RESULT_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 排序 -->
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- </sql>
- <!-- 车辆进入电子围栏后触发排队申请 -->
- <select id="queryCIdAndTIdByOrderNumber" parameterType="string" resultType="java.util.Map">
- select OO.ORDER_ID "orderId",
- OO.CAPACITY_ID "capacityId",
- TTR.RESULT_TOTAL_ID "resultTotalId",
- OO.ORDER_TYPE "orderType"
- from OMSTRUCK_ORDER OO
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TTR.ORDER_ID = OO.ORDER_ID
- where OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 人工添加排队申请查询所有执行中订单 订单状态 :1 -->
- <!-- <select id="getAllExecutionOrder" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select OO.ORDER_ID "orderId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",-->
- <!-- RM.MATERIAL_NAME "materialName",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- RCD.DRIVER_NAME "driverName",-->
- <!-- OO.INSERT_TIME "insertTime"-->
- <!-- from OMSTRUCK_ORDER OO-->
- <!-- join OMSTRUCK_ORDER_MATERIAL OOM-->
- <!-- on OOM.ORDER_ID = OO.ORDER_ID-->
- <!-- join RMS_MATERIAL RM-->
- <!-- on RM.MATERIAL_ID = OOM.ORDER_MATERIAL_ID-->
- <!-- join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = OO.CAPACITY_ID-->
- <!-- join RMS_DRIVER_CAPACITY RDC-->
- <!-- on RDC.CAPACITY_ID = RC.CAPACITY_ID-->
- <!-- join RMS_CAR_DRIVER RCD-->
- <!-- on RDC.DRIVER_ID = RCD.DRIVER_ID-->
- <!-- join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.ORDER_ID = OO.ORDER_ID-->
- <!-- where OO.ORDER_STATUS = #{orderStatus}-->
- <!-- and OO.ORDER_TYPE = #{orderTypee}-->
- <!-- and TTR.RESULT_TOTAL_ID not in (select QQR.RESULT_TOTAL_ID from QMS_QUEUE_RESULT QQR)-->
- <!-- )-->
- <!-- <where>-->
- <!-- <if test="orderNumber != null">-->
- <!-- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">-->
- <!-- "orderNumber" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="orderMaterialWeight != null">-->
- <!-- and-->
- <!-- <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">-->
- <!-- "orderMaterialWeight" 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="capacityNumber != null">-->
- <!-- and-->
- <!-- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">-->
- <!-- "capacityNumber" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="driverName != null">-->
- <!-- and-->
- <!-- <foreach collection="driverName" item="item" open="(" separator="or" close=")">-->
- <!-- "driverName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "insertTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 根据运单Id查询物资Id-->
- <select id="queryOrderMesByOrderId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
- select OOM.MATERIAL_ID "materialId"
- from OMSTRUCK_ORDER OO
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OO.ORDER_ID = OOM.ORDER_ID
- where OO.ORDER_ID = #{orderId}
- </select>
- <!-- 通过门岗名称查询门岗ID -->
- <!-- <select id="getGatepostIdByGatepostName" parameterType="string" resultType="java.math.BigDecimal">-->
- <!-- select RG.GATEPOST_ID "gatepostId"-->
- <!-- from RMS_GATEPOST RG-->
- <!-- where RG.GATEPOST_NAME = #{gatepostName}-->
- <!-- </select>-->
- <!-- 通过门岗名称查询门岗ID -->
- <!-- <select id="getPlatformIdByPlatformName" parameterType="string" resultType="java.math.BigDecimal">-->
- <!-- select RPP.PLATFORM_ID-->
- <!-- from RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- where RPP.PLATFORM_NAME = #{platformName}-->
- <!-- </select>-->
- <!-- 查询排队开始 -->
- <select id="getQueueListByQueueUp" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT P0.*,ROWNUM "ROW_ID" FROM (
- SELECT
- QQR.RESULT_ID "resultId",
- QQR.RESULT_TOTAL_ID "resultTotalId",
- QQR.RESULT_START_TIME "resultStartTime",
- RCE.CONSIGNEE_COMPANY_NAME "consigneeName",
- RM.MATERIAL_NAME || RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "grid",
- RM.MATERIAL_ID "materialId",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION||'('||RM.MATERIAL_MODEL||')' "materialSpecification",
- RM.MATERIAL_MODEL "materialModel",
- QQL.LIST_ID "listId",
- RC.CAPACITY_NUMBER "capacityNumber",
- RC.CAPACITY_ID "capacityId",
- QQL.ENTRY_SURE_TIME "sureTime",
- OOM.ORDER_MATERIAL_NUMBER "materialNumber",
- OOM.MATERIAL_PRIORITY "id",
- OO.DRIVER_TEL "driverTel",
- OO.ORDER_ID "orderId",
- RG.GATEPOST_NAME "gatepostName",
- ASM.STEEL_METER "steelMeter",
- (
- select COUNT(QQL2.LIST_ID)
- from QMS_QUEUE_LIST QQL2
- where QQL2.GRID_ID = QQL.GRID_ID
- and QQL2.LIST_NODE_ORDER <= QQL.LIST_NODE_ORDER
- ) || (case when QQL.IS_VIP is not null then ' 优先进厂' else '' end ) "listNodeOrder"
- FROM QMS_QUEUE_LIST QQL
- LEFT JOIN QMS_QUEUE_RESULT QQR ON QQL.QUEUE_RESULT_ID = QQR.RESULT_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON TTR.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN RMS_MATERIAL RM ON OOM.MATERIAL_ID = RM.MATERIAL_ID
- LEFT JOIN RMS_CAPACITY RC ON QQL.CAPACITY_ID = RC.CAPACITY_ID
- LEFT JOIN OMSTRUCK_ORDER OO ON TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN RMS_GATEPOST RG ON QQR.GATEPOST_ID = RG.GATEPOST_ID
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
- LEFT JOIN RMS_CONSIGNEE RCE ON RCE.CONSIGNEE_ID = ASO.RECEIVE_ID
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
- ON ASTM.SALE_ORDER_MATERIAL_ID=OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_MATERIAL ASM
- ON ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- where oo.ORDER_STATUS = 5
- AND ASO.SALE_ORDER_STATUS = 4
- AND RM.MATERIAL_ID||'' NOT IN (SELECT DISTINCT SPECTIONS_MODEL FROM QMS_MODEL_UNROOLED)
- <if test="capacityNumber != null">
- and instr(RC.CAPACITY_NUMBER, #{capacityNumber}) > 0
- </if>
- <if test="materialList != null">
- and RM.MATERIAL_ID in
- <foreach collection="materialList" item="item" open="(" separator="," close=")">
- ${item}
- </foreach>
- </if>
- <if test="locationId != null">
- and QQL.GRID_ID = #{locationId}
- ORDER BY QQL.ENTRY_SURE_TIME DESC, QQL.IS_VIP, "listNodeOrder"
- </if>
- <if test="locationId == null">
- ORDER BY QQL.ENTRY_SURE_TIME DESC, QQR.RESULT_START_TIME
- </if>
- ) P0
- </select>
- <!--查询已派车车数-->
- <select id="querySentCarNumber" resultType="java.lang.Integer">
- select
- count(*) ORDER_ID
- from OMSTRUCK_ORDER OO
- where OO.ORDER_TYPE=1
- and to_char(OO.INSERT_TIME,'yyyy-mm-dd hh24:mi:ss')
- between to_char(trunc(sysdate,'dd'),'yyyy-mm-dd hh24:mi:ss')
- and to_char(trunc(sysdate,'dd')+23/24+59/24/60+59/24/60/60,'yyyy-mm-dd hh24:mi:ss')
- </select>
- <!--查询已扫码进厂车数-->
- <select id="queryIntoFactoryNumber" resultType="java.lang.Integer">
- select COUNT(*) RESULT_ID
- from OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.ORDER_ID=OO.ORDER_ID
- LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
- ON TER.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
- LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- ON TLFR.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
- where OO.ORDER_TYPE =1
- and TER.INSERT_TIME IS NOT NULL
- and to_char(OO.INSERT_TIME,'yyyy-mm-dd hh24:mi:ss')
- between to_char(trunc(sysdate,'dd'),'yyyy-mm-dd hh24:mi:ss')
- and to_char(trunc(sysdate,'dd')+23/24+59/24/60+59/24/60/60,'yyyy-mm-dd hh24:mi:ss')
- </select>
- <!--查询已扫码出厂车数-->
- <select id="queryLeaveFactoryNumber" resultType="java.lang.Integer">
- select COUNT(*) RESULT_ID
- from OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.ORDER_ID=OO.ORDER_ID
- LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
- ON TER.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
- LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- ON TLFR.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
- where OO.ORDER_TYPE =1
- and TER.INSERT_TIME IS NOT NULL
- and TLFR.INSERT_TIME IS NOT NULL
- and to_char(OO.INSERT_TIME,'yyyy-mm-dd hh24:mi:ss')
- between to_char(trunc(sysdate,'dd'),'yyyy-mm-dd hh24:mi:ss')
- and to_char(trunc(sysdate,'dd')+23/24+59/24/60+59/24/60/60,'yyyy-mm-dd hh24:mi:ss')
- </select>
- <!--查询待进厂车数-->
- <update id="updateCancelResult" parameterType="com.steerinfo.dil.model.QmsQueueResult">
- update QMS_QUEUE_RESULT
- set RESULT_CANCEL_TIME = SYSDATE,
- RESULT_START_TIME = null,
- RESULT_CANCEL_REASON = #{resultCancelReason}
- where RESULT_ID = #{resultId}
- </update>
- <select id="getQueueListByQueueUpSpelling" parameterType="map" resultType="java.util.LinkedHashMap">
- select QQR.RESULT_ID "resultId",
- QQR.RESULT_TOTAL_ID "resultTotalId",
- QQR.RESULT_START_TIME "resultStartTime",
- RC.CAPACITY_NUMBER "capacityNumber",
- QQSL.SPELILING_NUM "grid",
- QQSL.SPELLING_RESULT_ID "spellingResultId",
- RM.MATERIAL_ID "materialId",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION||'('||RM.MATERIAL_MODEL||')' "materialSpecification",
- RC.CAPACITY_ID "capacityId",
- RM.MATERIAL_MODEL "materialModel",
- QQSL.ENTRY_SURE_TIME "sureTime",
- OOM.ORDER_MATERIAL_NUMBER "materialNumber",
- OOM.MATERIAL_PRIORITY "id",
- OO.DRIVER_TEL "driverTel",
- OO.ORDER_ID "orderId",
- RG.GATEPOST_NAME "gatepostName",
- RCE.CONSIGNEE_COMPANY_NAME "consigneeName",
- (
- select count(QQSL2.SPELLING_RESULT_ID) from QMS_QUEUE_SPELLING_LIST QQSL2
- where QQSL.SPELILING_NUM = QQSL2.SPELILING_NUM
- and QQSL.SPELLING_SURE_TIME <= QQSL2.SPELLING_SURE_TIME
- ) "listNodeOrder"
- from QMS_QUEUE_SPELLING_LIST QQSL
- left join QMS_QUEUE_RESULT QQR ON QQSL.QUEUE_RESULT_ID = QQR.RESULT_ID
- left join RMS_CAPACITY RC ON QQR.CAPACITY_ID = RC.CAPACITY_ID
- left join TMSTRUCK_TOTAL_RESULT TTR on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM on TTR.ORDER_ID = OOM.ORDER_ID
- left join RMS_MATERIAL RM on OOM.MATERIAL_ID = RM.MATERIAL_ID
- left join OMSTRUCK_ORDER OO on TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN RMS_GATEPOST RG ON QQR.GATEPOST_ID = RG.GATEPOST_ID
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
- LEFT JOIN RMS_CONSIGNEE RCE ON RCE.CONSIGNEE_ID = ASO.RECEIVE_ID
- where oo.ORDER_STATUS = 5
- AND ASO.SALE_ORDER_STATUS = 4
- AND OO.ORDER_ID NOT IN (
- select OO.ORDER_ID
- from OMSTRUCK_ORDER OO
- left join OMSTRUCK_ORDER_MATERIAL OOM ON OO.ORDER_ID=OOM.ORDER_ID
- left join RMS_MATERIAL RM ON OOM.MATERIAL_ID = RM.MATERIAL_ID
- where OO.ORDER_STATUS=5 and
- RM.MATERIAL_ID||'' in (select SPECTIONS_MODEL from QMS_MODEL_UNROOLED)
- )
- <if test="capacityNumber != null">
- and instr(RC.CAPACITY_NUMBER, #{capacityNumber}) > 0
- </if>
- <if test="materialList != null">
- and
- EXISTS (
- SELECT OO2.ORDER_ID
- from OMSTRUCK_ORDER OO2 left join OMSTRUCK_ORDER_MATERIAL OOM2 on OO2.ORDER_ID = OOM2.ORDER_ID
- where OO2.ORDER_ID = OO.ORDER_ID and OOM2.MATERIAL_ID in
- <foreach collection="materialList" item="item" open="(" separator="," close=")">
- ${item}
- </foreach>
- )
- </if>
- <if test="locationId != null">
- and QQSL.SPELILING_NUM = #{locationId}
- ORDER BY QQSL.ENTRY_SURE_TIME DESC, QQSL.IS_VIP, "listNodeOrder"
- </if>
- <if test="locationId == null">
- ORDER BY QQSL.ENTRY_SURE_TIME DESC, QQR.RESULT_START_TIME
- </if>
- </select>
- <select id="getMaterialId" resultType="java.util.Map">
- select
- distinct
- AMS.MATERIAL_ID "materialId",
- AMS.STEEL_METER "steelmeter"
- from OMSTRUCK_ORDER_MATERIAL OOM
- LEFT JOIN OMSTRUCK_ORDER OO
- ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
- ON ASTM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_MATERIAL AMS
- ON AMS.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- WHERE OOM.ORDER_ID=#{orderId}
- </select>
- <!-- 查看进厂排队详情 -->
- <!-- <select id="getQueueMes" resultType="java.util.Map" parameterType="java.util.Map">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- RG.GATEPOST_NAME "gatepostName",-->
- <!-- (-->
- <!-- <![CDATA[-->
- <!-- select-->
- <!-- count(*)-->
- <!-- from-->
- <!-- QMS_QUEUE_LIST QQL2-->
- <!-- join QMS_QUEUE_GRID QQG2-->
- <!-- on QQG2.GRID_ID = QQL2.GRID_ID-->
- <!-- where-->
- <!-- QQL2.LIST_NODE_ORDER <= QQL.list_node_order-->
- <!-- and QQL2.GRID_ID = QQL.GRID_ID-->
- <!-- and QQL2.DELETED = 0-->
- <!-- ]]>-->
- <!-- ) "listNodeOrder",-->
- <!-- QQR.RESULT_ID "resultId",-->
- <!-- QQL.LIST_ID "listId",-->
- <!-- RC.CAPACITY_VIP "capacityVip",-->
- <!-- QQR.RESULT_START_TIME "resultStartTime"-->
- <!-- from OMSTRUCK_ORDER OO-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = OO.CAPACITY_ID-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.ORDER_ID = OO.ORDER_ID-->
- <!-- left join QMS_QUEUE_RESULT QQR-->
- <!-- on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID-->
- <!-- left join QMS_QUEUE_LIST QQL-->
- <!-- on QQR.LIST_ID = QQL.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_GATEPOST RG-->
- <!-- on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- where-->
- <!-- QQR.RESULT_START_TIME is not null-->
- <!-- and QQL.DELETED = 0-->
- <!-- <if test="orderNum != null">-->
- <!-- and OO.ORDER_NUMBER = #{orderNum}-->
- <!-- </if>-->
- <!-- <if test="gatepostId != null">-->
- <!-- and RG.GATEPOST_ID = #{gatepostId}-->
- <!-- </if>-->
- <!-- )-->
- <!-- <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="platformName != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="listNodeOrder != null">-->
- <!-- and-->
- <!-- <foreach collection="listNodeOrder" item="item" open="(" separator="or" close=")">-->
- <!-- "listNodeOrder" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="capacityVip != null">-->
- <!-- and-->
- <!-- <foreach collection="capacityVip" item="item" open="(" separator="or" close=")">-->
- <!-- "capacityVip" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "gatepostName" desc, "listNodeOrder" asc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询排队申请 一对多由前端处理 -->
- <select id="getQueueApply" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
- select
- QQR.RESULT_ID "resultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- QQR.RESULT_APPLYFOR_TIME "resultApplyforTime",
- QQR.RESULT_DOWN_TIME "resultDownTime",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION "materialSpecification",
- RM.MATERIAL_MODEL "materialModel",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber"
- from QMS_QUEUE_RESULT QQR
- left join TMSTRUCK_TOTAL_RESULT TTR on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO on OO.ORDER_ID = TTR.ORDER_ID
- left join RMS_CAPACITY RC on RC.CAPACITY_ID = QQR.CAPACITY_ID
- left join QMS_QUEUE_GRID QQG on QQG.GRID_ID = QQR.GRID_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM on OO.ORDER_ID = OOM.ORDER_ID
- left join RMS_MATERIAL RM on OOM.MATERIAL_ID = RM.MATERIAL_ID
- <where>
- <if test="index != null">
- instr(RC.CAPACITY_NUMBER, #{index}) > 0
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_DOWN_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_DOWN_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= QQR.RESULT_DOWN_TIME
- </if>
- </where>
- </select>
- <!-- 通过接收时间判断是否已接收 查询判断条件:是否结束进厂 -->
- <!-- <select id="getOrderReceive" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">-->
- <!-- select-->
- <!-- *-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID-->
- <!-- </select>-->
- <!-- 通过实绩Id查询链表ID -->
- <select id="getListIdByResultId" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- select LIST_ID "listId",
- CAPACITY_ID "capacityId"
- from QMS_QUEUE_RESULT QQR
- where QQR.RESULT_ID = #{resultId}
- </select>
- <!-- 查看排队转移详情 -->
- <!-- <select id="getChangeQueueMes" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">-->
- <!-- select-->
- <!-- *-->
- <!-- from(-->
- <!-- select-->
- <!-- QQR.RESULT_ID "resultId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- RG1.GATEPOST_NAME "gatepostName1",-->
- <!-- RG2.GATEPOST_NAME "gatepostName2",-->
- <!-- QQR.RESULT_TRANSFER_TIME "resultTransferTime",-->
- <!-- QQR.RESULT_TRANSFER_REASON "resultTransferReason",-->
- <!-- (-->
- <!-- <![CDATA[-->
- <!-- select-->
- <!-- count(*)-->
- <!-- from-->
- <!-- QMS_QUEUE_LIST QL-->
- <!-- join QMS_QUEUE_GRID QG-->
- <!-- on QG.GRID_ID = QL.GRID_ID-->
- <!-- where-->
- <!-- QL.LIST_NODE_ORDER <= QQL.list_node_order-->
- <!-- and QL.GRID_ID = QQL.GRID_ID-->
- <!-- and QL.DELETED = 0-->
- <!-- ]]>-->
- <!-- ) "listNodeOrder"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID-->
- <!-- left join OMSTRUCK_ORDER OO-->
- <!-- on OO.ORDER_ID = TTR.ORDER_ID-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = QQR.CAPACITY_ID-->
- <!-- left join QMS_QUEUE_LIST QQL-->
- <!-- on QQL.LIST_ID = QQR.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG1 --转移后门岗ID-->
- <!-- on QQG1.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_GATEPOST RG1 --转移后门岗-->
- <!-- on QQG1.QUEUE_LOCATION_ID = RG1.GATEPOST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG2 -- 转移前门岗ID-->
- <!-- on QQG2.GRID_ID = QQR.GRID_ID-->
- <!-- left join RMS_GATEPOST RG2 --转移前门岗-->
- <!-- on RG2.GATEPOST_ID = QQG2.QUEUE_LOCATION_ID-->
- <!-- where QQR.RESULT_TRANSFER_TIME is not null-->
- <!---- and QQL.DELETED = 0-->
- <!-- and QQG1.GRID_TYPE = 3-->
- <!-- )-->
- <!-- <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="gatepostName1 != null">-->
- <!-- and-->
- <!-- <foreach collection="gatepostName1" item="item" open="(" separator="or" close=")">-->
- <!-- "gatepostName1" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="gatepostName2 != null">-->
- <!-- and-->
- <!-- <foreach collection="gatepostName2" item="item" open="(" separator="or" close=")">-->
- <!-- "gatepostName2" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultTransferTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultTransferTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultTransferTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultTransferReason != null">-->
- <!-- and-->
- <!-- <foreach collection="resultTransferReason" item="item" open="(" separator="or" close=")">-->
- <!-- "resultTransferReason" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultTransferTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询排队取消 -->
- <select id="getQueueCancel" parameterType="java.util.Map" resultType="java.util.Map">
- select
- QQR.RESULT_ID "resultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- QQR.RESULT_CANCEL_TIME "resultCancelTime",
- QQR.RESULT_CANCEL_REASON "resultCancelReason",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION "materialSpecification",
- RM.MATERIAL_MODEL "materialModel",
- RG.GATEPOST_NAME "gatepostName"
- from QMS_QUEUE_RESULT QQR
- left join TMSTRUCK_TOTAL_RESULT TTR on QQR.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 QQR.CAPACITY_ID = RC.CAPACITY_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM on OO.ORDER_ID = OOM.ORDER_ID
- left join RMS_MATERIAL RM on OOM.MATERIAL_ID = RM.MATERIAL_ID
- left join RMS_GATEPOST RG on QQR.GATEPOST_ID = RG.GATEPOST_ID
- where
- QQR.RESULT_CANCEL_TIME > to_date('2022-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
- <if test="index != null">
- and instr(RC.CAPACITY_NUMBER, #{index}) > 0
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_CANCEL_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_CANCEL_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= QQR.RESULT_CANCEL_TIME
- </if>
- </select>
- <!-- 通过实绩Id 查询数据 取消排队使用-->
- <select id="getQueueCancelByResultId" parameterType="int" resultType="java.util.Map">
- select OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- QQR.RESULT_CANCEL_TIME "resultCancelTime",
- QQR.RESULT_CANCEL_REASON "resultCancelReason"
- from QMS_QUEUE_RESULT QQR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on OO.ORDER_ID = TTR.ORDER_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = QQR.CAPACITY_ID
- left join QMS_QUEUE_LIST QQL
- on QQL.LIST_ID = QQR.LIST_ID
- left join QMS_QUEUE_GRID QQG
- on QQG.GRID_ID = QQL.GRID_ID
- left join RMS_GATEPOST RG
- on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
- where RESULT_ID = #{resultId}
- </select>
- <!-- 查询插队实绩-->
- <!-- <select id="getQueueInsert" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select QQR.RESULT_ID "resultId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RG.GATEPOST_NAME "gatepostName",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- QQR.RESULT_INSERT_TIME "resultInsertTime",-->
- <!-- QQR.RESULT_INSERT_REASON "resultInsertReason",-->
- <!-- (-->
- <!-- select count(*) from QMS_QUEUE_LIST QQL2-->
- <!-- where QQL2.GRID_ID = QQL.GRID_ID and QQL.DELETED = 0-->
- <!-- ) "queueNumber"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID-->
- <!-- left join OMSTRUCK_ORDER OO-->
- <!-- on OO.ORDER_ID = TTR.ORDER_ID-->
- <!-- left join QMS_QUEUE_LIST QQL-->
- <!-- on QQR.LIST_ID = QQL.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_GATEPOST RG-->
- <!-- on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = QQR.CAPACITY_ID-->
- <!-- where QQR.RESULT_INSERT_TIME is not null-->
- <!---- and QQR.RESULT_END_TIME is null-->
- <!-- )-->
- <!-- <where>-->
- <!-- <if test="orderNumber != null">-->
- <!-- <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="capacityNumber != null">-->
- <!-- and-->
- <!-- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">-->
- <!-- "capacityNumber" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultInsertTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultInsertTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultInsertTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultInsertReason != null">-->
- <!-- and-->
- <!-- <foreach collection="resultInsertReason" item="item" open="(" separator="or" close=")">-->
- <!-- "resultInsertReason" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultInsertTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询所有排队结束 -->
- <select id="getQueueEndResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
- select
- QQR.RESULT_ID "resultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- QQR.RESULT_END_TIME "resultEndTime",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION "materialSpecification",
- RM.MATERIAL_MODEL "materialModel"
- from QMS_QUEUE_RESULT QQR
- left join TMSTRUCK_TOTAL_RESULT TTR on QQR.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 QQR.CAPACITY_ID = RC.CAPACITY_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM on OO.ORDER_ID = OOM.ORDER_ID
- left join RMS_MATERIAL RM on OOM.MATERIAL_ID = RM.MATERIAL_ID
- where
- QQR.RESULT_END_TIME > to_date('2022-01-01 00:00:00', 'yyyy', 'yyyy-mm-dd hh24:mi:ss')
- <if test="index != null">
- and instr(RC.CAPACITY_NUMBER, #{index}) > 0
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_START_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_START_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= QQR.RESULT_START_TIME
- </if>
- </select>
- <!-- 排序 -->
- <sql id="orderByEndTime">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- <if test="orderField == null ">
- order by "resultEndTime" desc
- </if>
- </sql>
- <!-- 汽车监控 -->
- <select id="capacityMonitor" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
- select
- QQR.RESULT_ID "resultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- QQR.RESULT_APPLYFOR_TIME "resultApplyforTime",
- QQR.RESULT_START_TIME "resultStartTime",
- QQR.RESULT_CANCEL_TIME "resultCancelTime",
- QQR.RESULT_CANCEL_REASON "resultCancelReason",
- QQR.RESULT_END_TIME "resultEndTime",
- RM.MATERIAL_NAME "materialName",
- RM.MATERIAL_SPECIFICATION "materialSpecification",
- RM.MATERIAL_MODEL "materialModel"
- from QMS_QUEUE_RESULT QQR
- left join TMSTRUCK_TOTAL_RESULT TTR on QQR.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 QQR.CAPACITY_ID = RC.CAPACITY_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM on OO.ORDER_ID = OOM.ORDER_ID
- left join RMS_MATERIAL RM on OOM.MATERIAL_ID = RM.MATERIAL_ID
- where
- QQR.RESULT_START_TIME > to_date('2022-01-01 00:00:00', 'yyyy', 'yyyy-mm-dd hh24:mi:ss')
- <if test="index != null">
- and instr(RC.CAPACITY_NUMBER, #{index}) > 0
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_START_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= QQR.RESULT_START_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= QQR.RESULT_START_TIME
- </if>
- </select>
- <!-- 通过门岗查询排队车数 -->
- <!-- <select id="getQueueListByGatepost" parameterType="java.math.BigDecimal" resultType="java.util.Map">-->
- <!-- SELECT oo.ORDER_NUMBER as "orderNumber",-->
- <!-- rc.CAPACITY_NUMBER as "capacityNumber",-->
- <!-- rg.GATEPOST_NAME as "gatepostName",-->
- <!-- (-->
- <!-- <![CDATA[-->
- <!-- select count(*)-->
- <!-- from QMS_QUEUE_LIST QQL2-->
- <!-- join QMS_QUEUE_GRID QQG2-->
- <!-- on QQG2.GRID_ID = QQL2.GRID_ID-->
- <!-- where QQL2.LIST_NODE_ORDER <= QQL.list_node_order-->
- <!-- and QQL2.GRID_ID = QQL.GRID_ID-->
- <!-- and QQL2.DELETED = 0-->
- <!-- ]]>-->
- <!--) "listNodeOrder"-->
- <!-- FROM QMS_QUEUE_RESULT qqr-->
- <!-- LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr-->
- <!-- ON qqr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID-->
- <!-- LEFT JOIN OMSTRUCK_ORDER oo-->
- <!-- ON oo.ORDER_ID = ttr.ORDER_ID-->
- <!-- LEFT JOIN RMS_CAPACITY rc-->
- <!-- ON rc.CAPACITY_ID = qqr.CAPACITY_ID-->
- <!-- LEFT JOIN QMS_QUEUE_LIST qql-->
- <!-- ON qql.LIST_ID = qqr.LIST_ID-->
- <!-- LEFT JOIN QMS_QUEUE_GRID qqg-->
- <!-- ON qqg.GRID_ID = qql.GRID_ID-->
- <!-- LEFT JOIN RMS_GATEPOST rg-->
- <!-- ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID-->
- <!-- WHERE rg.GATEPOST_ID = #{gatepostId}-->
- <!-- AND qql.DELETED = 0-->
- <!-- </select>-->
- <!-- 查询排队取消列表 -->
- <!-- <select id="getQueueCancelList" resultType="java.util.Map">-->
- <!-- SELECT oo.ORDER_NUMBER as "orderNumber",-->
- <!-- rc.CAPACITY_NUMBER as "capacityNumber",-->
- <!-- qqr.RESULT_CANCEL_TIME as "resultCancelTime",-->
- <!-- qqr.RESULT_CANCEL_REASON as "resultCancelReason",-->
- <!-- rg.GATEPOST_NAME as "gatepostName"-->
- <!-- FROM QMS_QUEUE_RESULT qqr-->
- <!-- LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr-->
- <!-- ON qqr.RESULT_TOTAL_ID = ttr.RESULT_TOTAL_ID-->
- <!-- LEFT JOIN OMSTRUCK_ORDER oo-->
- <!-- ON oo.ORDER_ID = ttr.ORDER_ID-->
- <!-- LEFT JOIN RMS_CAPACITY rc-->
- <!-- ON rc.CAPACITY_ID = qqr.CAPACITY_ID-->
- <!-- LEFT JOIN QMS_QUEUE_LIST qql-->
- <!-- ON qql.LIST_ID = qqr.LIST_ID-->
- <!-- LEFT JOIN QMS_QUEUE_GRID qqg-->
- <!-- ON qqg.GRID_ID = qql.GRID_ID-->
- <!-- LEFT JOIN RMS_GATEPOST rg-->
- <!-- ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID-->
- <!-- WHERE qqr.RESULT_CANCEL_REASON IS NOT NULL-->
- <!-- </select>-->
- <!-- 查看各个门岗,仓库的实时状态 -->
- <!-- <select id="getQueueStatusList" resultType="java.util.Map">-->
- <!-- select RG.GATEPOST_NAME "gatepostName",-->
- <!-- count(QQL.LIST_NODE_ORDER) "count"-->
- <!-- from RMS_GATEPOST RG-->
- <!-- LEFT JOIN QMS_QUEUE_LIST QQL-->
- <!-- on QQL.GRID_ID = RG.GATEPOST_ID and QQL.DELETED = 0-->
- <!-- group by RG.GATEPOST_NAME-->
- <!-- </select>-->
- <!-- 查询指令接收 -->
- <!-- <select id="getOrderReceiveList" resultType="java.util.Map">-->
- <!-- SELECT oo.ORDER_NUMBER as "orderNumber",-->
- <!-- rc.CAPACITY_NUMBER as "capacityNumber",-->
- <!-- qqr.RESULT_ACCEPT_TIME as "resultAcceptTime",-->
- <!-- rg.GATEPOST_NAME as "gatepostName"-->
- <!-- FROM QMS_QUEUE_RESULT qqr-->
- <!-- LEFT JOIN QMS_QUEUE_LIST qql-->
- <!-- ON qql.LIST_ID = qqr.LIST_ID-->
- <!-- LEFT JOIN RMS_CAPACITY rc-->
- <!-- ON rc.CAPACITY_ID = qql.CAPACITY_ID-->
- <!-- LEFT JOIN QMS_QUEUE_GRID qqg-->
- <!-- ON qqg.GRID_ID = qql.GRID_ID-->
- <!-- LEFT JOIN RMS_GATEPOST rg-->
- <!-- ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID-->
- <!-- LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr-->
- <!-- ON ttr.RESULT_TOTAL_ID = qqr.RESULT_TOTAL_ID-->
- <!-- LEFT JOIN OMSTRUCK_ORDER oo-->
- <!-- ON ttr.ORDER_ID = oo.ORDER_ID-->
- <!-- </select>-->
- <!-- 根据车牌号查询指令接收 -->
- <select id="getOrderReceive2" resultType="java.util.Map" parameterType="java.util.Map">
- SELECT DISTINCT oo.ORDER_NUMBER as "orderNumber",
- rc.CAPACITY_NUMBER as "capacityNumber",
- rg.GATEPOST_NAME as "gatepostName",
- (
- SELECT count(*)
- FROM QMS_QUEUE_LIST qql
- WHERE qql.DELETED = 0
- AND qql.GRID_ID = #{gridId}
- ) "count",
- (
- <![CDATA[
- select count(*)
- from QMS_QUEUE_LIST QQL2
- join QMS_QUEUE_GRID QQG2
- on QQG2.GRID_ID = QQL2.GRID_ID
- where QQL2.LIST_NODE_ORDER <= QQL.list_node_order
- and QQL2.GRID_ID = QQL.GRID_ID
- and QQL2.DELETED = 0
- ]]>) "listNodeOrder"
- FROM QMS_QUEUE_RESULT qqr
- LEFT JOIN RMS_CAPACITY rc
- ON rc.CAPACITY_ID = qqr.CAPACITY_ID
- LEFT JOIN QMS_QUEUE_GRID qqg
- ON qqg.GRID_ID = qqr.GRID_ID
- LEFT JOIN QMS_QUEUE_LIST qql
- ON qqr.LIST_ID = qql.LIST_ID
- LEFT JOIN RMS_GATEPOST rg
- ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr
- ON ttr.RESULT_TOTAL_ID = qqr.RESULT_TOTAL_ID
- LEFT JOIN OMSTRUCK_ORDER oo
- ON ttr.ORDER_ID = oo.ORDER_ID
- WHERE rc.CAPACITY_NUMBER = #{capacityNumber}
- and OO.ORDER_STATUS = 1
- </select>
- <!-- 通过车牌号查询网格id -->
- <!-- <select id="getGridId" parameterType="java.lang.String" resultType="DECIMAL">-->
- <!-- SELECT qqg.GRID_ID as "gridId"-->
- <!-- FROM QMS_QUEUE_RESULT qqr-->
- <!-- LEFT JOIN QMS_QUEUE_GRID qqg-->
- <!-- ON qqr.GRID_ID = qqg.GRID_ID-->
- <!-- LEFT JOIN RMS_CAPACITY rc-->
- <!-- ON qqr.CAPACITY_ID = rc.CAPACITY_ID-->
- <!-- WHERE qqr.RESULT_START_TIME IS NULL-->
- <!-- AND rc.CAPACITY_NUMBER = #{capacityNumber}-->
- <!-- </select>-->
- <!-- <select id="getGridIdNotNull" parameterType="java.lang.String" resultType="DECIMAL">-->
- <!-- SELECT qqg.GRID_ID as "gridId"-->
- <!-- FROM QMS_QUEUE_RESULT qqr-->
- <!-- LEFT JOIN QMS_QUEUE_GRID qqg-->
- <!-- ON qqr.GRID_ID = qqg.GRID_ID-->
- <!-- LEFT JOIN RMS_CAPACITY rc-->
- <!-- ON qqr.CAPACITY_ID = rc.CAPACITY_ID-->
- <!-- WHERE qqr.RESULT_END_TIME IS NULL-->
- <!-- AND qqr.RESULT_CANCEL_TIME IS NULL-->
- <!-- AND rc.CAPACITY_NUMBER = #{capacityNumber}-->
- <!-- </select>-->
- <!-- 通过运单号得到总实绩id -->
- <select id="getResultTotalId" parameterType="java.lang.String" resultType="DECIMAL">
- SELECT ttr.RESULT_TOTAL_ID
- FROM TMSTRUCK_TOTAL_RESULT ttr
- LEFT JOIN OMSTRUCK_ORDER oo
- ON ttr.ORDER_ID = oo.ORDER_ID
- WHERE oo.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 通过车牌号得到实绩id -->
- <select id="getResultIdByCapacityId" parameterType="java.lang.String" resultType="DECIMAL">
- SELECT qqr.RESULT_ID
- FROM QMS_QUEUE_RESULT qqr
- LEFT JOIN RMS_CAPACITY rc
- ON rc.CAPACITY_ID = qqr.CAPACITY_ID
- WHERE rc.CAPACITY_NUMBER = #{capacityNumber}
- AND qqr.RESULT_END_TIME IS NULL
- </select>
- <!-- 通过运力id和总实绩id查询排队实绩id -->
- <select id="getQueueResultId" parameterType="java.util.Map" resultType="DECIMAL">
- SELECT qqr.RESULT_ID as "resultId"
- FROM QMS_QUEUE_RESULT qqr
- WHERE qqr.CAPACITY_ID = #{capacityId}
- AND qqr.RESULT_TOTAL_ID = #{resultTotalId}
- </select>
- <!-- ====================================仓库排队=============================================== -->
- <!-- 查询仓库排队申请 -->
- <!-- <select id="getWarehouseQueueApply" parameterType="java.util.Map" resultType="java.util.Map">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- QQR.RESULT_APPLYFOR_TIME "resultApplyforTime",-->
- <!-- RPP.PLATFORM_NAME "platformName",-->
- <!-- RW.WAREHOUSE_NAME "warehouseName",-->
- <!-- QQR.RESULT_DOWN_TIME "resultDownTime"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQR.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- on RPP.PLATFORM_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID-->
- <!-- left join OMSTRUCK_ORDER OO-->
- <!-- on OO.ORDER_ID = TTR.ORDER_ID-->
- <!-- join RMS_WAREHOUSE RW-->
- <!-- on RW.WAREHOUSE_ID = (select distinct WAREHOUSE_ID-->
- <!-- from RMS_PWAREHOUSE_GRID RPG-->
- <!-- where RPG.PLATFORM_ID = QQG.QUEUE_LOCATION_ID)-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = OO.CAPACITY_ID-->
- <!-- where QQR.RESULT_ACCEPT_TIME is null-->
- <!-- and QQG.GRID_TYPE = 1-->
- <!-- )-->
- <!-- <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="resultApplyforTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultApplyforTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultApplyforTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="platformName != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="warehouseName != null">-->
- <!-- and-->
- <!-- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">-->
- <!-- "warehouseName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultApplyforTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询仓库司机指令接收 -->
- <!-- <select id="getWarehouseOrderReceive" parameterType="java.util.Map" resultType="java.util.Map">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- QQR.RESULT_ACCEPT_TIME "resultAcceptTime",-->
- <!-- RPP.PLATFORM_NAME "platformName",-->
- <!-- QQR.RESULT_DOWN_TIME "resultDownTime"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID-->
- <!-- left join OMSTRUCK_ORDER OO-->
- <!-- on OO.ORDER_ID = TTR.ORDER_ID-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = QQR.CAPACITY_ID-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQR.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- on RPP.PLATFORM_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- where QQR.RESULT_END_TIME is null and QQG.GRID_TYPE = 1-->
- <!-- )-->
- <!-- <where>-->
- <!-- <if test="capacityNumber != null">-->
- <!-- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">-->
- <!-- "capacityNumber" 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="platformName != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultAcceptTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultAcceptTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultAcceptTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultDownTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultDownTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultDownTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultDownTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询仓库排队开始 -->
- <!-- <select id="getWarehouseQueueListByQueueUp" parameterType="java.util.Map" resultType="java.util.Map">-->
- <!-- select-->
- <!-- *-->
- <!-- from(-->
- <!-- select-->
- <!-- QQR.RESULT_ID "resultId",-->
- <!-- ASO.SALE_NUMBER "orderNo",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- QQR.RESULT_START_TIME "resultStartTime",-->
- <!-- RPP.PLATFORM_NAME "platformName",-->
- <!-- RW.WAREHOUSE_NAME "warehouseName",-->
- <!-- (-->
- <!-- <![CDATA[-->
- <!-- select-->
- <!-- count(*)-->
- <!-- from-->
- <!-- QMS_QUEUE_LIST QQL2-->
- <!-- join QMS_QUEUE_GRID QQG2-->
- <!-- on QQG2.GRID_ID = QQL2.GRID_ID-->
- <!-- where-->
- <!-- QQL2.LIST_NODE_ORDER <= QQL.list_node_order-->
- <!-- and QQL2.GRID_ID = QQL.GRID_ID-->
- <!-- and QQL2.DELETED = 0-->
- <!-- ]]>-->
- <!-- ) "listNodeOrder",-->
- <!-- RC.CAPACITY_VIP "capacityVip"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join QMS_QUEUE_LIST QQL-->
- <!-- on QQR.LIST_ID = QQL.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- on RPP.PLATFORM_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID-->
- <!-- left join OMSTRUCK_ORDER OO-->
- <!-- on OO.ORDER_ID = TTR.ORDER_ID-->
- <!-- left join AMS_SALE_ORDER ASO-->
- <!-- on ASO.SALE_ORDER_ID = OO.ORDER_PLAN_ID-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on QQR.CAPACITY_ID = RC.CAPACITY_ID-->
- <!-- join RMS_WAREHOUSE RW-->
- <!-- on RW.WAREHOUSE_ID = (select distinct WAREHOUSE_ID-->
- <!-- from RMS_PWAREHOUSE_GRID RPG-->
- <!-- where RPG.PLATFORM_ID = QQG.QUEUE_LOCATION_ID)-->
- <!-- where QQR.RESULT_START_TIME is not null-->
- <!-- and QQL.DELETED = 0-->
- <!-- <if test="gridId != null">-->
- <!-- and QQL.GRID_ID = #{gridId}-->
- <!-- </if>-->
- <!-- )-->
- <!-- <where>-->
- <!-- <if test="saleNumber != null">-->
- <!-- <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">-->
- <!-- "saleNumber" 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="resultStartTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultStartTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultStartTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="platformName != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="listNodeOrder != null">-->
- <!-- and-->
- <!-- <foreach collection="listNodeOrder" item="item" open="(" separator="or" close=")">-->
- <!-- "listNodeOrder" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="warehouseName != null">-->
- <!-- and-->
- <!-- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">-->
- <!-- "warehouseName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultStartTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查看仓库排队详情 -->
- <!-- <select id="getWarehouseQueueMes" resultType="java.util.Map" parameterType="java.util.Map">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select-->
- <!-- QQR.RESULT_ID "resultId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- RPP.PLATFORM_NAME "platformName",-->
- <!-- RC.CAPACITY_VIP "capacityVip",-->
- <!-- (-->
- <!-- <![CDATA[-->
- <!-- select-->
- <!-- count(*)-->
- <!-- from-->
- <!-- QMS_QUEUE_LIST QQL2-->
- <!-- join QMS_QUEUE_GRID QQG2-->
- <!-- on QQG2.GRID_ID = QQL2.GRID_ID-->
- <!-- where-->
- <!-- QQL2.LIST_NODE_ORDER <= QQL.list_node_order-->
- <!-- and QQL2.GRID_ID = QQL.GRID_ID-->
- <!-- and QQL2.DELETED = 0-->
- <!-- ]]>-->
- <!-- ) "listNodeOrder",-->
- <!-- QQR.RESULT_START_TIME "resultStartTime"-->
- <!-- from OMSTRUCK_ORDER OO-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = OO.CAPACITY_ID-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.ORDER_ID = OO.ORDER_ID-->
- <!-- left join QMS_QUEUE_RESULT QQR-->
- <!-- on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID-->
- <!-- left join QMS_QUEUE_LIST QQL-->
- <!-- on QQR.LIST_ID = QQL.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- on RPP.PLATFORM_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- where-->
- <!-- QQR.RESULT_START_TIME is not null-->
- <!-- and QQG.GRID_TYPE in (1, 2)-->
- <!-- and QQL.DELETED = 0-->
- <!-- <if test="orderNum != null">-->
- <!-- and OO.ORDER_NUMBER = #{orderNum}-->
- <!-- </if>-->
- <!-- <if test="platformId != null">-->
- <!-- and RPP.PLATFORM_ID = #{platformId}-->
- <!-- </if>-->
- <!-- )-->
- <!-- <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="platformName != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="listNodeOrder != null">-->
- <!-- and-->
- <!-- <foreach collection="listNodeOrder" item="item" open="(" separator="or" close=")">-->
- <!-- "listNodeOrder" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultStartTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询排队转移 -->
- <!-- <select id="getWarehouseQueueChange" resultType="java.util.Map" parameterType="java.util.Map">-->
- <!-- select-->
- <!-- *-->
- <!-- from(-->
- <!-- select-->
- <!-- QQR.RESULT_ID "resultId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- RPP2.PLATFORM_NAME "platformName2",-->
- <!-- RW2.WAREHOUSE_NAME "warehouseName2",-->
- <!-- RPP1.PLATFORM_NAME "platformName1",-->
- <!-- RW1.WAREHOUSE_NAME "warehouseName1",-->
- <!-- QQR.RESULT_TRANSFER_TIME "resultTransferTime",-->
- <!-- QQR.RESULT_TRANSFER_REASON "resultTransferReason",-->
- <!-- (-->
- <!-- <![CDATA[-->
- <!-- select-->
- <!-- count(*)-->
- <!-- from-->
- <!-- QMS_QUEUE_LIST QL-->
- <!-- join QMS_QUEUE_GRID QG-->
- <!-- on QG.GRID_ID = QL.GRID_ID-->
- <!-- where-->
- <!-- QL.LIST_NODE_ORDER <= QQL.list_node_order-->
- <!-- and QL.GRID_ID = QQL.GRID_ID-->
- <!-- and QL.DELETED = 0-->
- <!-- ]]>-->
- <!-- ) "listNodeOrder"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID-->
- <!-- left join OMSTRUCK_ORDER OO-->
- <!-- on OO.ORDER_ID = TTR.ORDER_ID-->
- <!-- left join RMS_CAPACITY RC-->
- <!-- on RC.CAPACITY_ID = QQR.CAPACITY_ID-->
- <!-- left join QMS_QUEUE_LIST QQL-->
- <!-- on QQL.LIST_ID = QQR.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG1 --转移后网格ID-->
- <!-- on QQG1.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP1 --转移后月台名称-->
- <!-- on RPP1.PLATFORM_ID = QQG1.QUEUE_LOCATION_ID-->
- <!-- join RMS_WAREHOUSE RW1 --转移后仓库名称-->
- <!-- on RW1.WAREHOUSE_ID = (select distinct WAREHOUSE_ID-->
- <!-- from RMS_PWAREHOUSE_GRID RPG-->
- <!-- where RPG.PLATFORM_ID = QQG1.QUEUE_LOCATION_ID)-->
- <!-- left join QMS_QUEUE_GRID QQG2 --转移前网格ID-->
- <!-- on QQG2.GRID_ID = QQR.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP2 --转移前月台名称-->
- <!-- on RPP2.PLATFORM_ID = QQG2.QUEUE_LOCATION_ID-->
- <!-- join RMS_WAREHOUSE RW2 --转移前仓库名称-->
- <!-- on RW2.WAREHOUSE_ID = (select distinct WAREHOUSE_ID-->
- <!-- from RMS_PWAREHOUSE_GRID RPG-->
- <!-- where RPG.PLATFORM_ID = QQG2.QUEUE_LOCATION_ID)-->
- <!-- where QQR.RESULT_TRANSFER_TIME is not null-->
- <!---- and QQL.DELETED = 0-->
- <!-- and QQG1.GRID_TYPE = 1-->
- <!-- )-->
- <!-- <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="platformName2 != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName2" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName2" 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="platformName1 != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName1" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName1" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="warehouseName1 != null">-->
- <!-- and-->
- <!-- <foreach collection="warehouseName1" item="item" open="(" separator="or" close=")">-->
- <!-- "warehouseName1" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultTransferTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultTransferTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultTransferTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="resultTransferReason != null">-->
- <!-- and-->
- <!-- <foreach collection="resultTransferReason" item="item" open="(" separator="or" close=")">-->
- <!-- "resultTransferReason" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultTransferTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!-- 查询仓库排队结束 -->
- <!-- <select id="getWarehouseQueueEndMes" resultType="java.util.Map" parameterType="java.util.Map">-->
- <!-- select *-->
- <!-- from (-->
- <!-- select QQR.RESULT_ID "resultId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber",-->
- <!-- QQR.RESULT_END_TIME "resultEndTime",-->
- <!-- RW.WAREHOUSE_NAME "warehouseName",-->
- <!-- RPP.PLATFORM_NAME "platformName"-->
- <!-- from QMS_QUEUE_RESULT QQR-->
- <!-- left join TMSTRUCK_TOTAL_RESULT TTR-->
- <!-- on TTR.RESULT_TOTAL_ID = QQR.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 QMS_QUEUE_LIST QQL-->
- <!-- on QQL.LIST_ID = QQR.LIST_ID-->
- <!-- left join QMS_QUEUE_GRID QQG-->
- <!-- on QQG.GRID_ID = QQL.GRID_ID-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- on RPP.PLATFORM_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- join RMS_WAREHOUSE RW-->
- <!-- on RW.WAREHOUSE_ID = (select distinct WAREHOUSE_ID-->
- <!-- from RMS_PWAREHOUSE_GRID RPG-->
- <!-- where RPG.PLATFORM_ID = QQG.QUEUE_LOCATION_ID)-->
- <!-- where QQR.RESULT_END_TIME is not null-->
- <!-- and QQG.GRID_TYPE = 1-->
- <!-- )-->
- <!-- <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="resultEndTime != null">-->
- <!-- and-->
- <!-- <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">-->
- <!-- "resultEndTime" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="warehouseName != null">-->
- <!-- and-->
- <!-- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">-->
- <!-- "warehouseName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- <if test="platformName != null">-->
- <!-- and-->
- <!-- <foreach collection="platformName" item="item" open="(" separator="or" close=")">-->
- <!-- "platformName" like '%${item}%'-->
- <!-- </foreach>-->
- <!-- </if>-->
- <!-- </where>-->
- <!-- <include refid="orderBy"></include>-->
- <!-- <if test="orderField == null ">-->
- <!-- order by "resultEndTime" desc-->
- <!-- </if>-->
- <!-- </select>-->
- <!--<!– 通过运输订单Id查询推送给司机的数据 –>-->
- <!-- <select id="sendEnFactoryMesToWebSocket" parameterType="int" resultType="java.util.Map">-->
- <!-- select-->
- <!-- OO.ORDER_ID "orderId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber"-->
- <!-- from OMSTRUCK_ORDER OO-->
- <!-- LEFT JOIN RMS_CAPACITY RC-->
- <!-- ON RC.CAPACITY_ID = OO.CAPACITY_ID-->
- <!-- WHERE ORDER_ID = #{orderId}-->
- <!-- </select>-->
- <!-- 通过网格Id查询进厂门岗名称 -->
- <!-- <select id="queryGatepostNameByGridId" parameterType="int" resultType="java.util.Map">-->
- <!-- select RG.GATEPOST_NAME "gatepostName"-->
- <!-- from QMS_QUEUE_GRID QQG-->
- <!-- left join RMS_GATEPOST RG-->
- <!-- on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- where QQG.GRID_ID = #{gridId}-->
- <!-- </select>-->
- <!-- 通过运输订单Id查询司机仓库排队的数据 -->
- <!-- <select id="sendWarehouseMesToWebSocket" parameterType="int" resultType="java.util.Map">-->
- <!-- select-->
- <!-- OO.ORDER_ID "orderId",-->
- <!-- OO.ORDER_NUMBER "orderNumber",-->
- <!-- RCD.DRIVER_NAME "driverName",-->
- <!-- RC.CAPACITY_NUMBER "capacityNumber"-->
- <!-- from OMSTRUCK_ORDER OO-->
- <!-- LEFT JOIN RMS_CAPACITY RC-->
- <!-- ON RC.CAPACITY_ID = OO.CAPACITY_ID-->
- <!-- LEFT JOIN RMS_CAR_DRIVER RCD-->
- <!-- ON RCD.DRIVER_ID = OO.DRIVER_ID-->
- <!-- WHERE ORDER_ID = #{orderId}-->
- <!-- </select>-->
- <!-- 通过月台网格ID查询仓库名称 和 月台名称 -->
- <!-- <select id="queryWarehouseNameByPlatformId" parameterType="int" resultType="java.util.Map">-->
- <!-- select RPP.PLATFORM_NAME "platformName",-->
- <!-- ( SELECT DISTINCT-->
- <!-- RW.WAREHOUSE_NAME-->
- <!-- FROM "RMS_PWAREHOUSE_GRID" RPG-->
- <!-- JOIN RMS_WAREHOUSE RW-->
- <!-- ON RW.WAREHOUSE_ID = RPG.WAREHOUSE_ID-->
- <!-- WHERE RPG.PLATFORM_ID = QQG.QUEUE_LOCATION_ID AND PLATFORM_ID IS NOT NULL )-->
- <!-- "warehouseName"-->
- <!-- from QMS_QUEUE_GRID QQG-->
- <!-- left join RMS_PWAREHOUSE_PLATFORM RPP-->
- <!-- on RPP.PLATFORM_ID = QQG.QUEUE_LOCATION_ID-->
- <!-- where QQG.GRID_ID = #{gridId}-->
- <!-- </select>-->
- <!-- 通过订单Id查询物资下面的仓储网格ID -->
- <select id="getGridIdByOrderId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
- select QQR.GRID_ID "grid"
- from OMSTRUCK_ORDER_MATERIAL OOM
- left join QMS_QUEUE_GRID QQR on OOM.MATERIAL_ID = QQR.QUEUE_LOCATION_ID
- where OOM.ORDER_ID = #{orderId} and QQR.GRID_TYPE = 4
- </select>
- <select id="getMaterialIdByOrderId" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
- select OOM.MATERIAL_ID from OMSTRUCK_ORDER_MATERIAL OOM where OOM.ORDER_ID = #{orderId}
- </select>
- <select id="getQueueResultByOrderId" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- select QQR.RESULT_ID "resultId",
- QQR.RESULT_END_TIME "resultEndTime",
- QQR.GRID_ID "gridId",
- QQR.RESULT_DOWN_TIME "resultDownTime",
- QQR.RESULT_START_TIME "resultStartTime",
- QQR.IS_SPELLING "isSpelling",
- QQR.RESULT_CANCEL_TIME "resultCancelTime",
- QQR.RESULT_INSERT_TIME "resultInsertTime",
- QQR.LIST_ID "listId",
- RG.GATEPOST_NAME "gatepostName",
- (case
- when QQR.IS_SPELLING = 0
- then (select QQL.ENTRY_SURE_TIME
- from QMS_QUEUE_LIST QQL
- where QQR.RESULT_ID = QQL.QUEUE_RESULT_ID)
- when QQR.IS_SPELLING = 1
- then (select QQSL.ENTRY_SURE_TIME
- from QMS_QUEUE_SPELLING_LIST QQSL
- where QQR.RESULT_ID = QQSL.QUEUE_RESULT_ID)
- end) "entrySureTime"
- from QMS_QUEUE_RESULT QQR
- left join RMS_GATEPOST RG on QQR.GATEPOST_ID = RG.GATEPOST_ID
- where QQR.RESULT_TOTAL_ID = #{resultTotalId}
- </select>
- <select id="getResultMesByTotalId" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- select QQR.RESULT_ID "resultId",
- QQR.IS_SPELLING "isSpelling"
- from QMS_QUEUE_RESULT QQR
- where QQR.RESULT_TOTAL_ID = #{resultTotalId}
- </select>
- <select id="getStoreQueueList" resultType="java.util.Map">
- SELECT
- o2.material_priority "materialPriority",
- rw.WAREHOUSE_NAME "warehouseName",
- count( 1 ) "carQueue"
- FROM
- Omstruck_Order o1
- LEFT JOIN Omstruck_Order_Material o2 ON o1.order_id = o2.order_id
- LEFT JOIN rms_warehouse rw ON rw.warehouse_id = o2.material_priority
- LEFT JOIN tmstruck_total_result ttr ON ttr.order_id = o1.order_id
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT twr ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- AND O2.MATERIAL_ID = TWR.MATERIAL_ID
- WHERE
- o1.order_status = 5
- AND o1.order_type = 1
- AND TWR.RESULT_NET_WEIGHT IS NULL
- AND rw.WAREHOUSE_NAME IS NOT NULL
- GROUP BY
- o2.material_priority,
- rw.WAREHOUSE_NAME
- </select>
- </mapper>
|