12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487 |
- <?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.AmstruckInwardRequirementMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmstruckInwardRequirement">
- <id column="REQUIREMENT_ID" jdbcType="DECIMAL" property="requirementId" />
- <result column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId" />
- <result column="REQUIREMENT_NUMBER" jdbcType="VARCHAR" property="requirementNumber" />
- <result column="REQUIREMENT_TYPE" jdbcType="VARCHAR" property="requirementType" />
- <result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId" />
- <result column="REQUIREMENT_TRUCK_TIME" jdbcType="TIMESTAMP" property="requirementTruckTime" />
- <result column="REQUIREMENT_SHIPPER_ID" jdbcType="DECIMAL" property="requirementShipperId" />
- <result column="REQUIREMENT_WORK_TYPE" jdbcType="VARCHAR" property="requirementWorkType" />
- <result column="REQUIREMENT_WORK_CONTENT" jdbcType="VARCHAR" property="requirementWorkContent" />
- <result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
- <result column="REQUIREMENT_WORK_ENVIRONMENT" jdbcType="VARCHAR" property="requirementWorkEnvironment" />
- <result column="REQUIREMENT_ESTIMATED_DURATION" jdbcType="DECIMAL" property="requirementEstimatedDuration" />
- <result column="REQUIREMENT_OVERLIMIT" jdbcType="VARCHAR" property="requirementOverlimit" />
- <result column="REQUIREMNT_UNIT_ID" jdbcType="DECIMAL" property="requiremntUnitId" />
- <result column="REQUIREMENT_STATUS" jdbcType="DECIMAL" property="requirementStatus" />
- <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="DELETED" jdbcType="DECIMAL" property="deleted" />
- <result column="REQUIREMENT_UNLOAD_UNIT_ID" jdbcType="DECIMAL" property="requirementUnloadUnitId" />
- <result column="REQUIREMENT_PLATFORM_ID" jdbcType="DECIMAL" property="requirementPlatformId" />
- <result column="REQUIREMENT_LINK_TYPE" jdbcType="DECIMAL" property="requirementLinkType" />
- <result column="DUE_DATE" jdbcType="TIMESTAMP" property="dueDate" />
- <result column="IS_MINERAL" jdbcType="VARCHAR" property="isMineral" />
- <result column="LOADING_REMARK" jdbcType="VARCHAR" property="loadingRemark" />
- </resultMap>
- <sql id="columns">
- REQUIREMENT_ID, PURCHASE_ORDER_ID, REQUIREMENT_NUMBER, REQUIREMENT_TYPE, CAPACITY_TYPE_ID,
- REQUIREMENT_TRUCK_TIME, REQUIREMENT_SHIPPER_ID, REQUIREMENT_WORK_TYPE, REQUIREMENT_WORK_CONTENT,
- LINE_ID, REQUIREMENT_WORK_ENVIRONMENT, REQUIREMENT_ESTIMATED_DURATION, REQUIREMENT_OVERLIMIT,
- REQUIREMNT_UNIT_ID, REQUIREMENT_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, REQUIREMENT_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID,
- REQUIREMENT_LINK_TYPE, DUE_DATE, IS_MINERAL, LOADING_REMARK
- </sql>
- <sql id="columns_alias">
- t.REQUIREMENT_ID, t.PURCHASE_ORDER_ID, t.REQUIREMENT_NUMBER, t.REQUIREMENT_TYPE,
- t.CAPACITY_TYPE_ID, t.REQUIREMENT_TRUCK_TIME, t.REQUIREMENT_SHIPPER_ID, t.REQUIREMENT_WORK_TYPE,
- t.REQUIREMENT_WORK_CONTENT, t.LINE_ID, t.REQUIREMENT_WORK_ENVIRONMENT, t.REQUIREMENT_ESTIMATED_DURATION,
- t.REQUIREMENT_OVERLIMIT, t.REQUIREMNT_UNIT_ID, t.REQUIREMENT_STATUS, t.INSERT_USERNAME,
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
- t.REQUIREMENT_UNLOAD_UNIT_ID, t.REQUIREMENT_PLATFORM_ID, t.REQUIREMENT_LINK_TYPE,
- t.DUE_DATE, t.IS_MINERAL, t.LOADING_REMARK
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM AMSTRUCK_INWARD_REQUIREMENT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM AMSTRUCK_INWARD_REQUIREMENT t
- </sql>
- <sql id="where">
- <where>
- <if test="requirementId != null">
- and REQUIREMENT_ID = #{requirementId}
- </if>
- <if test="purchaseOrderId != null">
- and PURCHASE_ORDER_ID = #{purchaseOrderId}
- </if>
- <if test="requirementNumber != null and requirementNumber != ''">
- and REQUIREMENT_NUMBER = #{requirementNumber}
- </if>
- <if test="requirementType != null and requirementType != ''">
- and REQUIREMENT_TYPE = #{requirementType}
- </if>
- <if test="capacityTypeId != null">
- and CAPACITY_TYPE_ID = #{capacityTypeId}
- </if>
- <if test="requirementTruckTime != null">
- and TO_CHAR(REQUIREMENT_TRUCK_TIME,'yyyy-MM-dd') = #{requirementTruckTime}
- </if>
- <if test="requirementShipperId != null">
- and REQUIREMENT_SHIPPER_ID = #{requirementShipperId}
- </if>
- <if test="requirementWorkType != null and requirementWorkType != ''">
- and REQUIREMENT_WORK_TYPE = #{requirementWorkType}
- </if>
- <if test="requirementWorkContent != null and requirementWorkContent != ''">
- and REQUIREMENT_WORK_CONTENT = #{requirementWorkContent}
- </if>
- <if test="lineId != null">
- and LINE_ID = #{lineId}
- </if>
- <if test="requirementWorkEnvironment != null and requirementWorkEnvironment != ''">
- and REQUIREMENT_WORK_ENVIRONMENT = #{requirementWorkEnvironment}
- </if>
- <if test="requirementEstimatedDuration != null">
- and REQUIREMENT_ESTIMATED_DURATION = #{requirementEstimatedDuration}
- </if>
- <if test="requirementOverlimit != null and requirementOverlimit != ''">
- and REQUIREMENT_OVERLIMIT = #{requirementOverlimit}
- </if>
- <if test="requiremntUnitId != null">
- and REQUIREMNT_UNIT_ID = #{requiremntUnitId}
- </if>
- <if test="requirementStatus != null">
- and REQUIREMENT_STATUS = #{requirementStatus}
- </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="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="requirementUnloadUnitId != null">
- and REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId}
- </if>
- <if test="requirementPlatformId != null">
- and REQUIREMENT_PLATFORM_ID = #{requirementPlatformId}
- </if>
- <if test="requirementLinkType != null">
- and REQUIREMENT_LINK_TYPE = #{requirementLinkType}
- </if>
- <if test="dueDate != null">
- and TO_CHAR(DUE_DATE,'yyyy-MM-dd') = #{dueDate}
- </if>
- <if test="isMineral != null and isMineral != ''">
- and IS_MINERAL = #{isMineral}
- </if>
- <if test="loadingRemark != null and loadingRemark != ''">
- and LOADING_REMARK = #{loadingRemark}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="requirementId != null">
- and REQUIREMENT_ID = #{requirementId}
- </if>
- <if test="purchaseOrderId != null">
- and PURCHASE_ORDER_ID = #{purchaseOrderId}
- </if>
- <if test="requirementNumber != null and requirementNumber != ''">
- and REQUIREMENT_NUMBER LIKE '%${requirementNumber}%'
- </if>
- <if test="requirementType != null and requirementType != ''">
- and REQUIREMENT_TYPE LIKE '%${requirementType}%'
- </if>
- <if test="capacityTypeId != null">
- and CAPACITY_TYPE_ID = #{capacityTypeId}
- </if>
- <if test="requirementTruckTime != null">
- and TO_CHAR(REQUIREMENT_TRUCK_TIME,'yyyy-MM-dd') = #{requirementTruckTime}
- </if>
- <if test="requirementShipperId != null">
- and REQUIREMENT_SHIPPER_ID = #{requirementShipperId}
- </if>
- <if test="requirementWorkType != null and requirementWorkType != ''">
- and REQUIREMENT_WORK_TYPE LIKE '%${requirementWorkType}%'
- </if>
- <if test="requirementWorkContent != null and requirementWorkContent != ''">
- and REQUIREMENT_WORK_CONTENT LIKE '%${requirementWorkContent}%'
- </if>
- <if test="lineId != null">
- and LINE_ID = #{lineId}
- </if>
- <if test="requirementWorkEnvironment != null and requirementWorkEnvironment != ''">
- and REQUIREMENT_WORK_ENVIRONMENT LIKE '%${requirementWorkEnvironment}%'
- </if>
- <if test="requirementEstimatedDuration != null">
- and REQUIREMENT_ESTIMATED_DURATION = #{requirementEstimatedDuration}
- </if>
- <if test="requirementOverlimit != null and requirementOverlimit != ''">
- and REQUIREMENT_OVERLIMIT LIKE '%${requirementOverlimit}%'
- </if>
- <if test="requiremntUnitId != null">
- and REQUIREMNT_UNIT_ID = #{requiremntUnitId}
- </if>
- <if test="requirementStatus != null">
- and REQUIREMENT_STATUS = #{requirementStatus}
- </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="deleted != null">
- and DELETED = #{deleted}
- </if>
- <if test="requirementUnloadUnitId != null">
- and REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId}
- </if>
- <if test="requirementPlatformId != null">
- and REQUIREMENT_PLATFORM_ID = #{requirementPlatformId}
- </if>
- <if test="requirementLinkType != null">
- and REQUIREMENT_LINK_TYPE = #{requirementLinkType}
- </if>
- <if test="dueDate != null">
- and TO_CHAR(DUE_DATE,'yyyy-MM-dd') = #{dueDate}
- </if>
- <if test="isMineral != null and isMineral != ''">
- and IS_MINERAL LIKE '%${isMineral}%'
- </if>
- <if test="loadingRemark != null and loadingRemark != ''">
- and LOADING_REMARK LIKE '%${loadingRemark}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="decimal">
- delete from AMSTRUCK_INWARD_REQUIREMENT
- where REQUIREMENT_ID = #{requirementId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from AMSTRUCK_INWARD_REQUIREMENT
- where 1!=1
- <if test="purchaseOrderId != null">
- or PURCHASE_ORDER_ID = #{purchaseOrderId}
- </if>
- <if test="requirementNumber != null and requirementNumber != ''">
- or REQUIREMENT_NUMBER = #{requirementNumber}
- </if>
- <if test="requirementType != null and requirementType != ''">
- or REQUIREMENT_TYPE = #{requirementType}
- </if>
- <if test="capacityTypeId != null">
- or CAPACITY_TYPE_ID = #{capacityTypeId}
- </if>
- <if test="requirementTruckTime != null">
- or TO_CHAR(REQUIREMENT_TRUCK_TIME,'yyyy-MM-dd') = '#{requirementTruckTime}'
- </if>
- <if test="requirementShipperId != null">
- or REQUIREMENT_SHIPPER_ID = #{requirementShipperId}
- </if>
- <if test="requirementWorkType != null and requirementWorkType != ''">
- or REQUIREMENT_WORK_TYPE = #{requirementWorkType}
- </if>
- <if test="requirementWorkContent != null and requirementWorkContent != ''">
- or REQUIREMENT_WORK_CONTENT = #{requirementWorkContent}
- </if>
- <if test="lineId != null">
- or LINE_ID = #{lineId}
- </if>
- <if test="requirementWorkEnvironment != null and requirementWorkEnvironment != ''">
- or REQUIREMENT_WORK_ENVIRONMENT = #{requirementWorkEnvironment}
- </if>
- <if test="requirementEstimatedDuration != null">
- or REQUIREMENT_ESTIMATED_DURATION = #{requirementEstimatedDuration}
- </if>
- <if test="requirementOverlimit != null and requirementOverlimit != ''">
- or REQUIREMENT_OVERLIMIT = #{requirementOverlimit}
- </if>
- <if test="requiremntUnitId != null">
- or REQUIREMNT_UNIT_ID = #{requiremntUnitId}
- </if>
- <if test="requirementStatus != null">
- or REQUIREMENT_STATUS = #{requirementStatus}
- </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="deleted != null">
- or DELETED = #{deleted}
- </if>
- <if test="requirementUnloadUnitId != null">
- or REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId}
- </if>
- <if test="requirementPlatformId != null">
- or REQUIREMENT_PLATFORM_ID = #{requirementPlatformId}
- </if>
- <if test="requirementLinkType != null">
- or REQUIREMENT_LINK_TYPE = #{requirementLinkType}
- </if>
- <if test="dueDate != null">
- or TO_CHAR(DUE_DATE,'yyyy-MM-dd') = '#{dueDate}'
- </if>
- <if test="isMineral != null and isMineral != ''">
- or IS_MINERAL = #{isMineral}
- </if>
- <if test="loadingRemark != null and loadingRemark != ''">
- or LOADING_REMARK = #{loadingRemark}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckInwardRequirement">
- insert into AMSTRUCK_INWARD_REQUIREMENT (REQUIREMENT_ID, PURCHASE_ORDER_ID, REQUIREMENT_NUMBER,
- REQUIREMENT_TYPE, CAPACITY_TYPE_ID, REQUIREMENT_TRUCK_TIME,
- REQUIREMENT_SHIPPER_ID, REQUIREMENT_WORK_TYPE,
- REQUIREMENT_WORK_CONTENT, LINE_ID, REQUIREMENT_WORK_ENVIRONMENT,
- REQUIREMENT_ESTIMATED_DURATION, REQUIREMENT_OVERLIMIT,
- REQUIREMNT_UNIT_ID, REQUIREMENT_STATUS, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETED, REQUIREMENT_UNLOAD_UNIT_ID,
- REQUIREMENT_PLATFORM_ID, REQUIREMENT_LINK_TYPE,
- DUE_DATE, IS_MINERAL)
- values (#{requirementId,jdbcType=DECIMAL}, #{purchaseOrderId,jdbcType=DECIMAL}, #{requirementNumber,jdbcType=VARCHAR},
- #{requirementType,jdbcType=VARCHAR}, #{capacityTypeId,jdbcType=DECIMAL}, #{requirementTruckTime,jdbcType=TIMESTAMP},
- #{requirementShipperId,jdbcType=DECIMAL}, #{requirementWorkType,jdbcType=VARCHAR},
- #{requirementWorkContent,jdbcType=VARCHAR}, #{lineId,jdbcType=DECIMAL}, #{requirementWorkEnvironment,jdbcType=VARCHAR},
- #{requirementEstimatedDuration,jdbcType=DECIMAL}, #{requirementOverlimit,jdbcType=VARCHAR},
- #{requiremntUnitId,jdbcType=DECIMAL}, #{requirementStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
- #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
- #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{requirementUnloadUnitId,jdbcType=DECIMAL},
- #{requirementPlatformId,jdbcType=DECIMAL}, #{requirementLinkType,jdbcType=DECIMAL},
- #{dueDate,jdbcType=TIMESTAMP}, #{isMineral,jdbcType=VARCHAR}, #{loadingRemark,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckInwardRequirement">
- insert into AMSTRUCK_INWARD_REQUIREMENT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="requirementId != null">
- REQUIREMENT_ID,
- </if>
- <if test="purchaseOrderId != null">
- PURCHASE_ORDER_ID,
- </if>
- <if test="requirementNumber != null">
- REQUIREMENT_NUMBER,
- </if>
- <if test="requirementType != null">
- REQUIREMENT_TYPE,
- </if>
- <if test="capacityTypeId != null">
- CAPACITY_TYPE_ID,
- </if>
- <if test="requirementTruckTime != null">
- REQUIREMENT_TRUCK_TIME,
- </if>
- <if test="requirementShipperId != null">
- REQUIREMENT_SHIPPER_ID,
- </if>
- <if test="requirementWorkType != null">
- REQUIREMENT_WORK_TYPE,
- </if>
- <if test="requirementWorkContent != null">
- REQUIREMENT_WORK_CONTENT,
- </if>
- <if test="lineId != null">
- LINE_ID,
- </if>
- <if test="requirementWorkEnvironment != null">
- REQUIREMENT_WORK_ENVIRONMENT,
- </if>
- <if test="requirementEstimatedDuration != null">
- REQUIREMENT_ESTIMATED_DURATION,
- </if>
- <if test="requirementOverlimit != null">
- REQUIREMENT_OVERLIMIT,
- </if>
- <if test="requiremntUnitId != null">
- REQUIREMNT_UNIT_ID,
- </if>
- <if test="requirementStatus != null">
- REQUIREMENT_STATUS,
- </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="deleted != null">
- DELETED,
- </if>
- <if test="requirementUnloadUnitId != null">
- REQUIREMENT_UNLOAD_UNIT_ID,
- </if>
- <if test="requirementPlatformId != null">
- REQUIREMENT_PLATFORM_ID,
- </if>
- <if test="requirementLinkType != null">
- REQUIREMENT_LINK_TYPE,
- </if>
- <if test="dueDate != null">
- DUE_DATE,
- </if>
- <if test="isMineral != null">
- IS_MINERAL,
- </if>
- <if test="loadingRemark != null">
- LOADING_REMARK,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="requirementId != null">
- #{requirementId,jdbcType=DECIMAL},
- </if>
- <if test="purchaseOrderId != null">
- #{purchaseOrderId,jdbcType=DECIMAL},
- </if>
- <if test="requirementNumber != null">
- #{requirementNumber,jdbcType=VARCHAR},
- </if>
- <if test="requirementType != null">
- #{requirementType,jdbcType=VARCHAR},
- </if>
- <if test="capacityTypeId != null">
- #{capacityTypeId,jdbcType=DECIMAL},
- </if>
- <if test="requirementTruckTime != null">
- #{requirementTruckTime,jdbcType=TIMESTAMP},
- </if>
- <if test="requirementShipperId != null">
- #{requirementShipperId,jdbcType=DECIMAL},
- </if>
- <if test="requirementWorkType != null">
- #{requirementWorkType,jdbcType=VARCHAR},
- </if>
- <if test="requirementWorkContent != null">
- #{requirementWorkContent,jdbcType=VARCHAR},
- </if>
- <if test="lineId != null">
- #{lineId,jdbcType=DECIMAL},
- </if>
- <if test="requirementWorkEnvironment != null">
- #{requirementWorkEnvironment,jdbcType=VARCHAR},
- </if>
- <if test="requirementEstimatedDuration != null">
- #{requirementEstimatedDuration,jdbcType=DECIMAL},
- </if>
- <if test="requirementOverlimit != null">
- #{requirementOverlimit,jdbcType=VARCHAR},
- </if>
- <if test="requiremntUnitId != null">
- #{requiremntUnitId,jdbcType=DECIMAL},
- </if>
- <if test="requirementStatus != null">
- #{requirementStatus,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="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="requirementUnloadUnitId != null">
- #{requirementUnloadUnitId,jdbcType=DECIMAL},
- </if>
- <if test="requirementPlatformId != null">
- #{requirementPlatformId,jdbcType=DECIMAL},
- </if>
- <if test="requirementLinkType != null">
- #{requirementLinkType,jdbcType=DECIMAL},
- </if>
- <if test="dueDate != null">
- #{dueDate,jdbcType=TIMESTAMP},
- </if>
- <if test="isMineral != null">
- #{isMineral,jdbcType=VARCHAR},
- </if>
- <if test="loadingRemark != null">
- #{loadingRemark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckInwardRequirement">
- update AMSTRUCK_INWARD_REQUIREMENT
- set PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
- REQUIREMENT_NUMBER = #{requirementNumber,jdbcType=VARCHAR},
- REQUIREMENT_TYPE = #{requirementType,jdbcType=VARCHAR},
- CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
- REQUIREMENT_TRUCK_TIME = #{requirementTruckTime,jdbcType=TIMESTAMP},
- REQUIREMENT_SHIPPER_ID = #{requirementShipperId,jdbcType=DECIMAL},
- REQUIREMENT_WORK_TYPE = #{requirementWorkType,jdbcType=VARCHAR},
- REQUIREMENT_WORK_CONTENT = #{requirementWorkContent,jdbcType=VARCHAR},
- LINE_ID = #{lineId,jdbcType=DECIMAL},
- REQUIREMENT_WORK_ENVIRONMENT = #{requirementWorkEnvironment,jdbcType=VARCHAR},
- REQUIREMENT_ESTIMATED_DURATION = #{requirementEstimatedDuration,jdbcType=DECIMAL},
- REQUIREMENT_OVERLIMIT = #{requirementOverlimit,jdbcType=VARCHAR},
- REQUIREMNT_UNIT_ID = #{requiremntUnitId,jdbcType=DECIMAL},
- REQUIREMENT_STATUS = #{requirementStatus,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},
- DELETED = #{deleted,jdbcType=DECIMAL},
- REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId,jdbcType=DECIMAL},
- REQUIREMENT_PLATFORM_ID = #{requirementPlatformId,jdbcType=DECIMAL},
- REQUIREMENT_LINK_TYPE = #{requirementLinkType,jdbcType=DECIMAL},
- DUE_DATE = #{dueDate,jdbcType=TIMESTAMP},
- IS_MINERAL = #{isMineral,jdbcType=VARCHAR},
- LOADING_REMARK = #{loadingRemark,jdbcType=VARCHAR}
- where REQUIREMENT_ID = #{requirementId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckInwardRequirement">
- update AMSTRUCK_INWARD_REQUIREMENT
- <set>
- <if test="purchaseOrderId != null">
- PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL},
- </if>
- <if test="requirementNumber != null">
- REQUIREMENT_NUMBER = #{requirementNumber,jdbcType=VARCHAR},
- </if>
- <if test="requirementType != null">
- REQUIREMENT_TYPE = #{requirementType,jdbcType=VARCHAR},
- </if>
- <if test="capacityTypeId != null">
- CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
- </if>
- <if test="requirementTruckTime != null">
- REQUIREMENT_TRUCK_TIME = #{requirementTruckTime,jdbcType=TIMESTAMP},
- </if>
- <if test="requirementShipperId != null">
- REQUIREMENT_SHIPPER_ID = #{requirementShipperId,jdbcType=DECIMAL},
- </if>
- <if test="requirementWorkType != null">
- REQUIREMENT_WORK_TYPE = #{requirementWorkType,jdbcType=VARCHAR},
- </if>
- <if test="requirementWorkContent != null">
- REQUIREMENT_WORK_CONTENT = #{requirementWorkContent,jdbcType=VARCHAR},
- </if>
- <if test="lineId != null">
- LINE_ID = #{lineId,jdbcType=DECIMAL},
- </if>
- <if test="requirementWorkEnvironment != null">
- REQUIREMENT_WORK_ENVIRONMENT = #{requirementWorkEnvironment,jdbcType=VARCHAR},
- </if>
- <if test="requirementEstimatedDuration != null">
- REQUIREMENT_ESTIMATED_DURATION = #{requirementEstimatedDuration,jdbcType=DECIMAL},
- </if>
- <if test="requirementOverlimit != null">
- REQUIREMENT_OVERLIMIT = #{requirementOverlimit,jdbcType=VARCHAR},
- </if>
- <if test="requiremntUnitId != null">
- REQUIREMNT_UNIT_ID = #{requiremntUnitId,jdbcType=DECIMAL},
- </if>
- <if test="requirementStatus != null">
- REQUIREMENT_STATUS = #{requirementStatus,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="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- <if test="requirementUnloadUnitId != null">
- REQUIREMENT_UNLOAD_UNIT_ID = #{requirementUnloadUnitId,jdbcType=DECIMAL},
- </if>
- <if test="requirementPlatformId != null">
- REQUIREMENT_PLATFORM_ID = #{requirementPlatformId,jdbcType=DECIMAL},
- </if>
- <if test="requirementLinkType != null">
- REQUIREMENT_LINK_TYPE = #{requirementLinkType,jdbcType=DECIMAL},
- </if>
- <if test="dueDate != null">
- DUE_DATE = #{dueDate,jdbcType=TIMESTAMP},
- </if>
- <if test="isMineral != null">
- IS_MINERAL = #{isMineral,jdbcType=VARCHAR},
- </if>
- <if test="loadingRemark != null">
- LOADING_REMARK = #{loadingRemark,jdbcType=VARCHAR},
- </if>
- </set>
- where REQUIREMENT_ID = #{requirementId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="decimal" resultMap="BaseResultMap">
- <include refid="select" />
- where REQUIREMENT_ID = #{requirementId,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 AMSTRUCK_INWARD_REQUIREMENT
- (REQUIREMENT_ID,
- PURCHASE_ORDER_ID, REQUIREMENT_NUMBER,
- REQUIREMENT_TYPE, CAPACITY_TYPE_ID,
- REQUIREMENT_TRUCK_TIME, REQUIREMENT_SHIPPER_ID,
- REQUIREMENT_WORK_TYPE, REQUIREMENT_WORK_CONTENT,
- LINE_ID, REQUIREMENT_WORK_ENVIRONMENT,
- REQUIREMENT_ESTIMATED_DURATION, REQUIREMENT_OVERLIMIT,
- REQUIREMNT_UNIT_ID, REQUIREMENT_STATUS,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETED,
- REQUIREMENT_UNLOAD_UNIT_ID, REQUIREMENT_PLATFORM_ID,
- REQUIREMENT_LINK_TYPE, DUE_DATE,
- IS_MINERAL)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.requirementId,jdbcType=DECIMAL},
- #{item.purchaseOrderId,jdbcType=DECIMAL}, #{item.requirementNumber,jdbcType=VARCHAR},
- #{item.requirementType,jdbcType=VARCHAR}, #{item.capacityTypeId,jdbcType=DECIMAL},
- #{item.requirementTruckTime,jdbcType=TIMESTAMP}, #{item.requirementShipperId,jdbcType=DECIMAL},
- #{item.requirementWorkType,jdbcType=VARCHAR}, #{item.requirementWorkContent,jdbcType=VARCHAR},
- #{item.lineId,jdbcType=DECIMAL}, #{item.requirementWorkEnvironment,jdbcType=VARCHAR},
- #{item.requirementEstimatedDuration,jdbcType=DECIMAL}, #{item.requirementOverlimit,jdbcType=VARCHAR},
- #{item.requiremntUnitId,jdbcType=DECIMAL}, #{item.requirementStatus,jdbcType=DECIMAL},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
- #{item.requirementUnloadUnitId,jdbcType=DECIMAL}, #{item.requirementPlatformId,jdbcType=DECIMAL},
- #{item.requirementLinkType,jdbcType=DECIMAL}, #{item.dueDate,jdbcType=TIMESTAMP},
- #{item.isMineral,jdbcType=VARCHAR},#{item.loadingRemark,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update AMSTRUCK_INWARD_REQUIREMENT
- set
- REQUIREMENT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementId,jdbcType=DECIMAL}
- </foreach>
- ,PURCHASE_ORDER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementNumber,jdbcType=VARCHAR}
- </foreach>
- ,REQUIREMENT_TYPE=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementType,jdbcType=VARCHAR}
- </foreach>
- ,CAPACITY_TYPE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.capacityTypeId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_TRUCK_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementTruckTime,jdbcType=TIMESTAMP}
- </foreach>
- ,REQUIREMENT_SHIPPER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementShipperId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_WORK_TYPE=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementWorkType,jdbcType=VARCHAR}
- </foreach>
- ,REQUIREMENT_WORK_CONTENT=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementWorkContent,jdbcType=VARCHAR}
- </foreach>
- ,LINE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_WORK_ENVIRONMENT=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementWorkEnvironment,jdbcType=VARCHAR}
- </foreach>
- ,REQUIREMENT_ESTIMATED_DURATION=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementEstimatedDuration,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_OVERLIMIT=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementOverlimit,jdbcType=VARCHAR}
- </foreach>
- ,REQUIREMNT_UNIT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requiremntUnitId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementStatus,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_UNLOAD_UNIT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementUnloadUnitId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_PLATFORM_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementPlatformId,jdbcType=DECIMAL}
- </foreach>
- ,REQUIREMENT_LINK_TYPE=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.requirementLinkType,jdbcType=DECIMAL}
- </foreach>
- ,DUE_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.dueDate,jdbcType=TIMESTAMP}
- </foreach>
- ,IS_MINERAL=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.isMineral,jdbcType=VARCHAR}
- </foreach>
- ,LOADING_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case REQUIREMENT_ID" separator=" ">
- when #{item.requirementId,jdbcType=DECIMAL} then #{item.loadingRemark,jdbcType=VARCHAR}
- </foreach>
- where REQUIREMENT_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.requirementId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from AMSTRUCK_INWARD_REQUIREMENT
- where REQUIREMENT_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 展示用车需求 -->
- <select id="getTruckRequirementList" resultType="java.util.Map" parameterType="java.util.Map">
- SELECT
- *
- FROM
- (
- SELECT
- AIR.REQUIREMENT_NUMBER AS "requirementNumber",
- AIR.REQUIREMENT_TYPE AS "requirementType",
- AIR.REQUIREMENT_TRUCK_TIME AS "requirementTruckTime",
- RTR.TRANS_RANGE_VALUE AS "rangeValue",
- AIR.REQUIREMENT_WORK_TYPE AS "requirementWorkType",
- AIR.REQUIREMENT_WORK_CONTENT AS "requirementWorkContent",
- AIR.REQUIREMENT_WORK_ENVIRONMENT AS "requirementWorkEnvironment",
- AIR.REQUIREMENT_ESTIMATED_DURATION AS "requirementEstimatedDuration",
- AIR.REQUIREMENT_OVERLIMIT AS "requirementOverlimit",
- AIR.LOADING_REMARK AS "loadingRemark",
- RS.SHIPPER_NAME AS "shipperName",
- AIR.INSERT_TIME AS "insertTime",
- AIR.DUE_DATE AS "dueDate",
- AIR.INSERT_USERNAME AS "insertUsername",
- AIR.REQUIREMENT_ID AS "requirementId",
- rw1.warehouse_name "unloadName",
- rw1.WAREHOUSE_ID "unloadId",
- rw2.warehouse_name "loadName",
- rw2.WAREHOUSE_ID "loadId",
- arm.material_weight "materialWeight",
- arm.material_count "materialCount",
- arm.MATERIAL_ID "materialId",
- rm.material_name || rm.material_specification || '(' || rm.material_model || ')' "materialName",
- AIR.INSERT_UPDATE_REMARK "Tel",
- RMT.MATERIAL_TYPE_NAME "materialTypeName",
- RS.SHIPPER_NAME || RM.MATERIAL_NAME || rw2.warehouse_name || rw1.warehouse_name || RMT.MATERIAL_TYPE_NAME "likeIndex",
- r_c_type.capacity_type_name "capacityTypeName",
- actp.price_value "priceValue"
- FROM
- AMSTRUCK_INWARD_REQUIREMENT AIR
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = AIR.REQUIREMENT_SHIPPER_ID
- LEFT JOIN amstruck_requirement_material arm ON air.requirement_id = arm.requirement_id
- LEFT JOIN rms_warehouse rw1 ON rw1.warehouse_id = arm.requirement_unload_unit_id
- LEFT JOIN rms_warehouse rw2 ON rw2.warehouse_id = arm.requirement_platform_id
- LEFT JOIN rms_material rm ON rm.material_id = arm.material_id
- LEFT JOIN amstruck_inward_requirement air ON air.requirement_id = arm.requirement_id
- LEFT JOIN RMS_TRANS_RANGE RTR ON RTR.TRANS_RANGE_ID = AIR.LINE_ID
- LEFT JOIN RMS_MATERIAL_TYPE RMT ON RMT.MATERIAL_TYPE_ID = RM.MATERIAL_TYPE_ID
- LEFT JOIN RMS_CAPACITY_TYPE r_c_type ON air.capacity_type_id = r_c_type.CAPACITY_TYPE_ID
- left join ams_contract_transport_price actp on actp.capacity_type_id = r_c_type.capacity_type_id
- WHERE
- AIR.DELETED = 0
- AND AIR.PURCHASE_ORDER_ID IS NULL
- AND nvl(ACTP.DELETED,0) = 0
- <if test="con !=null ">
- AND AIR.INSERT_USERNAME LIKE #{con}
- </if>
- <if test="requirementStatus ==0 ">
- AND AIR.REQUIREMENT_STATUS = 0
- </if>
- <if test="requirementStatus ==1 ">
- AND AIR.REQUIREMENT_STATUS in (1,2)
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= AIR.INSERT_TIME
- </if>
- )
- <where>
- <if test="index != null">
- and "likeIndex" like #{index} or "rangeValue" like #{index}
- </if>
- <if test="requirementType != null">
- and
- <foreach collection="requirementType" item="item" open="(" separator="or" close=")">
- "requirementType" 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="loadName != null">
- and
- <foreach collection="loadName" item="item" open="(" separator="or" close=")">
- "loadName" like '%${item}%'
- </foreach>
- </if>
- <if test="unloadName != null">
- and
- <foreach collection="unloadName" item="item" open="(" separator="or" close=")">
- "unloadName" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementTruckTime != null">
- and
- <foreach collection="requirementTruckTime" item="item" open="(" separator="or" close=")">
- "requirementTruckTime" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementWorkType != null">
- and
- <foreach collection="requirementWorkType" item="item" open="(" separator="or" close=")">
- "requirementWorkType" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementWorkContent != null">
- and
- <foreach collection="requirementWorkContent" item="item" open="(" separator="or" close=")">
- "requirementWorkContent" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementWorkEnvironment != null">
- and
- <foreach collection="requirementWorkEnvironment" item="item" open="(" separator="or" close=")">
- "requirementWorkEnvironment" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementEstimatedDuration != null">
- and
- <foreach collection="requirementEstimatedDuration" item="item" open="(" separator="or" close=")">
- "requirementEstimatedDuration" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementOverlimit != null">
- and
- <foreach collection="requirementOverlimit" item="item" open="(" separator="or" close=")">
- "requirementOverlimit" 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="dueDate != null">
- and
- <foreach collection="dueDate" item="item" open="(" separator="or" close=")">
- "dueDate" like '%${item}%'
- </foreach>
- </if>
- <if test="insertTime != null">
- and
- <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
- "insertTime" like '%${item}%'
- </foreach>
- </if>
- <if test="insertUsername != null">
- and
- <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
- "insertUsername" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityTypeName != null">
- and
- <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
- "capacityTypeName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <!-- 展示用车需求 -->
- <select id="getFinishTruckRequirementList" resultType="java.util.Map" parameterType="java.util.Map">
- SELECT
- *
- FROM
- (
- SELECT
- AIR.REQUIREMENT_NUMBER AS "requirementNumber",
- AIR.REQUIREMENT_TYPE AS "requirementType",
- RTR.TRANS_RANGE_VALUE AS "rangeValue",
- AIR.REQUIREMENT_TRUCK_TIME AS "requirementTruckTime",
- AIR.REQUIREMENT_WORK_TYPE AS "requirementWorkType",
- AIR.REQUIREMENT_WORK_CONTENT AS "requirementWorkContent",
- AIR.REQUIREMENT_WORK_ENVIRONMENT AS "requirementWorkEnvironment",
- AIR.REQUIREMENT_ESTIMATED_DURATION AS "requirementEstimatedDuration",
- AIR.REQUIREMENT_OVERLIMIT AS "requirementOverlimit",
- AIR.LOADING_REMARK AS "loadingRemark",
- RS.SHIPPER_NAME AS "shipperName",
- AIR.INSERT_TIME AS "insertTime",
- AIR.INSERT_USERNAME AS "insertUsername",
- AIR.REQUIREMENT_ID AS "requirementId",
- AIR.UPDATE_TIME AS "updateTime",
- AIR.DUE_DATE AS "dueDate",
- AIR.UPDATE_USERNAME AS "updateUserName",
- rw1.warehouse_name "unloadName",
- rw1.WAREHOUSE_ID "unloadId",
- rw2.warehouse_name "loadName",
- rw2.WAREHOUSE_ID "loadId",
- arm.material_weight "materialWeight",
- arm.material_count "materialCount",
- arm.MATERIAL_ID "materialId",
- rm.material_name || rm.material_specification || '(' || rm.material_model || ')' "materialName",
- AIR.INSERT_UPDATE_REMARK "Tel",
- actp.price_value "priceValue"
- FROM
- ( SELECT AIR2.REQUIREMENT_ID,AIR2.capacity_type_id FROM AMSTRUCK_INWARD_REQUIREMENT AIR2 LEFT JOIN AMSTRUCK_REQUIREMENT_PLAN ARP ON AIR2.REQUIREMENT_ID = ARP.REQUIREMENT_ID WHERE ARP.PLAN_ID IS NULL ) AIRP
- LEFT JOIN AMSTRUCK_INWARD_REQUIREMENT AIR ON AIR.REQUIREMENT_ID = AIRP.REQUIREMENT_ID
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = AIR.REQUIREMENT_SHIPPER_ID
- LEFT JOIN amstruck_requirement_material arm ON air.requirement_id = arm.requirement_id
- LEFT JOIN rms_warehouse rw1 ON rw1.warehouse_id = arm.requirement_unload_unit_id
- LEFT JOIN rms_warehouse rw2 ON rw2.warehouse_id = arm.requirement_platform_id
- LEFT JOIN rms_material rm ON rm.material_id = arm.material_id
- LEFT JOIN amstruck_inward_requirement air ON air.requirement_id = arm.requirement_id
- LEFT JOIN RMS_TRANS_RANGE RTR ON RTR.TRANS_RANGE_ID = AIR.LINE_ID
- LEFT JOIN RMS_CAPACITY_TYPE r_c_type ON AIRP.capacity_type_id = r_c_type.CAPACITY_TYPE_ID
- left join ams_contract_transport_price actp on actp.capacity_type_id =r_c_type.capacity_type_id
- WHERE
- AIR.REQUIREMENT_STATUS = #{ requirementStatus }
- AND AIR.DELETED = 0
- AND nvl(ACTP.DELETED,0) = 0
- <if test="con !=null ">
- AND AIR.INSERT_USERNAME LIKE #{con}
- </if>
- )
- <where>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="materialNumber != null">
- and
- <foreach collection="materialNumber" item="item" open="(" separator="or" close=")">
- "materialNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementNumber != null">
- and
- <foreach collection="requirementNumber" item="item" open="(" separator="or" close=")">
- "requirementNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementType != null">
- and
- <foreach collection="requirementType" item="item" open="(" separator="or" close=")">
- "requirementType" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityTypeName != null">
- and
- <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
- "capacityTypeName" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementTruckTime != null">
- and
- <foreach collection="requirementTruckTime" item="item" open="(" separator="or" close=")">
- "requirementTruckTime" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementWorkType != null">
- and
- <foreach collection="requirementWorkType" item="item" open="(" separator="or" close=")">
- "requirementWorkType" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementWorkContent != null">
- and
- <foreach collection="requirementWorkContent" item="item" open="(" separator="or" close=")">
- "requirementWorkContent" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementWorkEnvironment != null">
- and
- <foreach collection="requirementWorkEnvironment" item="item" open="(" separator="or" close=")">
- "requirementWorkEnvironment" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementEstimatedDuration != null">
- and
- <foreach collection="requirementEstimatedDuration" item="item" open="(" separator="or" close=")">
- "requirementEstimatedDuration" like '%${item}%'
- </foreach>
- </if>
- <if test="requirementOverlimit != null">
- and
- <foreach collection="requirementOverlimit" item="item" open="(" separator="or" close=")">
- "requirementOverlimit" 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="insertTime != null">
- and
- <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
- "insertTime" like '%${item}%'
- </foreach>
- </if>
- <if test="dueDate != null">
- and
- <foreach collection="dueDate" item="item" open="(" separator="or" close=")">
- "dueDate" like '%${item}%'
- </foreach>
- </if>
- <if test="insertUsername != null">
- and
- <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
- "insertUsername" like '%${item}%'
- </foreach>
- </if>
- <if test="updateTime != null">
- and
- <foreach collection="updateTime" item="item" open="(" separator="or" close=")">
- "updateTime" like '%${item}%'
- </foreach>
- </if>
- <if test="updateUsername != null">
- and
- <foreach collection="updateUsername" item="item" open="(" separator="or" close=")">
- "updateUsername" like '%${item}%'
- </foreach>
- </if>
- <if test="wareHouseName != null">
- and
- <foreach collection="wareHouseName" item="item" open="(" separator="or" close=")">
- "wareHouseName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- <if test="orderField == null ">
- order by "insertTime" desc
- </if>
- </sql>
- <select id="getMaterialNumber" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT ARM.MATERIAL_COUNT AS "materialNumber"
- FROM AMSTRUCK_REQUIREMENT_MATERIAL ARM
- </select>
- <select id="selectRequirement" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT APO.PURCHASE_ORDER_NO AS "purchaseOrderNo",
- APO.PURCHASE_ORDER_ID AS "purchaseOrderId",
- RM.MATERIAL_NAME AS "materialName",
- DB.RESULT_FOREIGN_SHIP_NAME AS "resultForeignShipName",
- RW.WAREHOUSE_NAME AS "wareHouseName",
- ARM.MATERIAL_WEIGHT AS "materialWeight",
- AIR.REQUIREMNT_UNIT_ID AS "requiremntUnitId",
- AIR.REQUIREMENT_UNLOAD_UNIT_ID AS "requirementUnloadUnitId",
- AIR.REQUIREMENT_TYPE AS "requirementType",
- AIR.CAPACITY_TYPE_ID AS "capacityTypeId",
- AIR.REQUIREMENT_TRUCK_TIME AS "requirementTruckTime",
- AIR.REQUIREMENT_SHIPPER_ID AS "requirementShipperId",
- AIR.REQUIREMENT_WORK_TYPE AS "requirementWorkType",
- AIR.REQUIREMENT_WORK_CONTENT AS "requirementWorkContent",
- AIR.REQUIREMENT_WORK_ENVIRONMENT AS "requirementWorkEnvironment",
- AIR.REQUIREMENT_ESTIMATED_DURATION AS "requirementEstimatedDuration",
- AIR.REQUIREMENT_OVERLIMIT AS "requirementOverlimit",
- RS.SHIPPER_NAME AS "receiveUnitName",
- RSR.SUPPLIER_NAME AS "sendUnitName",
- RWUL.WAREHOUSE_NAME AS "unWarehouseName"
- FROM AMSTRUCK_INWARD_REQUIREMENT AIR
- LEFT JOIN AMS_PURCHASE_ORDER APO
- ON APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = APO.RECEIVE_UNIT_ID
- LEFT JOIN RMS_SUPPLIER RSR
- ON RSR.SUPPLIER_ID = APO.RECEIVE_UNIT_ID
- LEFT JOIN DIL_BATCH DB
- ON APO.BATCH_ID = DB.BATCH_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = DB.MATERIAL_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = AIR.REQUIREMNT_UNIT_ID
- LEFT JOIN RMS_WAREHOUSE RWUL
- ON RWUL.WAREHOUSE_ID = AIR.REQUIREMENT_UNLOAD_UNIT_ID
- LEFT JOIN AMSTRUCK_REQUIREMENT_MATERIAL ARM
- ON ARM.REQUIREMENT_ID = AIR.REQUIREMENT_ID
- WHERE AIR.REQUIREMENT_ID = #{requirementId}
- </select>
- <!-- 查询批次和采购订单信息 -->
- <select id="getPurchaseIdByBatch" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT * FROM(
- SELECT DISTINCT APO.PURCHASE_ORDER_NO AS "purchaseOrderNo",
- APO.PURCHASE_ORDER_ID AS "purchaseOrderId",
- DB.RESULT_FOREIGN_SHIP_NAME AS "resultForeignShipName",
- RM.MATERIAL_NAME AS "materialName",
- DB.INSERT_TIME AS "insertTime",
- RS.SHIPPER_NAME "shipperName",
- RSR.SUPPLIER_NAME "supplierName"
- FROM (SELECT *
- FROM AMS_PURCHASE_ORDER APO
- LEFT JOIN AMSTRUCK_INWARD_REQUIREMENT AIR
- ON APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_ID
- WHERE AIR.PURCHASE_ORDER_ID IS NULL) APOIR
- JOIN DIL_BATCH DB
- ON DB.BATCH_ID = APOIR.BATCH_ID
- JOIN AMS_PURCHASE_ORDER APO
- ON APO.BATCH_ID = DB.BATCH_ID
- JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = APO.RECEIVE_UNIT_ID
- JOIN RMS_SUPPLIER RSR
- ON RSR.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
- JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = DB.MATERIAL_ID)
- <where>
- <if test="purchaseOrderNo != null">
- and
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="resultForeignShipName != null">
- and
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
- "resultForeignShipName" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="supplierName != null">
- and
- <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
- "supplierName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="getCapacityType" resultType="java.util.Map">
- SELECT RCT.CAPACITY_TYPE_ID AS "id",
- RCT.CAPACITY_TYPE_ID AS "value",
- RCT.CAPACITY_TYPE_NAME AS "label"
- FROM RMS_CAPACITY_TYPE RCT
- </select>
- <select id="getShipperUser" resultType="java.util.Map">
- SELECT RS.SHIPPER_ID AS "id",
- RS.SHIPPER_ID AS "value",
- RS.SHIPPER_NAME AS "label"
- FROM RMS_SHIPPER RS
- </select>
- <!-- 仓库模代框 -->
- <select id="getWareHouse" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT RW.WAREHOUSE_ID AS "wareHouseId",
- RW.WAREHOUSE_NAME AS "wareHouseName",
- rs.shipper_abbreviation as "shipperName",
- rs.shipper_company_branch as "companyBranchName",
- rs.shipper_branch_factory as "branchFactory"
- FROM RMS_WAREHOUSE RW
- left join rms_shipper rs
- on rs.shipper_id = rw.shipper_id
- <where>
- <if test="wareHouseName != null">
- and
- <foreach collection="wareHouseName" item="item" open="(" separator="or" close=")">
- "wareHouseName" 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="companyBranchName != null">
- and
- <foreach collection="companyBranchName" item="item" open="(" separator="or" close=")">
- "companyBranchName" like '%${item}%'
- </foreach>
- </if>
- <if test="branchFactory != null">
- and
- <foreach collection="branchFactory" item="item" open="(" separator="or" close=")">
- "branchFactory" like '%${item}%'
- </foreach>
- </if>
- </where>
- </select>
- <select id="getMaterialId" parameterType="DECIMAL" resultType="DECIMAL">
- SELECT DB.MATERIAL_ID AS "materialId"
- FROM AMS_PURCHASE_ORDER APO
- LEFT JOIN DIL_BATCH DB
- ON DB.BATCH_ID = APO.BATCH_ID
- WHERE APO.PURCHASE_ORDER_ID = #{purchaseOrderId}
- </select>
- <select id="getPurRequirementList" resultType="java.util.Map" parameterType="map">
- select * from (
- SELECT
- AIR.REQUIREMENT_ID "requirementId",
- AIP.PLAN_ID "planId",
- RTR.TRANS_RANGE_VALUE "rangeValue",
- APO.PURCHASE_ORDER_ID "purchaseOrderId",
- AIR.REQUIREMENT_NUMBER "requirementNo",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RS.SUPPLIER_NAME "supplierName",
- RC.CONSIGNEE_COMPANY_NAME "consigneeName",
- RW.WAREHOUSE_NAME "warehouseName",
- RW1.WAREHOUSE_NAME "loadPointName",
- rm.material_id "materialId",
- AIP.PLAN_STATUS "planStatus",
- RM.MATERIAL_NAME || RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "materialName",
- RCR.CARRIER_NAME "carrierName",
- AIP.PLAN_EABLE_STATUS "enable",
- AIP.PLAN_EABLE_STATUS "enable1",
- AIR.INSERT_TIME "insertTime",
- DB.RESULT_FOREIGN_SHIP_NAME "shipName",
- APO.PURCHASE_ORDER_NO||RS.SUPPLIER_NAME||RW.WAREHOUSE_NAME||RM.MATERIAL_NAME||DB.RESULT_FOREIGN_SHIP_NAME "likeCon"
- FROM AMSTRUCK_INWARD_REQUIREMENT AIR
- LEFT JOIN AMS_PURCHASE_ORDER APO
- ON APO.PURCHASE_ORDER_ID = AIR.PURCHASE_ORDER_ID
- LEFT JOIN RMS_SUPPLIER RS
- ON RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
- LEFT JOIN RMS_CONSIGNEE RC
- ON RC.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = AIR.REQUIREMENT_UNLOAD_UNIT_ID
- LEFT JOIN RMS_WAREHOUSE RW1
- ON RW1.WAREHOUSE_ID = AIR.REQUIREMENT_PLATFORM_ID
- LEFT JOIN AMSTRUCK_REQUIREMENT_MATERIAL ARM
- ON ARM.REQUIREMENT_ID = AIR.REQUIREMENT_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID = ARM.MATERIAL_ID
- LEFT JOIN AMSTRUCK_REQUIREMENT_PLAN ARP
- ON ARP.REQUIREMENT_ID = AIR.REQUIREMENT_ID
- LEFT JOIN AMSTRUCK_INWARD_PLAN AIP
- ON AIP.PLAN_ID = ARP.PLAN_ID
- LEFT JOIN RMS_CARRIER RCR
- ON RCR.CARRIER_ID = AIP.CARRIER_ID
- LEFT JOIN RMS_TRANS_RANGE RTR
- ON RTR.TRANS_RANGE_ID = AIR.LINE_ID
- LEFT JOIN DIL_BATCH DB
- ON DB.BATCH_ID = APO.BATCH_ID
- WHERE AIR.PURCHASE_ORDER_ID IS NOT NULL
- AND AIR.REQUIREMENT_STATUS = #{requirementStatus}
- AND AIR.DELETED = 0
- <if test="userId != null">
- and air.insert_username = #{userId}
- </if>
- <if test="planId != null">
- and AIP.PLAN_ID = #{planId}
- </if>
- <if test="carrierSsoId != null">
- and AIP.CARRIER_ID = (select rc.carrier_id from rms_carrier rc
- where rc.carrier_sso_id = #{carrierSsoId})
- </if>
- <if test="enableStatus != null">
- and AIP.PLAN_EABLE_STATUS = #{enableStatus}
- </if>
- <if test="planStatus != null">
- and AIP.PLAN_STATUS = #{planStatus}
- </if>
- <if test="oneDate != null and planStatus != 2 and planStatus != 3 ">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- </if>
- <if test="startDate != null and planStatus != 2 and planStatus != 3 ">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= AIR.INSERT_TIME
- </if>
- )
- <where>
- <if test="con != null">
- and "likeCon" like #{con}
- </if>
- <if test="requirementNo != null">
- and
- <foreach collection="requirementNo" item="item" open="(" separator="or" close=")">
- "requirementNo" like '%${item}%'
- </foreach>
- </if>
- <if test="purchaseOrderNo != null">
- and
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" 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="consigneeName != null">
- and
- <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
- "consigneeName" 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="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- <if test="carrierName != null">
- and
- <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
- "carrierName" like '%${item}%'
- </foreach>
- </if>
- <if test="insertTime != null">
- and
- <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
- "insertTime" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <select id="selectPurOrderId" resultType="java.math.BigDecimal" parameterType="java.lang.Integer">
- select AIR.PURCHASE_ORDER_ID from AMSTRUCK_INWARD_REQUIREMENT AIR
- WHERE AIR.REQUIREMENT_ID = #{requirementId}
- </select>
- <select id="getBilletRequirementList" resultType="java.util.Map">
- SELECT * FROM (
- SELECT
- AIR.REQUIREMENT_NUMBER AS "requirementNumber",
- AIR.REQUIREMENT_TYPE AS "requirementType",
- RTR.TRANS_RANGE_VALUE AS "rangeValue",
- RS.SHIPPER_NAME AS "shipperName",
- AIR.INSERT_TIME AS "insertTime",
- rw1.warehouse_name "unloadName",
- rw2.warehouse_name "loadName",
- arm.material_count "materialCount",
- rm.material_name "materialName",
- rm.material_specification "materialSpe",
- rm.MATERIAL_MODEL "materialModel",
- ARM.MATERIAL_LUNO "materialLuNo",
- AIR.REQUIREMENT_ID "requirementId"
- FROM
- AMSTRUCK_INWARD_REQUIREMENT AIR
- LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = AIR.REQUIREMENT_SHIPPER_ID
- LEFT JOIN amstruck_requirement_material arm ON air.requirement_id = arm.requirement_id
- LEFT JOIN rms_warehouse rw1 ON rw1.warehouse_id = arm.requirement_unload_unit_id
- LEFT JOIN rms_warehouse rw2 ON rw2.warehouse_id = arm.requirement_platform_id
- LEFT JOIN rms_material rm ON rm.material_id = arm.material_id
- LEFT JOIN amstruck_inward_requirement air ON air.requirement_id = arm.requirement_id
- LEFT JOIN RMS_TRANS_RANGE RTR ON RTR.TRANS_RANGE_ID = AIR.LINE_ID
- LEFT JOIN RMS_MATERIAL_TYPE RMT ON RMT.MATERIAL_TYPE_ID = RM.MATERIAL_TYPE_ID
- WHERE
- AIR.DELETED = 0
- AND AIR.PURCHASE_ORDER_ID IS NULL
- AND ARM.MATERIAL_LUNO IS NOT NULL
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= AIR.INSERT_TIME
- </if>
- )
- </select>
- <update id="closeOrderByRequirementId" parameterType="decimal">
- update OMSTRUCK_ORDER OO
- set oo.ORDER_STATUS = 7,
- oo.INSERT_UPDATE_REMARK = '提前关闭运单'
- where
- OO.ORDER_STATUS = 4
- AND OO.ORDER_TYPE = 11
- AND oo.ORDER_PLAN_ID =
- (SELECT ARP.PLAN_ID FROM AMSTRUCK_REQUIREMENT_PLAN ARP
- WHERE ARP.REQUIREMENT_ID = #{requirementId}
- )
- </update>
- </mapper>
|