123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904 |
- <?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.TmstruckWeightResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckWeightResult">
- <id column="WEIGHT_TASK_RESULT_ID" jdbcType="DECIMAL" property="weightTaskResultId" />
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
- <result column="RESULT_POUND_NO" jdbcType="VARCHAR" property="resultPoundNo" />
- <result column="RESULT_GROSS_WEIGHT" jdbcType="DECIMAL" property="resultGrossWeight" />
- <result column="RESULT_GROSS_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultGrossWeightTime" />
- <result column="RESULT_TARE_WEIGHT" jdbcType="DECIMAL" property="resultTareWeight" />
- <result column="RESULT_TARE_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultTareWeightTime" />
- <result column="RESULT_NET_WEIGHT" jdbcType="DECIMAL" property="resultNetWeight" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
- <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
- <result column="RESULT_GROSS_PLACE_ID" jdbcType="DECIMAL" property="resultGrossPlaceId" />
- <result column="RESULT_TARE_PLACE_ID" jdbcType="DECIMAL" property="resultTarePlaceId" />
- <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
- <result column="ISDEDUCT" jdbcType="DECIMAL" property="isdeduct" />
- <result column="ISQUALITY" jdbcType="DECIMAL" property="isquality" />
- <result column="GROSS_SEGMENT_SQE" jdbcType="DECIMAL" property="grossSegmentSqe" />
- <result column="TARE_SEGMENT_SQE" jdbcType="DECIMAL" property="tareSegmentSqe" />
- </resultMap>
- <sql id="columns">
- WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID, RESULT_POUND_NO, RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME,
- RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_NAME, DELETE_TIME,
- RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT, ISQUALITY, GROSS_SEGMENT_SQE,
- TARE_SEGMENT_SQE
- </sql>
- <sql id="columns_alias">
- t.WEIGHT_TASK_RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_POUND_NO, t.RESULT_GROSS_WEIGHT,
- t.RESULT_GROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT, t.RESULT_TARE_WEIGHT_TIME, t.RESULT_NET_WEIGHT,
- t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
- t.DELETE_NAME, t.DELETE_TIME, t.RESULT_GROSS_PLACE_ID, t.RESULT_TARE_PLACE_ID, t.MATERIAL_ID,
- t.ISDEDUCT, t.ISQUALITY, t.GROSS_SEGMENT_SQE, t.TARE_SEGMENT_SQE
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM TMSTRUCK_WEIGHT_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM TMSTRUCK_WEIGHT_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="weightTaskResultId != null">
- and WEIGHT_TASK_RESULT_ID = #{weightTaskResultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="resultPoundNo != null and resultPoundNo != ''">
- and RESULT_POUND_NO = #{resultPoundNo}
- </if>
- <if test="resultGrossWeight != null">
- and RESULT_GROSS_WEIGHT = #{resultGrossWeight}
- </if>
- <if test="resultGrossWeightTime != null">
- and TO_CHAR(RESULT_GROSS_WEIGHT_TIME,'yyyy-MM-dd') = #{resultGrossWeightTime}
- </if>
- <if test="resultTareWeight != null">
- and RESULT_TARE_WEIGHT = #{resultTareWeight}
- </if>
- <if test="resultTareWeightTime != null">
- and TO_CHAR(RESULT_TARE_WEIGHT_TIME,'yyyy-MM-dd') = #{resultTareWeightTime}
- </if>
- <if test="resultNetWeight != null">
- and RESULT_NET_WEIGHT = #{resultNetWeight}
- </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="deleteName != null and deleteName != ''">
- and DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null">
- and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
- </if>
- <if test="resultGrossPlaceId != null">
- and RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId}
- </if>
- <if test="resultTarePlaceId != null">
- and RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
- </if>
- <if test="materialId != null">
- and MATERIAL_ID = #{materialId}
- </if>
- <if test="isdeduct != null">
- and ISDEDUCT = #{isdeduct}
- </if>
- <if test="isquality != null">
- and ISQUALITY = #{isquality}
- </if>
- <if test="grossSegmentSqe != null">
- and GROSS_SEGMENT_SQE = #{grossSegmentSqe}
- </if>
- <if test="tareSegmentSqe != null">
- and TARE_SEGMENT_SQE = #{tareSegmentSqe}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="weightTaskResultId != null">
- and WEIGHT_TASK_RESULT_ID = #{weightTaskResultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="resultPoundNo != null and resultPoundNo != ''">
- and RESULT_POUND_NO LIKE '%${resultPoundNo}%'
- </if>
- <if test="resultGrossWeight != null">
- and RESULT_GROSS_WEIGHT = #{resultGrossWeight}
- </if>
- <if test="resultGrossWeightTime != null">
- and TO_CHAR(RESULT_GROSS_WEIGHT_TIME,'yyyy-MM-dd') = #{resultGrossWeightTime}
- </if>
- <if test="resultTareWeight != null">
- and RESULT_TARE_WEIGHT = #{resultTareWeight}
- </if>
- <if test="resultTareWeightTime != null">
- and TO_CHAR(RESULT_TARE_WEIGHT_TIME,'yyyy-MM-dd') = #{resultTareWeightTime}
- </if>
- <if test="resultNetWeight != null">
- and RESULT_NET_WEIGHT = #{resultNetWeight}
- </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="deleteName != null and deleteName != ''">
- and DELETE_NAME LIKE '%${deleteName}%'
- </if>
- <if test="deleteTime != null">
- and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
- </if>
- <if test="resultGrossPlaceId != null">
- and RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId}
- </if>
- <if test="resultTarePlaceId != null">
- and RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
- </if>
- <if test="materialId != null">
- and MATERIAL_ID = #{materialId}
- </if>
- <if test="isdeduct != null">
- and ISDEDUCT = #{isdeduct}
- </if>
- <if test="isquality != null">
- and ISQUALITY = #{isquality}
- </if>
- <if test="grossSegmentSqe != null">
- and GROSS_SEGMENT_SQE = #{grossSegmentSqe}
- </if>
- <if test="tareSegmentSqe != null">
- and TARE_SEGMENT_SQE = #{tareSegmentSqe}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from TMSTRUCK_WEIGHT_RESULT
- where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from TMSTRUCK_WEIGHT_RESULT
- where 1!=1
- <if test="resultTotalId != null">
- or RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="resultPoundNo != null and resultPoundNo != ''">
- or RESULT_POUND_NO = #{resultPoundNo}
- </if>
- <if test="resultGrossWeight != null">
- or RESULT_GROSS_WEIGHT = #{resultGrossWeight}
- </if>
- <if test="resultGrossWeightTime != null">
- or TO_CHAR(RESULT_GROSS_WEIGHT_TIME,'yyyy-MM-dd') = '#{resultGrossWeightTime}'
- </if>
- <if test="resultTareWeight != null">
- or RESULT_TARE_WEIGHT = #{resultTareWeight}
- </if>
- <if test="resultTareWeightTime != null">
- or TO_CHAR(RESULT_TARE_WEIGHT_TIME,'yyyy-MM-dd') = '#{resultTareWeightTime}'
- </if>
- <if test="resultNetWeight != null">
- or RESULT_NET_WEIGHT = #{resultNetWeight}
- </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="deleteName != null and deleteName != ''">
- or DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null">
- or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
- </if>
- <if test="resultGrossPlaceId != null">
- or RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId}
- </if>
- <if test="resultTarePlaceId != null">
- or RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
- </if>
- <if test="materialId != null">
- or MATERIAL_ID = #{materialId}
- </if>
- <if test="isdeduct != null">
- or ISDEDUCT = #{isdeduct}
- </if>
- <if test="isquality != null">
- or ISQUALITY = #{isquality}
- </if>
- <if test="grossSegmentSqe != null">
- or GROSS_SEGMENT_SQE = #{grossSegmentSqe}
- </if>
- <if test="tareSegmentSqe != null">
- or TARE_SEGMENT_SQE = #{tareSegmentSqe}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
- insert into TMSTRUCK_WEIGHT_RESULT (WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID,
- RESULT_POUND_NO, RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME,
- RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME,
- RESULT_NET_WEIGHT, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
- RESULT_TARE_PLACE_ID, MATERIAL_ID, ISDEDUCT,
- ISQUALITY, GROSS_SEGMENT_SQE, TARE_SEGMENT_SQE
- )
- values (#{weightTaskResultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL},
- #{resultPoundNo,jdbcType=VARCHAR}, #{resultGrossWeight,jdbcType=DECIMAL}, #{resultGrossWeightTime,jdbcType=TIMESTAMP},
- #{resultTareWeight,jdbcType=DECIMAL}, #{resultTareWeightTime,jdbcType=TIMESTAMP},
- #{resultNetWeight,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{resultGrossPlaceId,jdbcType=DECIMAL},
- #{resultTarePlaceId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{isdeduct,jdbcType=DECIMAL},
- #{isquality,jdbcType=DECIMAL}, #{grossSegmentSqe,jdbcType=DECIMAL}, #{tareSegmentSqe,jdbcType=DECIMAL}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
- insert into TMSTRUCK_WEIGHT_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="weightTaskResultId != null">
- WEIGHT_TASK_RESULT_ID,
- </if>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID,
- </if>
- <if test="resultPoundNo != null">
- RESULT_POUND_NO,
- </if>
- <if test="resultGrossWeight != null">
- RESULT_GROSS_WEIGHT,
- </if>
- <if test="resultGrossWeightTime != null">
- RESULT_GROSS_WEIGHT_TIME,
- </if>
- <if test="resultTareWeight != null">
- RESULT_TARE_WEIGHT,
- </if>
- <if test="resultTareWeightTime != null">
- RESULT_TARE_WEIGHT_TIME,
- </if>
- <if test="resultNetWeight != null">
- RESULT_NET_WEIGHT,
- </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="deleteName != null">
- DELETE_NAME,
- </if>
- <if test="deleteTime != null">
- DELETE_TIME,
- </if>
- <if test="resultGrossPlaceId != null">
- RESULT_GROSS_PLACE_ID,
- </if>
- <if test="resultTarePlaceId != null">
- RESULT_TARE_PLACE_ID,
- </if>
- <if test="materialId != null">
- MATERIAL_ID,
- </if>
- <if test="isdeduct != null">
- ISDEDUCT,
- </if>
- <if test="isquality != null">
- ISQUALITY,
- </if>
- <if test="grossSegmentSqe != null">
- GROSS_SEGMENT_SQE,
- </if>
- <if test="tareSegmentSqe != null">
- TARE_SEGMENT_SQE,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="weightTaskResultId != null">
- #{weightTaskResultId,jdbcType=DECIMAL},
- </if>
- <if test="resultTotalId != null">
- #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="resultPoundNo != null">
- #{resultPoundNo,jdbcType=VARCHAR},
- </if>
- <if test="resultGrossWeight != null">
- #{resultGrossWeight,jdbcType=DECIMAL},
- </if>
- <if test="resultGrossWeightTime != null">
- #{resultGrossWeightTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultTareWeight != null">
- #{resultTareWeight,jdbcType=DECIMAL},
- </if>
- <if test="resultTareWeightTime != null">
- #{resultTareWeightTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultNetWeight != null">
- #{resultNetWeight,jdbcType=DECIMAL},
- </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="deleteName != null">
- #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultGrossPlaceId != null">
- #{resultGrossPlaceId,jdbcType=DECIMAL},
- </if>
- <if test="resultTarePlaceId != null">
- #{resultTarePlaceId,jdbcType=DECIMAL},
- </if>
- <if test="materialId != null">
- #{materialId,jdbcType=DECIMAL},
- </if>
- <if test="isdeduct != null">
- #{isdeduct,jdbcType=DECIMAL},
- </if>
- <if test="isquality != null">
- #{isquality,jdbcType=DECIMAL},
- </if>
- <if test="grossSegmentSqe != null">
- #{grossSegmentSqe,jdbcType=DECIMAL},
- </if>
- <if test="tareSegmentSqe != null">
- #{tareSegmentSqe,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
- update TMSTRUCK_WEIGHT_RESULT
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
- RESULT_GROSS_WEIGHT = #{resultGrossWeight,jdbcType=DECIMAL},
- RESULT_GROSS_WEIGHT_TIME = #{resultGrossWeightTime,jdbcType=TIMESTAMP},
- RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=DECIMAL},
- RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=TIMESTAMP},
- RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=DECIMAL},
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
- RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId,jdbcType=DECIMAL},
- RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL},
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
- ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
- ISQUALITY = #{isquality,jdbcType=DECIMAL},
- GROSS_SEGMENT_SQE = #{grossSegmentSqe,jdbcType=DECIMAL},
- TARE_SEGMENT_SQE = #{tareSegmentSqe,jdbcType=DECIMAL}
- where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
- update TMSTRUCK_WEIGHT_RESULT
- <set>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="resultPoundNo != null">
- RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
- </if>
- <if test="resultGrossWeight != null">
- RESULT_GROSS_WEIGHT = #{resultGrossWeight,jdbcType=DECIMAL},
- </if>
- <if test="resultGrossWeightTime != null">
- RESULT_GROSS_WEIGHT_TIME = #{resultGrossWeightTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultTareWeight != null">
- RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=DECIMAL},
- </if>
- <if test="resultTareWeightTime != null">
- RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultNetWeight != null">
- RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=DECIMAL},
- </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="deleteName != null">
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultGrossPlaceId != null">
- RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId,jdbcType=DECIMAL},
- </if>
- <if test="resultTarePlaceId != null">
- RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL},
- </if>
- <if test="materialId != null">
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
- </if>
- <if test="isdeduct != null">
- ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
- </if>
- <if test="isquality != null">
- ISQUALITY = #{isquality,jdbcType=DECIMAL},
- </if>
- <if test="grossSegmentSqe != null">
- GROSS_SEGMENT_SQE = #{grossSegmentSqe,jdbcType=DECIMAL},
- </if>
- <if test="tareSegmentSqe != null">
- TARE_SEGMENT_SQE = #{tareSegmentSqe,jdbcType=DECIMAL},
- </if>
- </set>
- where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,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 TMSTRUCK_WEIGHT_RESULT
- (WEIGHT_TASK_RESULT_ID,
- RESULT_TOTAL_ID, RESULT_POUND_NO,
- RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME,
- RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME,
- RESULT_NET_WEIGHT, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
- RESULT_TARE_PLACE_ID, MATERIAL_ID,
- ISDEDUCT, ISQUALITY, GROSS_SEGMENT_SQE,
- TARE_SEGMENT_SQE)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.weightTaskResultId,jdbcType=DECIMAL},
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultPoundNo,jdbcType=VARCHAR},
- #{item.resultGrossWeight,jdbcType=DECIMAL}, #{item.resultGrossWeightTime,jdbcType=TIMESTAMP},
- #{item.resultTareWeight,jdbcType=DECIMAL}, #{item.resultTareWeightTime,jdbcType=TIMESTAMP},
- #{item.resultNetWeight,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
- #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultGrossPlaceId,jdbcType=DECIMAL},
- #{item.resultTarePlaceId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL},
- #{item.isdeduct,jdbcType=DECIMAL}, #{item.isquality,jdbcType=DECIMAL}, #{item.grossSegmentSqe,jdbcType=DECIMAL},
- #{item.tareSegmentSqe,jdbcType=DECIMAL} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSTRUCK_WEIGHT_RESULT
- set
- WEIGHT_TASK_RESULT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.weightTaskResultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TOTAL_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_POUND_NO=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultPoundNo,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_GROSS_WEIGHT=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeight,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_GROSS_WEIGHT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeightTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_TARE_WEIGHT=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeight,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TARE_WEIGHT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeightTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_NET_WEIGHT=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultNetWeight,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_NAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_GROSS_PLACE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossPlaceId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TARE_PLACE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTarePlaceId,jdbcType=DECIMAL}
- </foreach>
- ,MATERIAL_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
- </foreach>
- ,ISDEDUCT=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.isdeduct,jdbcType=DECIMAL}
- </foreach>
- ,ISQUALITY=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.isquality,jdbcType=DECIMAL}
- </foreach>
- ,GROSS_SEGMENT_SQE=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.grossSegmentSqe,jdbcType=DECIMAL}
- </foreach>
- ,TARE_SEGMENT_SQE=
- <foreach collection="list" item="item" index="index" separator=" " open="case WEIGHT_TASK_RESULT_ID" close="end">
- when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.tareSegmentSqe,jdbcType=DECIMAL}
- </foreach>
- where WEIGHT_TASK_RESULT_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.weightTaskResultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from TMSTRUCK_WEIGHT_RESULT
- where WEIGHT_TASK_RESULT_ID in
- <foreach collection="list" item="id" open="(" close=")" 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>
- <!-- 通过运输订单号 查询实绩Id、总实绩ID -->
- <select id="selectTotalIdByOrderNo" parameterType="java.util.Map" resultType="java.util.Map">
- select
- OO.ORDER_ID "orderId",
- OO.ORDER_TYPE "orderTypee",
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- TTR.RESULT_TOTAL_ID "resultTotalId",
- RC.CAPACITY_NUMBER "capacityNumber"
- from OMSTRUCK_ORDER OO
- left join TMSTRUCK_TOTAL_RESULT TTR
- on OO.ORDER_ID = TTR.ORDER_ID
- left join TMSTRUCK_WEIGHT_RESULT TWR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- where OO.ORDER_NUMBER = #{orderNumber}
- <if test="materialId != null">
- and TWR.MATERIAL_ID = #{materialId}
- </if>
- </select>
- <!-- 通过汽车衡编号查询对应的汽车衡ID -->
- <select id="selectTruckCalculateId" parameterType="java.lang.String" resultType="int">
- select TRUCK_CALCULATE_ID
- from RMS_TRUCK_CALCULATE
- where TRUCK_CALCULATE_NUMBER = #{truckCalculateNumber}
- </select>
- <!-- 查询所有的采购计毛实绩 -->
- <select id="getCGAllJiMaoResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- RS.SUPPLIER_NAME "supplierName",
- RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
- OO.ORDER_ID "orderId",
- OO.ORDER_STATUS "orderStatus"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_SUPPLIER RS
- on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
- left join RMS_CONSIGNEE RCON
- on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
- where RESULT_GROSS_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_GROSS_WEIGHT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_GROSS_WEIGHT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
- </if>
- <if test="con!=null">
- and ((instr( RCON. CONSIGNEE_COMPANY_NAME, #{con}) > 0) or (instr(OO.ORDER_NUMBER, #{con}) > 0)
- or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
- </if>
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="supplierName != null">
- and
- <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
- "supplierName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 查询所有采购的计皮实绩 -->
- <select id="getCGAllJiPiResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
- left join DIL_BATCH DB
- on DB.BATCH_ID = APO.BATCH_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- where RESULT_TARE_WEIGHT_TIME is not null and OO.ORDER_TYPE = #{orderTypee}
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_TARE_WEIGHT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') < = TWR.RESULT_TARE_WEIGHT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
- </if>
- <if test="con!=null">
- and ((instr(DB.RESULT_FOREIGN_SHIP_NAME, #{con}) > 0) or (instr(OO.ORDER_NUMBER, #{con}) > 0)
- or (instr( RC.CAPACITY_NUMBER, #{con}) > 0) or (instr(RM.MATERIAL_NAME , #{con}) > 0))
- </if>
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 通过订单Id查询订单下所有的物资理重及件数 -->
- <select id="getMaterialMes" parameterType="int" resultType="java.util.Map">
- select OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight"
- from OMSTRUCK_ORDER OO
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OO.ORDER_ID = OOM.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_MATERIAL_STEEL RMS
- on RMS.MATERIAL_ID = RM.MATERIAL_ID
- where OO.ORDER_ID = #{orderId}
- </select>
- <!--计量委托查询所需数据-->
- <!--销售查询计毛 -->
- <select id="selectMakesureGrossForSaleByOrderNumber" parameterType="java.lang.String" resultType="java.util.Map">
- SELECT OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- ASO.SALE_NUMBER "saleNumber",
- RTC.TRUCK_CALCULATE_NUMBER "calcuateNumber",
- RM.MATERIAL_NAME "materialName",
- RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoretialWeight",
- RS.SHIPPER_NAME "shipperName",
- RRA.ADDRESS_DELIVERY_ADDRESS "addressDelivery"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON OO.ORDER_PLAN_ID = ASO.SALE_ORDER_ID
- LEFT JOIN RMS_CAPACITY RC ON RC.CAPACITY_ID = OO.CAPACITY_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC ON TWR.RESULT_GROSS_PLACE_ID = RTC.TRUCK_CALCULATE_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = OOM.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS ON OOM.MATERIAL_ID = RMS.MATERIAL_ID
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = ASO.SHIPPER_ID
- LEFT JOIN RMS_RECEIVE_ADDRESS RRA ON RRA.ADDRESS_ID = ASO.RECEIVE_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- and OO.ORDER_TYPE = 1
- </select>
- <!--销售物流查询计皮作业 -->
- <select id="selectMakesureTareForSaleByOrderNumber" resultType="java.util.Map" parameterType="java.lang.String">
- SELECT OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- ASO.SALE_NUMBER "saleNumber",
- RTC.TRUCK_CALCULATE_NUMBER "calcuateNumber",
- RM.MATERIAL_NAME "materialName",
- RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoretialWeight",
- RS.SHIPPER_NAME "shipperName",
- RRA.ADDRESS_DELIVERY_ADDRESS "addressDelivery"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN AMS_SALE_ORDER ASO ON OO.ORDER_PLAN_ID = ASO.SALE_ORDER_ID
- LEFT JOIN RMS_CAPACITY RC ON RC.CAPACITY_ID = OO.CAPACITY_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC ON TWR.RESULT_TARE_PLACE_ID = RTC.TRUCK_CALCULATE_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = OOM.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS ON OOM.MATERIAL_ID = RMS.MATERIAL_ID
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = ASO.SHIPPER_ID
- LEFT JOIN RMS_RECEIVE_ADDRESS RRA ON RRA.ADDRESS_ID = ASO.RECEIVE_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- and OO.ORDER_TYPE = 1
- </select>
- <!--内转物流查询计皮作业 -->
- <select id="selectMakesureTareForConvertedByOrderNumber" resultType="java.util.Map"
- parameterType="java.lang.String">
- SELECT OO.ORDER_NUMBER "orderNumber",
- ARP.REQUIREMENT_NUMBER "requirementNumber",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- OOM.ORDER_MATERIAL_WEIGHT "materialWeight",
- RMS.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight",
- RL.LINE_START_NODE_DESC "startNode",
- RL.LINE_END_NODE_DESC "endNode",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "calculateNumber"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN AMSTRUCK_INWARD_REQUIREMENT ARP ON ARP.REQUIREMENT_ID = OO.ORDER_PLAN_ID
- LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS ON OOM.MATERIAL_ID = RMS.MATERIAL_ID
- LEFT JOIN RMS_LINE RL ON ARP.LINE_ID = RL.LINE_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC
- ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- and OO.ORDER_TYPE = 11
- </select>
- <!-- 内转物流查询计毛作业 -->
- <select id="selectMakesureGrossForConvertedByOrderNumber" resultType="java.util.Map"
- parameterType="java.lang.String">
- SELECT OO.ORDER_NUMBER "orderNumber",
- ARP.REQUIREMENT_NUMBER "requirementNumber",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- OOM.ORDER_MATERIAL_WEIGHT "materialWeight",
- RMS.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight",
- RL.LINE_START_NODE_DESC "startNode",
- RL.LINE_END_NODE_DESC "endNode",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "calculateNumber"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN AMSTRUCK_INWARD_REQUIREMENT ARP ON ARP.REQUIREMENT_ID = OO.ORDER_PLAN_ID
- LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS ON OOM.MATERIAL_ID = RMS.MATERIAL_ID
- LEFT JOIN RMS_LINE RL ON ARP.LINE_ID = RL.LINE_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TTR.ORDER_ID = OO.ORDER_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- and OO.ORDER_TYPE = 11
- </select>
- <!-- 采购查询计皮 -->
- <select id="selectMakesureGrossForPurchase" parameterType="java.lang.String" resultType="java.util.Map">
- SELECT OO.ORDER_NUMBER "orderNumber",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- OOM.ORDER_MATERIAL_WEIGHT "materialWeight",
- OOM.ORDER_MATERIAL_NUMBER "materialNumber",
- RTC.TRUCK_CALCULATE_NUMBER "calculateNumber",
- RS.SHIPPER_NAME "shipperName",
- RRA.ADDRESS_DELIVERY_ADDRESS "deliveryAdress",
- RMS.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight",
- RC.CAPACITY_NUMBER "capacityNumber"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN AMS_PURCHASE_ORDER APO
- ON OO.ORDER_PLAN_ID = APO.PURCHASE_ORDER_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
- ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON OO.ORDER_ID = TTR.ORDER_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
- ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC
- ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = APO.SUPPLIER_UNIT_ID
- LEFT JOIN RMS_RECEIVE_ADDRESS RRA
- ON RRA.ADDRESS_ID = APO.RECEIVE_UNIT_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS
- ON RMS.MATERIAL_ID = OOM.MATERIAL_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 采购查询计皮 -->
- <select id="selectMakesureTareForPurchase" parameterType="java.lang.String" resultType="java.util.Map">
- SELECT OO.ORDER_NUMBER "orderNumber",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- OOM.ORDER_MATERIAL_WEIGHT "materialWeight",
- OOM.ORDER_MATERIAL_NUMBER "materialNumber",
- RTC.TRUCK_CALCULATE_NUMBER "calculateNumber",
- RS.SHIPPER_NAME "shipperName",
- RRA.ADDRESS_DELIVERY_ADDRESS "deliveryAdress",
- RMS.MATERIAL_THEORETICAL_WEIGHT "theoreticalWeight",
- RC.CAPACITY_NUMBER "capacityNumber"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN AMS_PURCHASE_ORDER APO
- ON OO.ORDER_PLAN_ID = APO.PURCHASE_ORDER_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
- ON OO.ORDER_ID = OOM.ORDER_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON OO.ORDER_ID = TTR.ORDER_ID
- LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
- ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC
- ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = APO.SUPPLIER_UNIT_ID
- LEFT JOIN RMS_RECEIVE_ADDRESS RRA
- ON RRA.ADDRESS_ID = APO.RECEIVE_UNIT_ID
- LEFT JOIN RMS_MATERIAL_STEEL RMS
- ON RMS.MATERIAL_ID = OOM.MATERIAL_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- //通过运输订单id获取路段顺序号、物资类型、计量实绩主键、line_id
- Map<BigDecimal, String> selectByOrderId(BigDecimal orderId);-->
- <select id="selectByOrderId" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- select oo.ORDER_LINE_SEQUENCE as "orderLineSequence",
- oo.LINE_ID as "lineId",
- rm.material_type_id as "materialTypeId",
- twr.weight_task_result_id as "weightTaskResultId"
- from omstruck_order oo
- join omstruck_order_material oom on oom.order_id = oo.order_id
- left join rms_material rm on oom.material_id = rm.material_id
- left join tmstruck_total_result ttr on oo.order_id = ttr.order_id
- left join tmstruck_weight_result twr on ttr.result_total_id = twr.result_total_id
- where oo.order_id = #{orderId}
- and rownum = 1
- order by twr.weight_task_result_id desc
- </select>
- <!-- 查询销售所有计皮实绩 -->
- <select id="getXSAllJiPiResult" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- ASO.SALE_NUMBER "saleNumber",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
- -- RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_POUND_NO "resultPoundNo",
- RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
- RS.SHIPPER_NAME "shipperName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_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_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- -- left join RMS_MATERIAL_STEEL RMS
- -- on OOM.MATERIAL_ID = RMS.MATERIAL_STEEL_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_SHIPPER RS
- on RS.SHIPPER_ID = ASO.SHIPPER_ID
- left join RMS_CONSIGNEE RCON
- on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
- where RESULT_TARE_WEIGHT_TIME is not null and OO.ORDER_TYPE in (1, 2)
- )
- <where>
- <if test="startDate!=null">
- to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <=
- to_date(to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="endDate!=null">
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=
- to_date(to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= "resultTareWeightTime"
- </if>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 查询销售计毛实绩 -->
- <select id="getXSAllJiMaoResult" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- ASO.SALE_NUMBER "saleNumber",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo",
- TWR.INSERT_UPDATE_REMARK "insertUpdateRemark",
- -- RMS.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
- RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
- RS.SHIPPER_NAME "shipperName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_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_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- -- left join RMS_MATERIAL_STEEL RMS
- -- on RMS.MATERIAL_STEEL_ID = OOM.MATERIAL_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_SHIPPER RS
- on RS.SHIPPER_ID = ASO.SHIPPER_ID
- left join RMS_CONSIGNEE RCON
- on RCON.CONSIGNEE_ID = ASO.RECEIVE_ID
- where RESULT_GROSS_WEIGHT_TIME is not null and OO.ORDER_TYPE in (1, 2)
- )
- <where>
- <if test="startDate!=null">
- to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <=
- to_date(to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="endDate!=null">
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=
- to_date(to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss')
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= "resultTareWeightTime"
- </if>
- <if test="saleNumber != null">
- <foreach collection="saleNumber" item="item" open="(" separator="or" close=")">
- "saleNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="orderMaterialNumber != null">
- and
- <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
- "orderMaterialNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="materialTheoreticalWeight != null">
- and
- <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
- "materialTheoreticalWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" 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="consigneeCompanyName != null">
- and
- <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
- "consigneeCompanyName" 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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 通过物资名称和物资规格查询物资ID -->
- <select id="getMaterialIdByMaterialNameAndSpe" parameterType="java.util.Map" resultType="java.lang.Integer">
- select RM.MATERIAL_ID
- from RMS_MATERIAL RM
- <where>
- <if test="materialName != null">
- RM.MATERIAL_NAME = #{materialName}
- </if>
- <if test="materialSpecification != null">
- and RM.MATERIAL_SPECIFICATION = #{materialSpecification}
- </if>
- <if test="materialModel != null">
- and RM.MATERIAL_MODEL = #{materialModel}
- </if>
- </where>
- </select>
- <!-- 通过物资Id和运输订单id 查询计量实绩Id -->
- <select id="getWeightIdBySQEAndOrderId" parameterType="java.util.Map" resultType="DECIMAL">
- select *
- from (
- select TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId"
- from OMSTRUCK_ORDER OO
- left join TMSTRUCK_TOTAL_RESULT TTR
- on OO.ORDER_ID = TTR.ORDER_ID
- left join TMSTRUCK_WEIGHT_RESULT TWR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- where OO.ORDER_ID = #{orderId}
- and TWR.RESULT_NET_WEIGHT is null
- order by TWR.TARE_SEGMENT_SQE
- )
- where rownum = 1
- </select>
- <!-- 通过运输订单号和查询订单Id 和物资ID (针对单拼) -->
- <select id="getOrderIdAndMaterialIdByOrderNum" parameterType="string" resultType="java.util.Map">
- select OO.ORDER_ID "orderId",
- OOM.MATERIAL_ID "materialId"
- from OMSTRUCK_ORDER OO
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- where OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 查询内转到钢材到异地库计量实绩 -->
- <select id="getSteelNzJiPiResult" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (
- SELECT TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- AROD.DAYPLAN_NO "dayplanNo",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- RM.MATERIAL_NAME "materialName",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- RM.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
- RS.SHIPPER_NAME "shipperName",
- RW.WAREHOUSE_NAME "warehouseName",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime"
- FROM TMSTRUCK_WEIGHT_RESULT TWR
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
- LEFT JOIN OMSTRUCK_ORDER OO
- ON OO.ORDER_ID = TTR.ORDER_ID
- LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
- ON AROD.DAYPLAN_ID = OO.ORDER_PLAN_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
- ON OO.ORDER_ID = OOM.ORDER_ID AND OOM.MATERIAL_ID = TWR.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = OOM.MATERIAL_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = AROD.SHIPPER_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC
- ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- WHERE OO.ORDER_TYPE = 4 AND TWR.RESULT_TARE_WEIGHT IS NOT NULL
- )
- <where>
- <if test="dayplanNo != null">
- <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
- "dayplanNo" like '%${item}%'
- </foreach>
- </if>
- <if test="orderNumber != null">
- and
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" 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="orderMaterialNumber != null">
- and
- <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
- "orderMaterialNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="materialTheoreticalWeight != null">
- and
- <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
- "materialTheoreticalWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="warehouseName != null">
- and
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
- "warehouseName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 查询内转钢材到异地库计毛实绩 -->
- <select id="getSteelNzJiMaoResult" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (
- SELECT TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- AROD.DAYPLAN_NO "dayplanNo",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- RM.MATERIAL_NAME "materialName",
- OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
- RM.MATERIAL_THEORETICAL_WEIGHT "materialTheoreticalWeight",
- RS.SHIPPER_NAME "shipperName",
- RW.WAREHOUSE_NAME "warehouseName",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- TWR.INSERT_UPDATE_REMARK "insertUpdateRemark"
- FROM TMSTRUCK_WEIGHT_RESULT TWR
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
- LEFT JOIN OMSTRUCK_ORDER OO
- ON OO.ORDER_ID = TTR.ORDER_ID
- LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
- ON AROD.DAYPLAN_ID = OO.ORDER_PLAN_ID
- LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
- ON OO.ORDER_ID = OOM.ORDER_ID AND OOM.MATERIAL_ID = TWR.MATERIAL_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = OOM.MATERIAL_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = AROD.SHIPPER_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_ID
- LEFT JOIN RMS_TRUCK_CALCULATE RTC
- ON RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- WHERE OO.ORDER_TYPE = 4 AND TWR.RESULT_GROSS_WEIGHT IS NOT NULL
- )
- <where>
- <if test="dayplanNo != null">
- <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
- "dayplanNo" like '%${item}%'
- </foreach>
- </if>
- <if test="orderNumber != null">
- and
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" 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="orderMaterialNumber != null">
- and
- <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
- "orderMaterialNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="materialTheoreticalWeight != null">
- and
- <foreach collection="materialTheoreticalWeight" item="item" open="(" separator="or" close=")">
- "materialTheoreticalWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="warehouseName != null">
- and
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
- "warehouseName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="insertUpdateRemark != null">
- and
- <foreach collection="insertUpdateRemark" item="item" open="(" separator="or" close=")">
- "insertUpdateRemark" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 查询国产矿进口矿计毛实绩 -->
- <select id="getImportedDomesticNzJiMaoResult" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (
- select TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- RS.SUPPLIER_NAME "supplierName",
- RCON.CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
- left join DIL_BATCH DB
- ON DB.BATCH_ID = APO.BATCH_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_SUPPLIER RS
- on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
- left join RMS_CONSIGNEE RCON
- on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
- where RESULT_GROSS_WEIGHT_TIME is not null
- and OO.ORDER_TYPE = 9
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="supplierName != null">
- and
- <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
- "supplierName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 查询国产矿进口矿计皮实绩 -->
- <select id="getImportedDomesticNzJiPiResult" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
- left join DIL_BATCH DB
- on DB.BATCH_ID = APO.BATCH_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- where RESULT_TARE_WEIGHT_TIME is not null
- and OO.ORDER_TYPE = 9
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 查询国产矿进口矿计皮实绩(老区-厂内) -->
- <select id="getImportedDomesticNzJiPi2Result" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo",
- TWR.RESULT_NET_WEIGHT "netWeight"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join amstruck_inward_plan aip
- on aip.plan_id = oo.order_plan_id
- left join amstruck_requirement_plan arp
- on arp.plan_id = aip.plan_id
- left join amstruck_inward_requirement air
- on air.requirement_id = arp.requirement_id
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = air.purchase_order_id
- left join DIL_BATCH DB
- on DB.BATCH_ID = APO.BATCH_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- where RESULT_TARE_WEIGHT_TIME is not null
- and OO.ORDER_TYPE in (10,20,15,16)
- <if test="userId!=null">
- AND air.INSERT_USERNAME =#{userId}
- </if>
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 查询国产矿进口矿计毛实绩(老区-厂内) -->
- <select id="getImportedDomesticNzJiMao2Result" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (
- select TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- RS.SUPPLIER_NAME "supplierName",
- rsr.shipper_name "consigneeCompanyName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMSTRUCK_INWARD_PLAN AIP
- on AIP.PLAN_ID = OO.ORDER_PLAN_ID
- left join AMSTRUCK_REQUIREMENT_PLAN ARP
- on ARP.PLAN_ID = AIP.PLAN_ID
- left join AMSTRUCK_INWARD_REQUIREMENT AIR
- on AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_ID
- left join DIL_BATCH DB
- ON DB.BATCH_ID = APO.BATCH_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- left join RMS_SUPPLIER RS
- on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
- left join rms_shipper rsr
- on rsr.shipper_id = APO.RECEIVE_UNIT_ID
- where RESULT_GROSS_WEIGHT_TIME is not null
- and OO.ORDER_TYPE in (10,20,15,16)
- <if test="userId !=null">
- AND AIR.INSERT_USERNAME = #{userId}
- </if>
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="supplierName != null">
- and
- <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
- "supplierName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 查询内转厂内物资计量实绩 -->
- <select id="getInFactoryJiLiangResult" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- RTC1.TRUCK_CALCULATE_NUMBER "grossCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME,TWR.RESULT_TARE_WEIGHT_TIME) "netWeightTime",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo",
- TWR.INSERT_UPDATE_REMARK "insertUpdateRemark",
- RC.CAPACITY_NUMBER || RM.MATERIAL_NAME "likeCon"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.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 RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join RMS_TRUCK_CALCULATE RTC1
- on RTC1.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- where TWR.RESULT_NET_WEIGHT IS NOT NULL
- and OO.ORDER_TYPE = #{orderTypee}
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_GROSS_WEIGHT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_GROSS_WEIGHT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
- </if>
- )
- <where>
- <if test="con != null">
- and "likeCon" like #{con}
- </if>
- <if test="materialName != null">
- and <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" 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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "netWeightTime" desc
- </if>
- </select>
- <!-- 根据运输订单Id获取计毛实绩-->
- <select id="getSporadicSuppliesJiMiaoResult" resultType="java.util.Map">
- select *
- from (
- select distinct
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- TWR.RESULT_NET_WEIGHT "netWeight",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_ID "orderId",
- OO.ORDER_STATUS "orderStatus"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMSTRUCK_SPORADIC_ORDER ASO
- on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID=OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID=OOM.MATERIAL_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- where RESULT_GROSS_WEIGHT_TIME is not null
- <if test="orderTypee != 100">
- AND OO.ORDER_TYPE = #{orderTypee}
- </if>
- <if test="orderTypee == 100">
- AND OO.ORDER_TYPE in (12, 13 ,14,19)
- </if>
- <if test="userId!=null">
- and ASO.INSERT_USERNAME=#{userId}
- </if>
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" 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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 根据运输订单Id获取零星物资计皮实绩-->
- <select id="getSporadicSuppliesJiPiResult" resultType="java.util.Map">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- APO.SPORADIC_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMSTRUCK_SPORADIC_ORDER APO
- on APO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- where RESULT_TARE_WEIGHT_TIME is not null
- and OO.ORDER_TYPE = 12
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 一车多趟获取计重实绩(零星物资) -->
- <select id="getFactorySkinSporadicWeight" resultType="java.util.Map">
- select *
- from (
- select distinct
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- ASO.SPORADIC_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_POUND_NO "resultPoundNo"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join AMSTRUCK_SPORADIC_ORDER ASO
- on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID = OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID = OOM.MATERIAL_ID
- where RESULT_TARE_WEIGHT_TIME is not null
- <if test="orderTypee != 100">
- AND OO.ORDER_TYPE = #{orderTypee}
- </if>
- <if test="orderTypee == 100">
- AND OO.ORDER_TYPE in (12, 13 ,14,19)
- </if>
- <if test="userId!=null">
- and ASO.INSERT_USERNAME=#{userId}
- </if>
- <if test="userIds!=null">
- and ASO.UPDATE_USERNAME=#{userIds}
- </if>
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 根据运输订单Id获取计毛实绩-->
- <select id="getFactorySkinSporadicJiMiao" resultType="java.util.Map">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- RM.MATERIAL_NAME "materialName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID=OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID=OOM.MATERIAL_ID
- left join AMSTRUCK_SPORADIC_ORDER ASO
- on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- where RESULT_GROSS_WEIGHT_TIME is not null and
- OO.ORDER_TYPE = 13
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" 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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 根据运输订单id获取计量实绩-->
- <select id="getFactorySporadicJiMiaoResult" resultType="java.util.Map">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
- TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- RM.MATERIAL_NAME "materialName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OOM.ORDER_ID=OO.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID=OOM.MATERIAL_ID
- left join AMSTRUCK_SPORADIC_ORDER ASO
- on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
- where RESULT_GROSS_WEIGHT_TIME is not null and
- OO.ORDER_TYPE in (15,16)
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" 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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeight != null">
- and
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
- "resultGrossWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultNetWeight != null">
- and
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
- "resultNetWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultGrossWeightTime != null">
- and
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
- "resultGrossWeightTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultGrossWeightTime" desc
- </if>
- </select>
- <!-- 零星计皮 -->
- <select id="getFactorySkinSporadicJIPi" parameterType="java.util.Map" resultType="java.util.Map">
- select *
- from (
- select
- TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
- ASO.SPORADIC_ORDER_NO "purchaseOrderNo",
- OO.ORDER_NUMBER "orderNumber",
- RC.CAPACITY_NUMBER "capacityNumber",
- RTC.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
- TWR.RESULT_TARE_WEIGHT "resultTareWeight",
- TWR.RESULT_TARE_WEIGHT_TIME "resultTareWeightTime",
- TWR.RESULT_POUND_NO "resultPoundNo",
- RM.MATERIAL_NAME "materialName"
- from TMSTRUCK_WEIGHT_RESULT TWR
- left join TMSTRUCK_TOTAL_RESULT TTR
- on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- left join OMSTRUCK_ORDER OO
- on TTR.ORDER_ID = OO.ORDER_ID
- left join OMSTRUCK_ORDER_MATERIAL OOM
- on OO.ORDER_ID=OOM.ORDER_ID
- left join RMS_MATERIAL RM
- on RM.MATERIAL_ID=OOM.MATERIAL_ID
- left join AMSTRUCK_SPORADIC_ORDER ASO
- on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
- left join RMS_CAPACITY RC
- on RC.CAPACITY_ID = OO.CAPACITY_ID
- left join RMS_TRUCK_CALCULATE RTC
- on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
- where RESULT_TARE_WEIGHT_TIME is not null
- and OO.ORDER_TYPE = 13
- )
- <where>
- <if test="purchaseOrderNo != null">
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" 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="truckCalculateNumber != null">
- and
- <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
- "truckCalculateNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeight != null">
- and
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
- "resultTareWeight" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- <if test="resultTareWeightTime != null">
- and
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
- "resultTareWeightTime" like '%${item}%'
- </foreach>
- </if>
- <if test="resultPoundNo != null">
- and
- <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
- "resultPoundNo" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultTareWeightTime" desc
- </if>
- </select>
- <!-- 通过总实绩ID查询订单类型 -->
- <select id="getOrderTypeByTotalId" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
- select OO.ORDER_TYPE
- from OMSTRUCK_ORDER OO
- where OO.ORDER_ID =
- (select TTR.ORDER_ID from TMSTRUCK_TOTAL_RESULT TTR where TTR.RESULT_TOTAL_ID = #{resultTotalId})
- </select>
- <select id="getOldWeightMes" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- select MAX(TWR.GROSS_SEGMENT_SQE) "maxGrossSqe",
- TTR.RESULT_TOTAL_ID "resultTotalId"
- from TMSTRUCK_TOTAL_RESULT TTR
- left join TMSTRUCK_WEIGHT_RESULT TWR on TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
- where TTR.ORDER_ID = #{orderId}
- group by TTR.RESULT_TOTAL_ID
- </select>
- <update id="updateLeaveFactorySqe" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
- update TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
- set TLFR.SEGMENT_SQE = #{segmentSqe}
- where TLFR.RESULT_TOTAL_ID = #{resultTotalId}
- </update>
- <select id="getOutBoundResult" resultType="java.math.BigDecimal" parameterType="java.math.BigDecimal">
- select WOR.RESULT_ID
- from WMSP_OUTBOUND_RESULT WOR
- WHERE WOR.BILL_LADING_ID = #{orderId}
- </select>
- <delete id="deleteWeightResult">
- delete
- from TMSTRUCK_WEIGHT_RESULT TWR
- where TWR.RESULT_TOTAL_ID = #{resultTotalId}
- and TWR.GROSS_SEGMENT_SQE = #{sqe}
- </delete>
- <delete id="deleteLoadResult">
- delete
- from TMSTRUCK_LOAD_RESULT TLR
- where TLR.RESULT_TOTAL_ID = #{resultTotalId}
- and TLR.SEGMENT_SQE = #{sqe}
- </delete>
- <delete id="deleteOutBoundResult">
- delete
- from WMSP_OUTBOUND_RESULT_MATERIAL
- where OUTBOUND_RESULT_ID = #{boundResultId}
- and MATERIAL_ID = #{deleteMaterialId}
- </delete>
- <insert id="addOutBoundResult" parameterType="map">
- insert into WMSP_OUTBOUND_RESULT_MATERIAL (RESULT_MATERIAL_ID, OUTBOUND_RESULT_ID, INSERT_USERNAME, INSERT_TIME,
- MATERIAL_ID, MATERIAL_NUMBER, STATUS)
- values (#{resultMaterialId}, #{boundResultId}, 'admin', SYSDATE,#{materialId}, #{materialNumber}, 1)
- </insert>
- <update id="updateOutBoundResult" parameterType="map">
- update WMSP_OUTBOUND_RESULT_MATERIAL
- set MATERIAL_NUMBER = #{materialNumber}
- where OUTBOUND_RESULT_ID = #{boundResultId} and MATERIAL_ID = #{materialId}
- </update>
- <select id="queryRoadId" resultType="java.math.BigDecimal">
- select oo.ORDER_LINE_SEQUENCE
- from OMSTRUCK_ORDER oo
- where oo.ORDER_ID=#{orderId}
- </select>
- <update id="updateToRoadId">
- update OMSTRUCK_ORDER oo
- set oo.ORDER_LINE_SEQUENCE=#{orderlinesequence}
- where oo.ORDER_ID=#{orderId}
- </update>
- <select id="selectByTotalId" resultMap="BaseResultMap">
- <include refid="select"/>
- WHERE RESULT_TOTAL_ID=#{resultTotalId}
- <if test="switch != null">
- AND RESULT_TARE_WEIGHT IS NOT NULL AND RESULT_NET_WEIGHT IS NULL
- </if>
- ORDER BY TARE_SEGMENT_SQE
- </select>
- <update id="copyQmsResult">
- update QMS_QUEUE_RESULT
- SET RESULT_TOTAL_ID=#{resultTotalId}
- WHERE RESULT_TOTAL_ID=#{resultTotalIdOld}
- </update>
- <update id="updateOmstruckStatus">
- update OMSTRUCK_ORDER
- SET ORDER_LINE_SEQUENCE=#{seq}
- WHERE ORDER_ID=#{orderId}
- </update>
- <update id="updateOrderStatus">
- update OMSTRUCK_ORDER
- SET ORDER_STATUS=#{orderStatus},
- INSERT_UPDATE_REMARK = '继续装修改运单状态,twrxml2880行'
- where ORDER_ID=#{orderId}
- </update>
- </mapper>
|