1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785 |
- <?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.lang.Short">
- 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.lang.Short" 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}
- )
- <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}
- )
- <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="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="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_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 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 = 10
- )
- <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="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",
- 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",
- 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 = 10
- )
- <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",
- 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",
- TWR.INSERT_UPDATE_REMARK "insertUpdateRemark"
- 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 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 = 11
- )
- <where>
- <if test="materialName != null">
- <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="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="getSporadicSuppliesJiMiaoResult" 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",
- 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 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="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
- 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 in (15,16)
- )
- <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>
- </mapper>
|