123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419 |
- <?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"
- 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
- <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}
- </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>
- </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"
- FROM
- ( SELECT AIR2.REQUIREMENT_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
- WHERE
- AIR.REQUIREMENT_STATUS = #{ requirementStatus }
- AND AIR.DELETED = 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 "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 !=3">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= AIR.INSERT_TIME
- </if>
- <if test="startDate != null 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>
- </mapper>
|