12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019 |
- <?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.OmstruckOrderMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrder">
- <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
- <result column="ORDER_PLAN_ID" jdbcType="DECIMAL" property="orderPlanId" />
- <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber" />
- <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
- <result column="ORDER_ISSUE_TIME" jdbcType="TIMESTAMP" property="orderIssueTime" />
- <result column="ORDER_RECEIVE_STATUS" jdbcType="DECIMAL" property="orderReceiveStatus" />
- <result column="ORDER_RECEIVE_REFUSE_TIME" jdbcType="TIMESTAMP" property="orderReceiveRefuseTime" />
- <result column="ORDER_COMMUNICATION_DURATION" jdbcType="DECIMAL" property="orderCommunicationDuration" />
- <result column="ORDER_STATUS" jdbcType="DECIMAL" property="orderStatus" />
- <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="ORDER_TYPE" jdbcType="DECIMAL" property="orderType" />
- <result column="ORDER_LINE_SEQUENCE" jdbcType="DECIMAL" property="orderLineSequence" />
- <result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
- <result column="ORDER_ENTRY_TIME" jdbcType="TIMESTAMP" property="orderEntryTime" />
- <result column="UNLOAD_POINT_ID" jdbcType="DECIMAL" property="unloadPointId" />
- <result column="DRIVER_CONFIRMATION" jdbcType="DECIMAL" property="driverConfirmation" />
- <result column="PRICE_ID" jdbcType="DECIMAL" property="priceId" />
- <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
- <result column="TRIP_ID" jdbcType="VARCHAR" property="tripId" />
- <result column="ORDER_PRINT_STATUS" jdbcType="DECIMAL" property="orderPrintStatus" />
- <result column="DRIVER_TEL" jdbcType="VARCHAR" property="driverTel" />
- <result column="OPTIONER_CODE" jdbcType="VARCHAR" property="optionerCode" />
- <result column="CAN_WORK" jdbcType="DECIMAL" property="canWork" />
- <result column="PRINTNUMBER" jdbcType="DECIMAL" property="printnumber" />
- <result column="CAPACITYIDS" jdbcType="VARCHAR" property="capacityids" />
- <result column="IS_ACCEPT" jdbcType="DECIMAL" property="isAccept" />
- </resultMap>
- <sql id="columns">
- ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
- ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE,
- ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID, DRIVER_CONFIRMATION,
- PRICE_ID, CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL, OPTIONER_CODE, CAN_WORK,
- PRINTNUMBER, CAPACITYIDS, IS_ACCEPT
- </sql>
- <sql id="columns_alias">
- t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS,
- t.ORDER_RECEIVE_REFUSE_TIME, t.ORDER_COMMUNICATION_DURATION, t.ORDER_STATUS, t.INSERT_USERNAME,
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
- t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME, t.UNLOAD_POINT_ID,
- t.DRIVER_CONFIRMATION, t.PRICE_ID, t.CARRIER_ID, t.TRIP_ID, t.ORDER_PRINT_STATUS,
- t.DRIVER_TEL, t.OPTIONER_CODE, t.CAN_WORK, t.PRINTNUMBER, t.CAPACITYIDS, t.IS_ACCEPT
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM OMSTRUCK_ORDER
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM OMSTRUCK_ORDER t
- </sql>
- <sql id="where">
- <where>
- <if test="orderId != null">
- and ORDER_ID = #{orderId}
- </if>
- <if test="orderPlanId != null">
- and ORDER_PLAN_ID = #{orderPlanId}
- </if>
- <if test="orderNumber != null and orderNumber != ''">
- and ORDER_NUMBER = #{orderNumber}
- </if>
- <if test="capacityId != null">
- and CAPACITY_ID = #{capacityId}
- </if>
- <if test="orderIssueTime != null">
- and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
- </if>
- <if test="orderReceiveStatus != null">
- and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
- </if>
- <if test="orderReceiveRefuseTime != null">
- and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
- </if>
- <if test="orderCommunicationDuration != null">
- and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
- </if>
- <if test="orderStatus != null">
- and ORDER_STATUS = #{orderStatus}
- </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="orderType != null">
- and ORDER_TYPE = #{orderType}
- </if>
- <if test="orderLineSequence != null">
- and ORDER_LINE_SEQUENCE = #{orderLineSequence}
- </if>
- <if test="lineId != null">
- and LINE_ID = #{lineId}
- </if>
- <if test="orderEntryTime != null">
- and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
- </if>
- <if test="unloadPointId != null">
- and UNLOAD_POINT_ID = #{unloadPointId}
- </if>
- <if test="driverConfirmation != null">
- and DRIVER_CONFIRMATION = #{driverConfirmation}
- </if>
- <if test="priceId != null">
- and PRICE_ID = #{priceId}
- </if>
- <if test="carrierId != null">
- and CARRIER_ID = #{carrierId}
- </if>
- <if test="tripId != null and tripId != ''">
- and TRIP_ID = #{tripId}
- </if>
- <if test="orderPrintStatus != null">
- and ORDER_PRINT_STATUS = #{orderPrintStatus}
- </if>
- <if test="driverTel != null and driverTel != ''">
- and DRIVER_TEL = #{driverTel}
- </if>
- <if test="optionerCode != null and optionerCode != ''">
- and OPTIONER_CODE = #{optionerCode}
- </if>
- <if test="canWork != null">
- and CAN_WORK = #{canWork}
- </if>
- <if test="printnumber != null">
- and PRINTNUMBER = #{printnumber}
- </if>
- <if test="capacityids != null and capacityids != ''">
- and CAPACITYIDS = #{capacityids}
- </if>
- <if test="isAccept != null">
- and IS_ACCEPT = #{isAccept}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="orderId != null">
- and ORDER_ID = #{orderId}
- </if>
- <if test="orderPlanId != null">
- and ORDER_PLAN_ID = #{orderPlanId}
- </if>
- <if test="orderNumber != null and orderNumber != ''">
- and ORDER_NUMBER LIKE '%${orderNumber}%'
- </if>
- <if test="capacityId != null">
- and CAPACITY_ID = #{capacityId}
- </if>
- <if test="orderIssueTime != null">
- and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
- </if>
- <if test="orderReceiveStatus != null">
- and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
- </if>
- <if test="orderReceiveRefuseTime != null">
- and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
- </if>
- <if test="orderCommunicationDuration != null">
- and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
- </if>
- <if test="orderStatus != null">
- and ORDER_STATUS = #{orderStatus}
- </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="orderType != null">
- and ORDER_TYPE = #{orderType}
- </if>
- <if test="orderLineSequence != null">
- and ORDER_LINE_SEQUENCE = #{orderLineSequence}
- </if>
- <if test="lineId != null">
- and LINE_ID = #{lineId}
- </if>
- <if test="orderEntryTime != null">
- and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
- </if>
- <if test="unloadPointId != null">
- and UNLOAD_POINT_ID = #{unloadPointId}
- </if>
- <if test="driverConfirmation != null">
- and DRIVER_CONFIRMATION = #{driverConfirmation}
- </if>
- <if test="priceId != null">
- and PRICE_ID = #{priceId}
- </if>
- <if test="carrierId != null">
- and CARRIER_ID = #{carrierId}
- </if>
- <if test="tripId != null and tripId != ''">
- and TRIP_ID LIKE '%${tripId}%'
- </if>
- <if test="orderPrintStatus != null">
- and ORDER_PRINT_STATUS = #{orderPrintStatus}
- </if>
- <if test="driverTel != null and driverTel != ''">
- and DRIVER_TEL LIKE '%${driverTel}%'
- </if>
- <if test="optionerCode != null and optionerCode != ''">
- and OPTIONER_CODE LIKE '%${optionerCode}%'
- </if>
- <if test="canWork != null">
- and CAN_WORK = #{canWork}
- </if>
- <if test="printnumber != null">
- and PRINTNUMBER = #{printnumber}
- </if>
- <if test="capacityids != null and capacityids != ''">
- and CAPACITYIDS LIKE '%${capacityids}%'
- </if>
- <if test="isAccept != null">
- and IS_ACCEPT = #{isAccept}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from OMSTRUCK_ORDER
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from OMSTRUCK_ORDER
- where 1!=1
- <if test="orderPlanId != null">
- or ORDER_PLAN_ID = #{orderPlanId}
- </if>
- <if test="orderNumber != null and orderNumber != ''">
- or ORDER_NUMBER = #{orderNumber}
- </if>
- <if test="capacityId != null">
- or CAPACITY_ID = #{capacityId}
- </if>
- <if test="orderIssueTime != null">
- or TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = '#{orderIssueTime}'
- </if>
- <if test="orderReceiveStatus != null">
- or ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
- </if>
- <if test="orderReceiveRefuseTime != null">
- or TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = '#{orderReceiveRefuseTime}'
- </if>
- <if test="orderCommunicationDuration != null">
- or ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
- </if>
- <if test="orderStatus != null">
- or ORDER_STATUS = #{orderStatus}
- </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="orderType != null">
- or ORDER_TYPE = #{orderType}
- </if>
- <if test="orderLineSequence != null">
- or ORDER_LINE_SEQUENCE = #{orderLineSequence}
- </if>
- <if test="lineId != null">
- or LINE_ID = #{lineId}
- </if>
- <if test="orderEntryTime != null">
- or TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = '#{orderEntryTime}'
- </if>
- <if test="unloadPointId != null">
- or UNLOAD_POINT_ID = #{unloadPointId}
- </if>
- <if test="driverConfirmation != null">
- or DRIVER_CONFIRMATION = #{driverConfirmation}
- </if>
- <if test="priceId != null">
- or PRICE_ID = #{priceId}
- </if>
- <if test="carrierId != null">
- or CARRIER_ID = #{carrierId}
- </if>
- <if test="tripId != null and tripId != ''">
- or TRIP_ID = #{tripId}
- </if>
- <if test="orderPrintStatus != null">
- or ORDER_PRINT_STATUS = #{orderPrintStatus}
- </if>
- <if test="driverTel != null and driverTel != ''">
- or DRIVER_TEL = #{driverTel}
- </if>
- <if test="optionerCode != null and optionerCode != ''">
- or OPTIONER_CODE = #{optionerCode}
- </if>
- <if test="canWork != null">
- or CAN_WORK = #{canWork}
- </if>
- <if test="printnumber != null">
- or PRINTNUMBER = #{printnumber}
- </if>
- <if test="capacityids != null and capacityids != ''">
- or CAPACITYIDS = #{capacityids}
- </if>
- <if test="isAccept != null">
- or IS_ACCEPT = #{isAccept}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
- insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
- CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
- ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
- ORDER_STATUS, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
- LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
- DRIVER_CONFIRMATION, PRICE_ID, CARRIER_ID,
- TRIP_ID, ORDER_PRINT_STATUS, DRIVER_TEL,
- OPTIONER_CODE, CAN_WORK, PRINTNUMBER,
- CAPACITYIDS, IS_ACCEPT)
- values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
- #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
- #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
- #{orderStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{deleted,jdbcType=DECIMAL}, #{orderType,jdbcType=DECIMAL}, #{orderLineSequence,jdbcType=DECIMAL},
- #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{unloadPointId,jdbcType=DECIMAL},
- #{driverConfirmation,jdbcType=DECIMAL}, #{priceId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
- #{tripId,jdbcType=VARCHAR}, #{orderPrintStatus,jdbcType=DECIMAL}, #{driverTel,jdbcType=VARCHAR},
- #{optionerCode,jdbcType=VARCHAR}, #{canWork,jdbcType=DECIMAL}, #{printnumber,jdbcType=DECIMAL},
- #{capacityids,jdbcType=VARCHAR}, #{isAccept,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
- insert into OMSTRUCK_ORDER
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderId != null">
- ORDER_ID,
- </if>
- <if test="orderPlanId != null">
- ORDER_PLAN_ID,
- </if>
- <if test="orderNumber != null">
- ORDER_NUMBER,
- </if>
- <if test="capacityId != null">
- CAPACITY_ID,
- </if>
- <if test="orderIssueTime != null">
- ORDER_ISSUE_TIME,
- </if>
- <if test="orderReceiveStatus != null">
- ORDER_RECEIVE_STATUS,
- </if>
- <if test="orderReceiveRefuseTime != null">
- ORDER_RECEIVE_REFUSE_TIME,
- </if>
- <if test="orderCommunicationDuration != null">
- ORDER_COMMUNICATION_DURATION,
- </if>
- <if test="orderStatus != null">
- ORDER_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="orderType != null">
- ORDER_TYPE,
- </if>
- <if test="orderLineSequence != null">
- ORDER_LINE_SEQUENCE,
- </if>
- <if test="lineId != null">
- LINE_ID,
- </if>
- <if test="orderEntryTime != null">
- ORDER_ENTRY_TIME,
- </if>
- <if test="unloadPointId != null">
- UNLOAD_POINT_ID,
- </if>
- <if test="driverConfirmation != null">
- DRIVER_CONFIRMATION,
- </if>
- <if test="priceId != null">
- PRICE_ID,
- </if>
- <if test="carrierId != null">
- CARRIER_ID,
- </if>
- <if test="tripId != null">
- TRIP_ID,
- </if>
- <if test="orderPrintStatus != null">
- ORDER_PRINT_STATUS,
- </if>
- <if test="driverTel != null">
- DRIVER_TEL,
- </if>
- <if test="optionerCode != null">
- OPTIONER_CODE,
- </if>
- <if test="canWork != null">
- CAN_WORK,
- </if>
- <if test="printnumber != null">
- PRINTNUMBER,
- </if>
- <if test="capacityids != null">
- CAPACITYIDS,
- </if>
- <if test="isAccept != null">
- IS_ACCEPT,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderId != null">
- #{orderId,jdbcType=DECIMAL},
- </if>
- <if test="orderPlanId != null">
- #{orderPlanId,jdbcType=DECIMAL},
- </if>
- <if test="orderNumber != null">
- #{orderNumber,jdbcType=VARCHAR},
- </if>
- <if test="capacityId != null">
- #{capacityId,jdbcType=DECIMAL},
- </if>
- <if test="orderIssueTime != null">
- #{orderIssueTime,jdbcType=TIMESTAMP},
- </if>
- <if test="orderReceiveStatus != null">
- #{orderReceiveStatus,jdbcType=DECIMAL},
- </if>
- <if test="orderReceiveRefuseTime != null">
- #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
- </if>
- <if test="orderCommunicationDuration != null">
- #{orderCommunicationDuration,jdbcType=DECIMAL},
- </if>
- <if test="orderStatus != null">
- #{orderStatus,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="orderType != null">
- #{orderType,jdbcType=DECIMAL},
- </if>
- <if test="orderLineSequence != null">
- #{orderLineSequence,jdbcType=DECIMAL},
- </if>
- <if test="lineId != null">
- #{lineId,jdbcType=DECIMAL},
- </if>
- <if test="orderEntryTime != null">
- #{orderEntryTime,jdbcType=TIMESTAMP},
- </if>
- <if test="unloadPointId != null">
- #{unloadPointId,jdbcType=DECIMAL},
- </if>
- <if test="driverConfirmation != null">
- #{driverConfirmation,jdbcType=DECIMAL},
- </if>
- <if test="priceId != null">
- #{priceId,jdbcType=DECIMAL},
- </if>
- <if test="carrierId != null">
- #{carrierId,jdbcType=DECIMAL},
- </if>
- <if test="tripId != null">
- #{tripId,jdbcType=VARCHAR},
- </if>
- <if test="orderPrintStatus != null">
- #{orderPrintStatus,jdbcType=DECIMAL},
- </if>
- <if test="driverTel != null">
- #{driverTel,jdbcType=VARCHAR},
- </if>
- <if test="optionerCode != null">
- #{optionerCode,jdbcType=VARCHAR},
- </if>
- <if test="canWork != null">
- #{canWork,jdbcType=DECIMAL},
- </if>
- <if test="printnumber != null">
- #{printnumber,jdbcType=DECIMAL},
- </if>
- <if test="capacityids != null">
- #{capacityids,jdbcType=VARCHAR},
- </if>
- <if test="isAccept != null">
- #{isAccept,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
- update OMSTRUCK_ORDER
- set ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
- ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
- CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
- ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
- ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
- ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
- ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
- ORDER_STATUS = #{orderStatus,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},
- ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
- ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
- LINE_ID = #{lineId,jdbcType=DECIMAL},
- ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
- UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
- DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL},
- PRICE_ID = #{priceId,jdbcType=DECIMAL},
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
- TRIP_ID = #{tripId,jdbcType=VARCHAR},
- ORDER_PRINT_STATUS = #{orderPrintStatus,jdbcType=DECIMAL},
- DRIVER_TEL = #{driverTel,jdbcType=VARCHAR},
- OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
- CAN_WORK = #{canWork,jdbcType=DECIMAL},
- PRINTNUMBER = #{printnumber,jdbcType=DECIMAL},
- CAPACITYIDS = #{capacityids,jdbcType=VARCHAR},
- IS_ACCEPT = #{isAccept,jdbcType=DECIMAL}
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
- update OMSTRUCK_ORDER
- <set>
- <if test="orderPlanId != null">
- ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
- </if>
- <if test="orderNumber != null">
- ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
- </if>
- <if test="capacityId != null">
- CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
- </if>
- <if test="orderIssueTime != null">
- ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
- </if>
- <if test="orderReceiveStatus != null">
- ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
- </if>
- <if test="orderReceiveRefuseTime != null">
- ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
- </if>
- <if test="orderCommunicationDuration != null">
- ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
- </if>
- <if test="orderStatus != null">
- ORDER_STATUS = #{orderStatus,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="orderType != null">
- ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
- </if>
- <if test="orderLineSequence != null">
- ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
- </if>
- <if test="lineId != null">
- LINE_ID = #{lineId,jdbcType=DECIMAL},
- </if>
- <if test="orderEntryTime != null">
- ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
- </if>
- <if test="unloadPointId != null">
- UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
- </if>
- <if test="driverConfirmation != null">
- DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL},
- </if>
- <if test="priceId != null">
- PRICE_ID = #{priceId,jdbcType=DECIMAL},
- </if>
- <if test="carrierId != null">
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
- </if>
- <if test="tripId != null">
- TRIP_ID = #{tripId,jdbcType=VARCHAR},
- </if>
- <if test="orderPrintStatus != null">
- ORDER_PRINT_STATUS = #{orderPrintStatus,jdbcType=DECIMAL},
- </if>
- <if test="driverTel != null">
- DRIVER_TEL = #{driverTel,jdbcType=VARCHAR},
- </if>
- <if test="optionerCode != null">
- OPTIONER_CODE = #{optionerCode,jdbcType=VARCHAR},
- </if>
- <if test="canWork != null">
- CAN_WORK = #{canWork,jdbcType=DECIMAL},
- </if>
- <if test="printnumber != null">
- PRINTNUMBER = #{printnumber,jdbcType=DECIMAL},
- </if>
- <if test="capacityids != null">
- CAPACITYIDS = #{capacityids,jdbcType=VARCHAR},
- </if>
- <if test="isAccept != null">
- IS_ACCEPT = #{isAccept,jdbcType=DECIMAL},
- </if>
- </set>
- where ORDER_ID = #{orderId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select" />
- where ORDER_ID = #{orderId,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 OMSTRUCK_ORDER
- (ORDER_ID,
- ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID,
- ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
- ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
- ORDER_STATUS, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
- LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
- DRIVER_CONFIRMATION, PRICE_ID,
- CARRIER_ID, TRIP_ID, ORDER_PRINT_STATUS,
- DRIVER_TEL, OPTIONER_CODE, CAN_WORK,
- PRINTNUMBER, CAPACITYIDS, IS_ACCEPT
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.orderId,jdbcType=DECIMAL},
- #{item.orderPlanId,jdbcType=DECIMAL}, #{item.orderNumber,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
- #{item.orderIssueTime,jdbcType=TIMESTAMP}, #{item.orderReceiveStatus,jdbcType=DECIMAL},
- #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{item.orderCommunicationDuration,jdbcType=DECIMAL},
- #{item.orderStatus,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.orderType,jdbcType=DECIMAL}, #{item.orderLineSequence,jdbcType=DECIMAL},
- #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.unloadPointId,jdbcType=DECIMAL},
- #{item.driverConfirmation,jdbcType=DECIMAL}, #{item.priceId,jdbcType=DECIMAL},
- #{item.carrierId,jdbcType=DECIMAL}, #{item.tripId,jdbcType=VARCHAR}, #{item.orderPrintStatus,jdbcType=DECIMAL},
- #{item.driverTel,jdbcType=VARCHAR}, #{item.optionerCode,jdbcType=VARCHAR}, #{item.canWork,jdbcType=DECIMAL},
- #{item.printnumber,jdbcType=DECIMAL}, #{item.capacityids,jdbcType=VARCHAR}, #{item.isAccept,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update OMSTRUCK_ORDER
- set
- ORDER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_PLAN_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPlanId,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNumber,jdbcType=VARCHAR}
- </foreach>
- ,CAPACITY_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_ISSUE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderIssueTime,jdbcType=TIMESTAMP}
- </foreach>
- ,ORDER_RECEIVE_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveStatus,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_RECEIVE_REFUSE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}
- </foreach>
- ,ORDER_COMMUNICATION_DURATION=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderCommunicationDuration,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderStatus,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETED=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_TYPE=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderType,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_LINE_SEQUENCE=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderLineSequence,jdbcType=DECIMAL}
- </foreach>
- ,LINE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
- </foreach>
- ,ORDER_ENTRY_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderEntryTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UNLOAD_POINT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.unloadPointId,jdbcType=DECIMAL}
- </foreach>
- ,DRIVER_CONFIRMATION=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.driverConfirmation,jdbcType=DECIMAL}
- </foreach>
- ,PRICE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
- </foreach>
- ,CARRIER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
- </foreach>
- ,TRIP_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.tripId,jdbcType=VARCHAR}
- </foreach>
- ,ORDER_PRINT_STATUS=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPrintStatus,jdbcType=DECIMAL}
- </foreach>
- ,DRIVER_TEL=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.driverTel,jdbcType=VARCHAR}
- </foreach>
- ,OPTIONER_CODE=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.optionerCode,jdbcType=VARCHAR}
- </foreach>
- ,CAN_WORK=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.canWork,jdbcType=DECIMAL}
- </foreach>
- ,PRINTNUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.printnumber,jdbcType=DECIMAL}
- </foreach>
- ,CAPACITYIDS=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityids,jdbcType=VARCHAR}
- </foreach>
- ,IS_ACCEPT=
- <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
- when #{item.orderId,jdbcType=DECIMAL} then #{item.isAccept,jdbcType=DECIMAL}
- </foreach>
- where ORDER_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.orderId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from OMSTRUCK_ORDER
- where ORDER_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="findCarNumberByOrderId" parameterType="DECIMAL" resultType="java.util.Map" >
- SELECT DISTINCT RC.CAPACITY_NUMBER AS "carNum",
- RCE.CARRIER_ABBREVIATION AS "forwarder"
- FROM AMS_SALE_ORDER_MATERIAL ASOM
- LEFT JOIN OMSTRUCK_ORDER OO
- ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_DISPATCH_SALE_ORDER ADSO
- ON ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN RMS_CARRIER RCE
- ON RCE.CARRIER_ID = ADSO.CARRIER_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- WHERE ASOM.SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId}
- AND OO.ORDER_TYPE = 1
- </select>
- <select id="findEntriesByOrderId" parameterType="DECIMAL" resultType="java.util.Map" >
- SELECT ASM.EAS_PRIMARY_ID AS "entryId"
- FROM AMS_SALE_ORDER_MATERIAL ASOM
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
- ON ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN AMS_SALE_MATERIAL ASM
- ON ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- WHERE ASOM.SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId}
- </select>
- <select id="finCarAndCarrierAndEntries" resultType="java.util.Map" parameterType="decimal">
- SELECT DISTINCT
- (case when
- RC.CAPACITY_NUMBER = '空白'
- then ' '
- WHEN RC.CAPACITY_NUMBER IS NULL
- then ' '
- else RC.CAPACITY_NUMBER
- END) AS "carNum",
- (case when ASO.SALE_ORDER_ISSELF_MENTION = '是'
- then '自提'
- else RCE.CARRIER_ABBREVIATION
- end) "forwarder",
- ASM.EAS_PRIMARY_ID AS "entryId"
- FROM AMS_SALE_ORDER_MATERIAL ASOM
- LEFT JOIN OMSTRUCK_ORDER OO
- ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
- ON ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN AMS_SALE_MATERIAL ASM
- ON ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- LEFT JOIN AMS_DISPATCH_SALE_ORDER ADSO
- ON ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN RMS_CARRIER RCE
- ON RCE.CARRIER_ID = ADSO.CARRIER_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID = OO.CAPACITY_ID
- LEFT JOIN AMS_SALE_ORDER ASO
- ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
- WHERE ASOM.SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId}
- and aso.SALE_TYPE = 1
- and ASM.SALE_MATERIAL_ID IS NOT NULL
- </select>
- <select id="selectOrderMes" resultType="java.math.BigDecimal" parameterType="java.math.BigDecimal">
- SELECT distinct oo.ORDER_ID FROM AMS_SALE_MATERIAL ASM
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM on ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM on ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN OMSTRUCK_ORDER OO ON OO.ORDER_PLAN_ID = ASOM.SALE_ORDER_MATERIAL_ID
- WHERE ASM.SALE_MATERIAL_ID = #{saleMaterialId}
- </select>
- <select id="selectOrderMaterialcount" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
- SELECT count(ASM.SALE_MATERIAL_ID) FROM OMSTRUCK_ORDER OO
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM
- ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM
- ON ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN AMS_SALE_MATERIAL ASM
- ON ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- WHERE OO.ORDER_ID = #{orderId}
- AND ASM.DELETED is null
- </select>
- <select id="selectOrderStatus" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
- SELECT oo.ORDER_STATUS FROM OMSTRUCK_ORDER OO
- WHERE OO.ORDER_ID = #{orderId}
- </select>
- <select id="getResultOrder" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
- SELECT count(TER.RESULT_ID) FROM TMSTRUCK_TOTAL_RESULT TTR
- LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
- ON TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- WHERE TTR.ORDER_ID = #{orderId}
- </select>
- <update id="updateOrderToMa">
- UPDATE OMSTRUCK_ORDER_MATERIAL OOM
- SET OOM.MATERIAL_PRIORITY = 71
- WHERE OOM.ORDER_ID = #{orderId}
- and OOM.MATERIAL_ID = #{materialId}
- </update>
- <update id="updateUnOrderToMa">
- UPDATE OMSTRUCK_ORDER_MATERIAL OOM
- SET OOM.MATERIAL_PRIORITY = null
- WHERE OOM.ORDER_ID = #{orderId}
- and OOM.MATERIAL_ID = #{materialId}
- </update>
- <select id="selecrCloseEntryMes" resultType="java.util.Map" parameterType="java.math.BigDecimal">
- SELECT distinct oo.ORDER_ID "orderId",ASOM.SALE_ORDER_MATERIAL_ID "saleOrderMaterialId",
- ASM.SALE_MATERIAL_ID "saleMaterialId"
- FROM AMS_SALE_MATERIAL ASM
- LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM on ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
- LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM on ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
- LEFT JOIN OMSTRUCK_ORDER OO ON OO.ORDER_PLAN_ID = ASOM.SALE_ORDER_MATERIAL_ID
- WHERE ASM.SALE_MATERIAL_ID = #{saleMaterialId}
- </select>
- <select id="selectOrderInfo" resultType="java.math.BigDecimal" >
- SELECT DISTINCT OO.ORDER_ID FROM OMSTRUCK_ORDER OO
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <update id="updateOOMRemark">
- UPDATE OMSTRUCK_ORDER_MATERIAL OOM
- SET OOM.MATERIAL_PRIORITY = null
- WHERE OOM.ORDER_ID = #{orderId}
- </update>
- <select id="findOrderDetailByCapacityNumber" resultType="java.util.Map">
- SELECT DISTINCT
- OO.order_ID "orderId",
- RC.CAPACITY_NUMBER "capacityNumber",
- OO.ORDER_NUMBER "orderNumber",
- OO.ORDER_TYPE "orderType"
- FROM
- OMSTRUCK_ORDER OO
- LEFT JOIN RMS_CAPACITY RC ON OO.CAPACITY_ID = RC.CAPACITY_ID
- WHERE
- RC.CAPACITY_NUMBER = #{capacityNumber}
- AND OO.order_status = 5
- </select>
- </mapper>
|