123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755 |
- <?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.TmsshipWaterQualityResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmsshipWaterQualityResult">
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
- <result column="TOTAL_RESULT_ID" jdbcType="DECIMAL" property="totalResultId"/>
- <result column="RESULT_PLANNED_DATE" jdbcType="TIMESTAMP" property="resultPlannedDate"/>
- <result column="RESULT_CARGO_RIGHTS_DATE" jdbcType="TIMESTAMP" property="resultCargoRightsDate"/>
- <result column="RESULT_SHIPMENT_RATIO" jdbcType="DECIMAL" property="resultShipmentRatio"/>
- <result column="RESULT_EMPTY_HEAVY_WATER_METER" jdbcType="DECIMAL" property="resultEmptyHeavyWaterMeter"/>
- <result column="RESULT_MOISTURE_CONTENT" jdbcType="DECIMAL" property="resultMoistureContent"/>
- <result column="RESULT_WATER_TONNAGE" jdbcType="DECIMAL" property="resultWaterTonnage"/>
- <result column="RESULT_INSPECTION_FEES" jdbcType="DECIMAL" property="resultInspectionFees"/>
- <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
- <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime"/>
- <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="RESULT_ES_DELIVERY_DATE" jdbcType="TIMESTAMP" property="resultEsDeliveryDate"/>
- <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
- </resultMap>
- <sql id="columns">
- RESULT_ID, TOTAL_RESULT_ID, RESULT_PLANNED_DATE, RESULT_CARGO_RIGHTS_DATE, RESULT_SHIPMENT_RATIO,
- RESULT_EMPTY_HEAVY_WATER_METER, RESULT_MOISTURE_CONTENT, RESULT_WATER_TONNAGE, RESULT_INSPECTION_FEES,
- DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, RESULT_ES_DELIVERY_DATE, DELETED
- </sql>
- <sql id="columns_alias">
- t.RESULT_ID, t.TOTAL_RESULT_ID, t.RESULT_PLANNED_DATE, t.RESULT_CARGO_RIGHTS_DATE,
- t.RESULT_SHIPMENT_RATIO, t.RESULT_EMPTY_HEAVY_WATER_METER, t.RESULT_MOISTURE_CONTENT,
- t.RESULT_WATER_TONNAGE, t.RESULT_INSPECTION_FEES, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME,
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.RESULT_ES_DELIVERY_DATE,
- t.DELETED
- </sql>
- <sql id="select">
- SELECT
- <include refid="columns"/>
- FROM TMSSHIP_WATER_QUALITY_RESULT
- </sql>
- <sql id="select_alias">
- SELECT
- <include refid="columns_alias"/>
- FROM TMSSHIP_WATER_QUALITY_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="totalResultId != null">
- and TOTAL_RESULT_ID = #{totalResultId}
- </if>
- <if test="resultPlannedDate != null">
- and TO_CHAR(RESULT_PLANNED_DATE,'yyyy-MM-dd') = #{resultPlannedDate}
- </if>
- <if test="resultCargoRightsDate != null">
- and TO_CHAR(RESULT_CARGO_RIGHTS_DATE,'yyyy-MM-dd') = #{resultCargoRightsDate}
- </if>
- <if test="resultShipmentRatio != null">
- and RESULT_SHIPMENT_RATIO = #{resultShipmentRatio}
- </if>
- <if test="resultEmptyHeavyWaterMeter != null">
- and RESULT_EMPTY_HEAVY_WATER_METER = #{resultEmptyHeavyWaterMeter}
- </if>
- <if test="resultMoistureContent != null">
- and RESULT_MOISTURE_CONTENT = #{resultMoistureContent}
- </if>
- <if test="resultWaterTonnage != null">
- and RESULT_WATER_TONNAGE = #{resultWaterTonnage}
- </if>
- <if test="resultInspectionFees != null">
- and RESULT_INSPECTION_FEES = #{resultInspectionFees}
- </if>
- <if test="deleteName != null and deleteName != ''">
- and DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null and deleteTime != ''">
- and DELETE_TIME = #{deleteTime}
- </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="resultEsDeliveryDate != null">
- and TO_CHAR(RESULT_ES_DELIVERY_DATE,'yyyy-MM-dd') = #{resultEsDeliveryDate}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="totalResultId != null">
- and TOTAL_RESULT_ID = #{totalResultId}
- </if>
- <if test="resultPlannedDate != null">
- and TO_CHAR(RESULT_PLANNED_DATE,'yyyy-MM-dd') = #{resultPlannedDate}
- </if>
- <if test="resultCargoRightsDate != null">
- and TO_CHAR(RESULT_CARGO_RIGHTS_DATE,'yyyy-MM-dd') = #{resultCargoRightsDate}
- </if>
- <if test="resultShipmentRatio != null">
- and RESULT_SHIPMENT_RATIO = #{resultShipmentRatio}
- </if>
- <if test="resultEmptyHeavyWaterMeter != null">
- and RESULT_EMPTY_HEAVY_WATER_METER = #{resultEmptyHeavyWaterMeter}
- </if>
- <if test="resultMoistureContent != null">
- and RESULT_MOISTURE_CONTENT = #{resultMoistureContent}
- </if>
- <if test="resultWaterTonnage != null">
- and RESULT_WATER_TONNAGE = #{resultWaterTonnage}
- </if>
- <if test="resultInspectionFees != null">
- and RESULT_INSPECTION_FEES = #{resultInspectionFees}
- </if>
- <if test="deleteName != null and deleteName != ''">
- and DELETE_NAME LIKE '%${deleteName}%'
- </if>
- <if test="deleteTime != null and deleteTime != ''">
- and DELETE_TIME LIKE '%${deleteTime}%'
- </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="resultEsDeliveryDate != null">
- and TO_CHAR(RESULT_ES_DELIVERY_DATE,'yyyy-MM-dd') = #{resultEsDeliveryDate}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete
- from TMSSHIP_WATER_QUALITY_RESULT
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from TMSSHIP_WATER_QUALITY_RESULT
- where 1!=1
- <if test="totalResultId != null">
- or TOTAL_RESULT_ID = #{totalResultId}
- </if>
- <if test="resultPlannedDate != null">
- or TO_CHAR(RESULT_PLANNED_DATE,'yyyy-MM-dd') = '#{resultPlannedDate}'
- </if>
- <if test="resultCargoRightsDate != null">
- or TO_CHAR(RESULT_CARGO_RIGHTS_DATE,'yyyy-MM-dd') = '#{resultCargoRightsDate}'
- </if>
- <if test="resultShipmentRatio != null">
- or RESULT_SHIPMENT_RATIO = #{resultShipmentRatio}
- </if>
- <if test="resultEmptyHeavyWaterMeter != null">
- or RESULT_EMPTY_HEAVY_WATER_METER = #{resultEmptyHeavyWaterMeter}
- </if>
- <if test="resultMoistureContent != null">
- or RESULT_MOISTURE_CONTENT = #{resultMoistureContent}
- </if>
- <if test="resultWaterTonnage != null">
- or RESULT_WATER_TONNAGE = #{resultWaterTonnage}
- </if>
- <if test="resultInspectionFees != null">
- or RESULT_INSPECTION_FEES = #{resultInspectionFees}
- </if>
- <if test="deleteName != null and deleteName != ''">
- or DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null and deleteTime != ''">
- or DELETE_TIME = #{deleteTime}
- </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="resultEsDeliveryDate != null">
- or TO_CHAR(RESULT_ES_DELIVERY_DATE,'yyyy-MM-dd') = '#{resultEsDeliveryDate}'
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmsshipWaterQualityResult">
- insert into TMSSHIP_WATER_QUALITY_RESULT (RESULT_ID, TOTAL_RESULT_ID, RESULT_PLANNED_DATE,
- RESULT_CARGO_RIGHTS_DATE, RESULT_SHIPMENT_RATIO,
- RESULT_EMPTY_HEAVY_WATER_METER, RESULT_MOISTURE_CONTENT,
- RESULT_WATER_TONNAGE, RESULT_INSPECTION_FEES,
- DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, RESULT_ES_DELIVERY_DATE,
- DELETED)
- values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL},
- #{resultPlannedDate,jdbcType=TIMESTAMP},
- #{resultCargoRightsDate,jdbcType=TIMESTAMP}, #{resultShipmentRatio,jdbcType=DECIMAL},
- #{resultEmptyHeavyWaterMeter,jdbcType=DECIMAL}, #{resultMoistureContent,jdbcType=DECIMAL},
- #{resultWaterTonnage,jdbcType=DECIMAL}, #{resultInspectionFees,jdbcType=DECIMAL},
- #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
- #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
- #{insertUpdateRemark,jdbcType=VARCHAR}, #{resultEsDeliveryDate,jdbcType=TIMESTAMP},
- #{deleted,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmsshipWaterQualityResult">
- insert into TMSSHIP_WATER_QUALITY_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- RESULT_ID,
- </if>
- <if test="totalResultId != null">
- TOTAL_RESULT_ID,
- </if>
- <if test="resultPlannedDate != null">
- RESULT_PLANNED_DATE,
- </if>
- <if test="resultCargoRightsDate != null">
- RESULT_CARGO_RIGHTS_DATE,
- </if>
- <if test="resultShipmentRatio != null">
- RESULT_SHIPMENT_RATIO,
- </if>
- <if test="resultEmptyHeavyWaterMeter != null">
- RESULT_EMPTY_HEAVY_WATER_METER,
- </if>
- <if test="resultMoistureContent != null">
- RESULT_MOISTURE_CONTENT,
- </if>
- <if test="resultWaterTonnage != null">
- RESULT_WATER_TONNAGE,
- </if>
- <if test="resultInspectionFees != null">
- RESULT_INSPECTION_FEES,
- </if>
- <if test="deleteName != null">
- DELETE_NAME,
- </if>
- <if test="deleteTime != null">
- DELETE_TIME,
- </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="resultEsDeliveryDate != null">
- RESULT_ES_DELIVERY_DATE,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- #{resultId,jdbcType=DECIMAL},
- </if>
- <if test="totalResultId != null">
- #{totalResultId,jdbcType=DECIMAL},
- </if>
- <if test="resultPlannedDate != null">
- #{resultPlannedDate,jdbcType=TIMESTAMP},
- </if>
- <if test="resultCargoRightsDate != null">
- #{resultCargoRightsDate,jdbcType=TIMESTAMP},
- </if>
- <if test="resultShipmentRatio != null">
- #{resultShipmentRatio,jdbcType=DECIMAL},
- </if>
- <if test="resultEmptyHeavyWaterMeter != null">
- #{resultEmptyHeavyWaterMeter,jdbcType=DECIMAL},
- </if>
- <if test="resultMoistureContent != null">
- #{resultMoistureContent,jdbcType=DECIMAL},
- </if>
- <if test="resultWaterTonnage != null">
- #{resultWaterTonnage,jdbcType=DECIMAL},
- </if>
- <if test="resultInspectionFees != null">
- #{resultInspectionFees,jdbcType=DECIMAL},
- </if>
- <if test="deleteName != null">
- #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- #{deleteTime,jdbcType=VARCHAR},
- </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="resultEsDeliveryDate != null">
- #{resultEsDeliveryDate,jdbcType=TIMESTAMP},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmsshipWaterQualityResult">
- update TMSSHIP_WATER_QUALITY_RESULT
- set TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
- RESULT_PLANNED_DATE = #{resultPlannedDate,jdbcType=TIMESTAMP},
- RESULT_CARGO_RIGHTS_DATE = #{resultCargoRightsDate,jdbcType=TIMESTAMP},
- RESULT_SHIPMENT_RATIO = #{resultShipmentRatio,jdbcType=DECIMAL},
- RESULT_EMPTY_HEAVY_WATER_METER = #{resultEmptyHeavyWaterMeter,jdbcType=DECIMAL},
- RESULT_MOISTURE_CONTENT = #{resultMoistureContent,jdbcType=DECIMAL},
- RESULT_WATER_TONNAGE = #{resultWaterTonnage,jdbcType=DECIMAL},
- RESULT_INSPECTION_FEES = #{resultInspectionFees,jdbcType=DECIMAL},
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
- 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},
- RESULT_ES_DELIVERY_DATE = #{resultEsDeliveryDate,jdbcType=TIMESTAMP},
- DELETED = #{deleted,jdbcType=DECIMAL}
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmsshipWaterQualityResult">
- update TMSSHIP_WATER_QUALITY_RESULT
- <set>
- <if test="totalResultId != null">
- TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
- </if>
- <if test="resultPlannedDate != null">
- RESULT_PLANNED_DATE = #{resultPlannedDate,jdbcType=TIMESTAMP},
- </if>
- <if test="resultCargoRightsDate != null">
- RESULT_CARGO_RIGHTS_DATE = #{resultCargoRightsDate,jdbcType=TIMESTAMP},
- </if>
- <if test="resultShipmentRatio != null">
- RESULT_SHIPMENT_RATIO = #{resultShipmentRatio,jdbcType=DECIMAL},
- </if>
- <if test="resultEmptyHeavyWaterMeter != null">
- RESULT_EMPTY_HEAVY_WATER_METER = #{resultEmptyHeavyWaterMeter,jdbcType=DECIMAL},
- </if>
- <if test="resultMoistureContent != null">
- RESULT_MOISTURE_CONTENT = #{resultMoistureContent,jdbcType=DECIMAL},
- </if>
- <if test="resultWaterTonnage != null">
- RESULT_WATER_TONNAGE = #{resultWaterTonnage,jdbcType=DECIMAL},
- </if>
- <if test="resultInspectionFees != null">
- RESULT_INSPECTION_FEES = #{resultInspectionFees,jdbcType=DECIMAL},
- </if>
- <if test="deleteName != null">
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
- </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="resultEsDeliveryDate != null">
- RESULT_ES_DELIVERY_DATE = #{resultEsDeliveryDate,jdbcType=TIMESTAMP},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- </set>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where RESULT_ID = #{resultId,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 TMSSHIP_WATER_QUALITY_RESULT
- (RESULT_ID,
- TOTAL_RESULT_ID, RESULT_PLANNED_DATE,
- RESULT_CARGO_RIGHTS_DATE, RESULT_SHIPMENT_RATIO,
- RESULT_EMPTY_HEAVY_WATER_METER, RESULT_MOISTURE_CONTENT,
- RESULT_WATER_TONNAGE, RESULT_INSPECTION_FEES,
- DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
- INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK,
- RESULT_ES_DELIVERY_DATE, DELETED
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.resultId,jdbcType=DECIMAL},
- #{item.totalResultId,jdbcType=DECIMAL}, #{item.resultPlannedDate,jdbcType=TIMESTAMP},
- #{item.resultCargoRightsDate,jdbcType=TIMESTAMP}, #{item.resultShipmentRatio,jdbcType=DECIMAL},
- #{item.resultEmptyHeavyWaterMeter,jdbcType=DECIMAL}, #{item.resultMoistureContent,jdbcType=DECIMAL},
- #{item.resultWaterTonnage,jdbcType=DECIMAL}, #{item.resultInspectionFees,jdbcType=DECIMAL},
- #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR},
- #{item.insertUsername,jdbcType=VARCHAR},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
- #{item.resultEsDeliveryDate,jdbcType=TIMESTAMP}, #{item.deleted,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSSHIP_WATER_QUALITY_RESULT
- set
- RESULT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- ,TOTAL_RESULT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_PLANNED_DATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPlannedDate,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_CARGO_RIGHTS_DATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCargoRightsDate,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_SHIPMENT_RATIO=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultShipmentRatio,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_EMPTY_HEAVY_WATER_METER=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEmptyHeavyWaterMeter,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_MOISTURE_CONTENT=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMoistureContent,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_WATER_TONNAGE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWaterTonnage,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_INSPECTION_FEES=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultInspectionFees,jdbcType=DECIMAL}
- </foreach>
- ,DELETE_NAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_ES_DELIVERY_DATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEsDeliveryDate,jdbcType=TIMESTAMP}
- </foreach>
- ,DELETED=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- where RESULT_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from TMSSHIP_WATER_QUALITY_RESULT
- where RESULT_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="selectMaxId" resultType="DECIMAL">
- SELECT MAX(RESULT_ID) + 1
- FROM TMSSHIP_WATER_QUALITY_RESULT
- </select>
- <!--查询所有水分质检作业-->
- <sql id="orderByInsertTime">
- <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="selectWaterQualityList" resultType="java.util.Map">
- SELECT * FROM (
- SELECT DISTINCT ttr.ORDER_ID as "orderId",
- twqr.INSERT_TIME as "insertTime",
- twqr.RESULT_ID as "resultId",
- rm.MATERIAL_NAME as "materialName",
- db.RESULT_FOREIGN_SHIP_NAME as "foreignShipName",
- rpo.PORT_NAME as "loadPort",
- twqr.RESULT_PLANNED_DATE as "planDate",
- twqr.RESULT_ES_DELIVERY_DATE as "expectNoticeDate",
- twqr.RESULT_CARGO_RIGHTS_DATE as "cargoDate",
- adn.PURCHASE_CONTRACT_MOISTURE as "purchaseContractMoisture",
- tlsr.RESULT_LOAD_SHIP_DATE as "loadTime",
- oic.INSTRUCTION_PLANNED_LOADING as "planWeight",
- rc.CAPACITY_NUMBER as "capacityName",
- tlsr.RESULT_ACTUAL_INSTALLATIONS as "realWeight",
- twqr.RESULT_EMPTY_HEAVY_WATER_METER as "waterGauge",
- twqr.RESULT_MOISTURE_CONTENT as "moistureContent",
- twqr.RESULT_WATER_TONNAGE as "waterWeight",
- twqr.RESULT_INSPECTION_FEES as "testFee",
- twqr.RESULT_SHIPMENT_RATIO as "loadRatio"
- FROM TMSSHIP_WATER_QUALITY_RESULT twqr
- LEFT JOIN TMSSHIP_TOTAL_RESULT ttr
- ON twqr.TOTAL_RESULT_ID = ttr.RESULT_ID
- LEFT JOIN OMSSHIP_INSTRUCTIONS_CAPACITY oic
- ON oic.INSTRUCTIONS_CAPACITY_ID = ttr.ORDER_ID
- LEFT JOIN OMSSHIP_SHIPMENT_INSTRUCTIONS osi
- ON oic.INSTRUCTIONS_ID = osi.SHIPMENT_INSTRUCTIONS_ID
- LEFT JOIN DIL_BATCH db
- ON osi.BATCH_ID = db.BATCH_ID
- LEFT JOIN RMS_MATERIAL rm
- ON db.MATERIAL_ID = rm.MATERIAL_ID
- LEFT JOIN RMS_CAPACITY rc
- ON rc.CAPACITY_ID = oic.CAPACITY_ID
- LEFT JOIN TMSSHIP_LOAD_SHIP_RESULT tlsr
- ON ttr.RESULT_ID = tlsr.TOTAL_RESULT_ID
- LEFT JOIN RMS_PORT rpo
- ON tlsr.ARRIVAL_PORT_ID = rpo.PORT_ID
- LEFT JOIN AMSSHIP_DELIVERY_NOTICE adn
- ON adn.BATCH_ID = db.BATCH_ID
- WHERE twqr.DELETED = 0)
- <where>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="," close=")">
- "materialName" in #{item}
- </foreach>
- </if>
- <if test="foreignShipName != null">
- and
- <foreach collection="foreignShipName" item="item" open="(" separator="," close=")">
- "foreignShipName" in #{item}
- </foreach>
- </if>
- <if test="loadPort != null">
- and
- <foreach collection="loadPort" item="item" open="(" separator="," close=")">
- "loadPort" in #{item}
- </foreach>
- </if>
- <if test="planDate != null">
- and
- <foreach collection="planDate" item="item" open="(" separator="," close=")">
- "planDate" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
- </foreach>
- </if>
- <if test="expectNoticeDate != null">
- and
- <foreach collection="expectNoticeDate" item="item" open="(" separator="," close=")">
- "expectNoticeDate" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
- </foreach>
- </if>
- <if test="cargoDate != null">
- and
- <foreach collection="cargoDate" item="item" open="(" separator="," close=")">
- "cargoDate" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
- </foreach>
- </if>
- <if test="purchaseContractMoisture != null">
- and
- <foreach collection="purchaseContractMoisture" item="item" open="(" separator="," close=")">
- "purchaseContractMoisture" in #{item}
- </foreach>
- </if>
- <if test="loadTime != null">
- and
- <foreach collection="loadTime" item="item" open="(" separator="," close=")">
- "loadTime" in to_date('${item}','yyyy-mm-dd hh24:mi:ss')
- </foreach>
- </if>
- <if test="planWeight != null">
- and
- <foreach collection="planWeight" item="item" open="(" separator="," close=")">
- "planWeight" in #{item}
- </foreach>
- </if>
- <if test="capacityName != null">
- and
- <foreach collection="capacityName" item="item" open="(" separator="," close=")">
- "capacityName" in #{item}
- </foreach>
- </if>
- <if test="realWeight != null">
- and
- <foreach collection="realWeight" item="item" open="(" separator="," close=")">
- "realWeight" in #{item}
- </foreach>
- </if>
- <if test="waterGauge != null">
- and
- <foreach collection="waterGauge" item="item" open="(" separator="," close=")">
- "waterGauge" in #{item}
- </foreach>
- </if>
- <if test="moistureContent != null">
- and
- <foreach collection="moistureContent" item="item" open="(" separator="," close=")">
- "moistureContent" in #{item}
- </foreach>
- </if>
- <if test="waterWeight != null">
- and
- <foreach collection="waterWeight" item="item" open="(" separator="," close=")">
- "waterWeight" in #{item}
- </foreach>
- </if>
- <if test="testFee != null">
- and
- <foreach collection="testFee" item="item" open="(" separator="," close=")">
- "testFee" in #{item}
- </foreach>
- </if>
- <if test="loadRatio != null">
- and
- <foreach collection="loadRatio" item="item" open="(" separator="," close=")">
- "loadRatio" in #{item}
- </foreach>
- </if>
- </where>
- <include refid="orderByInsertTime"></include>
- </select>
- <select id="selectWaterQuality" parameterType="DECIMAL" resultType="java.util.Map">
- SELECT RESULT_PLANNED_DATE "resultPlannedDate",
- RESULT_CARGO_RIGHTS_DATE "resultCargoRightsDate",
- RESULT_EMPTY_HEAVY_WATER_METER "resultEmptyHeavyWaterMeter",
- RESULT_WATER_TONNAGE "resultWaterTonnage",
- RESULT_INSPECTION_FEES "resultInspectionFees",
- RESULT_ES_DELIVERY_DATE "resultEsDeliveryDate"
- FROM TMSSHIP_WATER_QUALITY_RESULT
- WHERE RESULT_ID = #{resultId}
- </select>
- <select id="selectRealWeight" parameterType="DECIMAL" resultType="DECIMAL">
- SELECT RESULT_ACTUAL_INSTALLATIONS
- FROM TMSSHIP_LOAD_SHIP_RESULT
- WHERE TOTAL_RESULT_ID = #{totalResultId}
- </select>
- <select id="selectInstructionsId" parameterType="DECIMAL" resultType="DECIMAL">
- SELECT INSTRUCTIONS_ID
- FROM OMSSHIP_INSTRUCTIONS_CAPACITY
- WHERE INSTRUCTIONS_CAPACITY_ID = #{orderId}
- </select>
- <!-- 得到放货日期 -->
- <select id="getDeliveryDate" parameterType="DECIMAL" resultType="java.util.Date">
- SELECT ACTR.RESULT_DATE_OF_LOANS AS "resultEsDeliveryDate"
- FROM OMSSHIP_INSTRUCTIONS_CAPACITY OIC
- LEFT JOIN OMSSHIP_SHIPMENT_INSTRUCTIONS OSI
- ON OSI.SHIPMENT_INSTRUCTIONS_ID = OIC.INSTRUCTIONS_ID
- LEFT JOIN AMSSHIP_CARGO_TRANSFER_RESULT ACTR
- ON ACTR.BATCH_ID = OSI.BATCH_ID
- WHERE OIC.INSTRUCTIONS_CAPACITY_ID = #{orderId}
- </select>
- </mapper>
|