123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790 |
- <?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.TmstruckTimeTaskResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckTimeTaskResult">
- <id column="TIME_TASK_RESULT_ID" jdbcType="DECIMAL" property="timeTaskResultId" />
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
- <result column="RESULT_VALUE" jdbcType="DECIMAL" property="resultValue" />
- <result column="RESULT_UOM_ID" jdbcType="DECIMAL" property="resultUomId" />
- <result column="RESULT_TIME_TYPE" jdbcType="DECIMAL" property="resultTimeType" />
- <result column="RESULT_TIME" jdbcType="TIMESTAMP" property="resultTime" />
- <result column="RESULT_START_NODE_ID" jdbcType="DECIMAL" property="resultStartNodeId" />
- <result column="RESULT_START_LONGITUDE_VAL" jdbcType="VARCHAR" property="resultStartLongitudeVal" />
- <result column="RESULT_START_LATITUDE_VAL" jdbcType="VARCHAR" property="resultStartLatitudeVal" />
- <result column="RESULT_END_NODE_ID" jdbcType="DECIMAL" property="resultEndNodeId" />
- <result column="RESULT_END_LONGITUDE_VAL" jdbcType="VARCHAR" property="resultEndLongitudeVal" />
- <result column="RESULT_END_LATITUDE_VAL" jdbcType="VARCHAR" property="resultEndLatitudeVal" />
- <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo" />
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
- <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
- <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
- <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
- </resultMap>
- <sql id="columns">
- TIME_TASK_RESULT_ID, RESULT_TOTAL_ID, RESULT_VALUE, RESULT_UOM_ID, RESULT_TIME_TYPE,
- RESULT_TIME, RESULT_START_NODE_ID, RESULT_START_LONGITUDE_VAL, RESULT_START_LATITUDE_VAL,
- RESULT_END_NODE_ID, RESULT_END_LONGITUDE_VAL, RESULT_END_LATITUDE_VAL, RESULT_MEMO,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETE_NAME, DELETE_TIME
- </sql>
- <sql id="columns_alias">
- t.TIME_TASK_RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_VALUE, t.RESULT_UOM_ID, t.RESULT_TIME_TYPE,
- t.RESULT_TIME, t.RESULT_START_NODE_ID, t.RESULT_START_LONGITUDE_VAL, t.RESULT_START_LATITUDE_VAL,
- t.RESULT_END_NODE_ID, t.RESULT_END_LONGITUDE_VAL, t.RESULT_END_LATITUDE_VAL, t.RESULT_MEMO,
- t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
- t.DELETE_NAME, t.DELETE_TIME
- </sql>
- <sql id="select">
- SELECT <include refid="columns"/> FROM TMSTRUCK_TIME_TASK_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias"/> FROM TMSTRUCK_TIME_TASK_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="timeTaskResultId != null">
- and TIME_TASK_RESULT_ID = #{timeTaskResultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="resultValue != null">
- and RESULT_VALUE = #{resultValue}
- </if>
- <if test="resultUomId != null">
- and RESULT_UOM_ID = #{resultUomId}
- </if>
- <if test="resultTimeType != null">
- and RESULT_TIME_TYPE = #{resultTimeType}
- </if>
- <if test="resultTime != null">
- and TO_CHAR(RESULT_TIME,'yyyy-MM-dd') = #{resultTime}
- </if>
- <if test="resultStartNodeId != null">
- and RESULT_START_NODE_ID = #{resultStartNodeId}
- </if>
- <if test="resultStartLongitudeVal != null and resultStartLongitudeVal != ''">
- and RESULT_START_LONGITUDE_VAL = #{resultStartLongitudeVal}
- </if>
- <if test="resultStartLatitudeVal != null and resultStartLatitudeVal != ''">
- and RESULT_START_LATITUDE_VAL = #{resultStartLatitudeVal}
- </if>
- <if test="resultEndNodeId != null">
- and RESULT_END_NODE_ID = #{resultEndNodeId}
- </if>
- <if test="resultEndLongitudeVal != null and resultEndLongitudeVal != ''">
- and RESULT_END_LONGITUDE_VAL = #{resultEndLongitudeVal}
- </if>
- <if test="resultEndLatitudeVal != null and resultEndLatitudeVal != ''">
- and RESULT_END_LATITUDE_VAL = #{resultEndLatitudeVal}
- </if>
- <if test="resultMemo != null and resultMemo != ''">
- and RESULT_MEMO = #{resultMemo}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleteName != null and deleteName != ''">
- and DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null">
- and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="timeTaskResultId != null">
- and TIME_TASK_RESULT_ID = #{timeTaskResultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="resultValue != null">
- and RESULT_VALUE = #{resultValue}
- </if>
- <if test="resultUomId != null">
- and RESULT_UOM_ID = #{resultUomId}
- </if>
- <if test="resultTimeType != null">
- and RESULT_TIME_TYPE = #{resultTimeType}
- </if>
- <if test="resultTime != null">
- and TO_CHAR(RESULT_TIME,'yyyy-MM-dd') = #{resultTime}
- </if>
- <if test="resultStartNodeId != null">
- and RESULT_START_NODE_ID = #{resultStartNodeId}
- </if>
- <if test="resultStartLongitudeVal != null and resultStartLongitudeVal != ''">
- and RESULT_START_LONGITUDE_VAL LIKE '%${resultStartLongitudeVal}%'
- </if>
- <if test="resultStartLatitudeVal != null and resultStartLatitudeVal != ''">
- and RESULT_START_LATITUDE_VAL LIKE '%${resultStartLatitudeVal}%'
- </if>
- <if test="resultEndNodeId != null">
- and RESULT_END_NODE_ID = #{resultEndNodeId}
- </if>
- <if test="resultEndLongitudeVal != null and resultEndLongitudeVal != ''">
- and RESULT_END_LONGITUDE_VAL LIKE '%${resultEndLongitudeVal}%'
- </if>
- <if test="resultEndLatitudeVal != null and resultEndLatitudeVal != ''">
- and RESULT_END_LATITUDE_VAL LIKE '%${resultEndLatitudeVal}%'
- </if>
- <if test="resultMemo != null and resultMemo != ''">
- and RESULT_MEMO LIKE '%${resultMemo}%'
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- and INSERT_USERNAME LIKE '%${insertUsername}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- and UPDATE_USERNAME LIKE '%${updateUsername}%'
- </if>
- <if test="updateTime != null">
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
- </if>
- <if test="deleteName != null and deleteName != ''">
- and DELETE_NAME LIKE '%${deleteName}%'
- </if>
- <if test="deleteTime != null">
- and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
- delete from TMSTRUCK_TIME_TASK_RESULT
- where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from TMSTRUCK_TIME_TASK_RESULT
- where 1!=1
- <if test="resultTotalId != null">
- or RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="resultValue != null">
- or RESULT_VALUE = #{resultValue}
- </if>
- <if test="resultUomId != null">
- or RESULT_UOM_ID = #{resultUomId}
- </if>
- <if test="resultTimeType != null">
- or RESULT_TIME_TYPE = #{resultTimeType}
- </if>
- <if test="resultTime != null">
- or TO_CHAR(RESULT_TIME,'yyyy-MM-dd') = '#{resultTime}'
- </if>
- <if test="resultStartNodeId != null">
- or RESULT_START_NODE_ID = #{resultStartNodeId}
- </if>
- <if test="resultStartLongitudeVal != null and resultStartLongitudeVal != ''">
- or RESULT_START_LONGITUDE_VAL = #{resultStartLongitudeVal}
- </if>
- <if test="resultStartLatitudeVal != null and resultStartLatitudeVal != ''">
- or RESULT_START_LATITUDE_VAL = #{resultStartLatitudeVal}
- </if>
- <if test="resultEndNodeId != null">
- or RESULT_END_NODE_ID = #{resultEndNodeId}
- </if>
- <if test="resultEndLongitudeVal != null and resultEndLongitudeVal != ''">
- or RESULT_END_LONGITUDE_VAL = #{resultEndLongitudeVal}
- </if>
- <if test="resultEndLatitudeVal != null and resultEndLatitudeVal != ''">
- or RESULT_END_LATITUDE_VAL = #{resultEndLatitudeVal}
- </if>
- <if test="resultMemo != null and resultMemo != ''">
- or RESULT_MEMO = #{resultMemo}
- </if>
- <if test="insertUsername != null and insertUsername != ''">
- or INSERT_USERNAME = #{insertUsername}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="updateUsername != null and updateUsername != ''">
- or UPDATE_USERNAME = #{updateUsername}
- </if>
- <if test="updateTime != null">
- or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
- </if>
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
- </if>
- <if test="deleteName != null and deleteName != ''">
- or DELETE_NAME = #{deleteName}
- </if>
- <if test="deleteTime != null">
- or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckTimeTaskResult">
- insert into TMSTRUCK_TIME_TASK_RESULT (TIME_TASK_RESULT_ID, RESULT_TOTAL_ID,
- RESULT_VALUE, RESULT_UOM_ID, RESULT_TIME_TYPE,
- RESULT_TIME, RESULT_START_NODE_ID, RESULT_START_LONGITUDE_VAL,
- RESULT_START_LATITUDE_VAL, RESULT_END_NODE_ID,
- RESULT_END_LONGITUDE_VAL, RESULT_END_LATITUDE_VAL,
- RESULT_MEMO, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
- DELETE_NAME, DELETE_TIME)
- values (#{timeTaskResultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL},
- #{resultValue,jdbcType=DECIMAL}, #{resultUomId,jdbcType=DECIMAL}, #{resultTimeType,jdbcType=DECIMAL},
- #{resultTime,jdbcType=TIMESTAMP}, #{resultStartNodeId,jdbcType=DECIMAL}, #{resultStartLongitudeVal,jdbcType=VARCHAR},
- #{resultStartLatitudeVal,jdbcType=VARCHAR}, #{resultEndNodeId,jdbcType=DECIMAL},
- #{resultEndLongitudeVal,jdbcType=VARCHAR}, #{resultEndLatitudeVal,jdbcType=VARCHAR},
- #{resultMemo,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
- #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckTimeTaskResult">
- insert into TMSTRUCK_TIME_TASK_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="timeTaskResultId != null">
- TIME_TASK_RESULT_ID,
- </if>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID,
- </if>
- <if test="resultValue != null">
- RESULT_VALUE,
- </if>
- <if test="resultUomId != null">
- RESULT_UOM_ID,
- </if>
- <if test="resultTimeType != null">
- RESULT_TIME_TYPE,
- </if>
- <if test="resultTime != null">
- RESULT_TIME,
- </if>
- <if test="resultStartNodeId != null">
- RESULT_START_NODE_ID,
- </if>
- <if test="resultStartLongitudeVal != null">
- RESULT_START_LONGITUDE_VAL,
- </if>
- <if test="resultStartLatitudeVal != null">
- RESULT_START_LATITUDE_VAL,
- </if>
- <if test="resultEndNodeId != null">
- RESULT_END_NODE_ID,
- </if>
- <if test="resultEndLongitudeVal != null">
- RESULT_END_LONGITUDE_VAL,
- </if>
- <if test="resultEndLatitudeVal != null">
- RESULT_END_LATITUDE_VAL,
- </if>
- <if test="resultMemo != null">
- RESULT_MEMO,
- </if>
- <if test="insertUsername != null">
- INSERT_USERNAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="updateUsername != null">
- UPDATE_USERNAME,
- </if>
- <if test="updateTime != null">
- UPDATE_TIME,
- </if>
- <if test="insertUpdateRemark != null">
- INSERT_UPDATE_REMARK,
- </if>
- <if test="deleteName != null">
- DELETE_NAME,
- </if>
- <if test="deleteTime != null">
- DELETE_TIME,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="timeTaskResultId != null">
- #{timeTaskResultId,jdbcType=DECIMAL},
- </if>
- <if test="resultTotalId != null">
- #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="resultValue != null">
- #{resultValue,jdbcType=DECIMAL},
- </if>
- <if test="resultUomId != null">
- #{resultUomId,jdbcType=DECIMAL},
- </if>
- <if test="resultTimeType != null">
- #{resultTimeType,jdbcType=DECIMAL},
- </if>
- <if test="resultTime != null">
- #{resultTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultStartNodeId != null">
- #{resultStartNodeId,jdbcType=DECIMAL},
- </if>
- <if test="resultStartLongitudeVal != null">
- #{resultStartLongitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultStartLatitudeVal != null">
- #{resultStartLatitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultEndNodeId != null">
- #{resultEndNodeId,jdbcType=DECIMAL},
- </if>
- <if test="resultEndLongitudeVal != null">
- #{resultEndLongitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultEndLatitudeVal != null">
- #{resultEndLatitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultMemo != null">
- #{resultMemo,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="deleteName != null">
- #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckTimeTaskResult">
- update TMSTRUCK_TIME_TASK_RESULT
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- RESULT_VALUE = #{resultValue,jdbcType=DECIMAL},
- RESULT_UOM_ID = #{resultUomId,jdbcType=DECIMAL},
- RESULT_TIME_TYPE = #{resultTimeType,jdbcType=DECIMAL},
- RESULT_TIME = #{resultTime,jdbcType=TIMESTAMP},
- RESULT_START_NODE_ID = #{resultStartNodeId,jdbcType=DECIMAL},
- RESULT_START_LONGITUDE_VAL = #{resultStartLongitudeVal,jdbcType=VARCHAR},
- RESULT_START_LATITUDE_VAL = #{resultStartLatitudeVal,jdbcType=VARCHAR},
- RESULT_END_NODE_ID = #{resultEndNodeId,jdbcType=DECIMAL},
- RESULT_END_LONGITUDE_VAL = #{resultEndLongitudeVal,jdbcType=VARCHAR},
- RESULT_END_LATITUDE_VAL = #{resultEndLatitudeVal,jdbcType=VARCHAR},
- RESULT_MEMO = #{resultMemo,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},
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP}
- where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckTimeTaskResult">
- update TMSTRUCK_TIME_TASK_RESULT
- <set>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="resultValue != null">
- RESULT_VALUE = #{resultValue,jdbcType=DECIMAL},
- </if>
- <if test="resultUomId != null">
- RESULT_UOM_ID = #{resultUomId,jdbcType=DECIMAL},
- </if>
- <if test="resultTimeType != null">
- RESULT_TIME_TYPE = #{resultTimeType,jdbcType=DECIMAL},
- </if>
- <if test="resultTime != null">
- RESULT_TIME = #{resultTime,jdbcType=TIMESTAMP},
- </if>
- <if test="resultStartNodeId != null">
- RESULT_START_NODE_ID = #{resultStartNodeId,jdbcType=DECIMAL},
- </if>
- <if test="resultStartLongitudeVal != null">
- RESULT_START_LONGITUDE_VAL = #{resultStartLongitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultStartLatitudeVal != null">
- RESULT_START_LATITUDE_VAL = #{resultStartLatitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultEndNodeId != null">
- RESULT_END_NODE_ID = #{resultEndNodeId,jdbcType=DECIMAL},
- </if>
- <if test="resultEndLongitudeVal != null">
- RESULT_END_LONGITUDE_VAL = #{resultEndLongitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultEndLatitudeVal != null">
- RESULT_END_LATITUDE_VAL = #{resultEndLatitudeVal,jdbcType=VARCHAR},
- </if>
- <if test="resultMemo != null">
- RESULT_MEMO = #{resultMemo,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="deleteName != null">
- DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
- </if>
- <if test="deleteTime != null">
- DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
- <include refid="select"/>
- where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="where"/>
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="whereLike"/>
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into TMSTRUCK_TIME_TASK_RESULT
- (TIME_TASK_RESULT_ID,
- RESULT_TOTAL_ID, RESULT_VALUE, RESULT_UOM_ID,
- RESULT_TIME_TYPE, RESULT_TIME,
- RESULT_START_NODE_ID, RESULT_START_LONGITUDE_VAL,
- RESULT_START_LATITUDE_VAL, RESULT_END_NODE_ID,
- RESULT_END_LONGITUDE_VAL, RESULT_END_LATITUDE_VAL,
- RESULT_MEMO, INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, DELETE_NAME,
- DELETE_TIME)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.timeTaskResultId,jdbcType=DECIMAL},
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultValue,jdbcType=DECIMAL}, #{item.resultUomId,jdbcType=DECIMAL},
- #{item.resultTimeType,jdbcType=DECIMAL}, #{item.resultTime,jdbcType=TIMESTAMP},
- #{item.resultStartNodeId,jdbcType=DECIMAL}, #{item.resultStartLongitudeVal,jdbcType=VARCHAR},
- #{item.resultStartLatitudeVal,jdbcType=VARCHAR}, #{item.resultEndNodeId,jdbcType=DECIMAL},
- #{item.resultEndLongitudeVal,jdbcType=VARCHAR}, #{item.resultEndLatitudeVal,jdbcType=VARCHAR},
- #{item.resultMemo,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
- #{item.deleteTime,jdbcType=TIMESTAMP} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSTRUCK_TIME_TASK_RESULT
- set
- TIME_TASK_RESULT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.timeTaskResultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TOTAL_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_VALUE=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultValue,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_UOM_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultUomId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TIME_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultTimeType,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_START_NODE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultStartNodeId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_START_LONGITUDE_VAL=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultStartLongitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_START_LATITUDE_VAL=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultStartLatitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_END_NODE_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultEndNodeId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_END_LONGITUDE_VAL=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultEndLongitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_END_LATITUDE_VAL=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultEndLatitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_MEMO=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultMemo,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_NAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case TIME_TASK_RESULT_ID" close="end">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
- </foreach>
- where TIME_TASK_RESULT_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.timeTaskResultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from TMSTRUCK_TIME_TASK_RESULT
- where TIME_TASK_RESULT_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 通过运输订单号查询总实绩ID -->
- <select id="getResultTotalIdByOrderNum" resultType="java.util.Map">
- SELECT TTR.RESULT_TOTAL_ID "resultTotalId"
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.ORDER_ID = OO.ORDER_ID
- WHERE OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 查询上一次结束时间 -->
- <select id="getLastTimeout" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- select *
- from(
- SELECT TTTR.RESULT_TIME "resultTime"
- FROM TMSTRUCK_TIME_TASK_RESULT TTTR
- WHERE TTTR.RESULT_TOTAL_ID = #{resultTotalId}
- AND TTTR.RESULT_TIME_TYPE = 5
- ORDER BY "resultTime" DESC
- )
- where rownum = 1
- </select>
- <!-- 查询用车单位确认开始时间-->
- <select id="getStartTime" parameterType="java.math.BigDecimal" resultType="java.util.Map">
- SELECT TTTR.RESULT_TIME "resultTime"
- FROM TMSTRUCK_TIME_TASK_RESULT TTTR
- WHERE TTTR.RESULT_TOTAL_ID = #{resultTotalId}
- AND TTTR.RESULT_TIME_TYPE = 0
- </select>
- <!-- 查询所有确认暂停结束时间-->
- <select id="getAllTimeout" resultType="java.util.Map">
- SELECT TTTR.RESULT_VALUE "resultValue"
- FROM TMSTRUCK_TIME_TASK_RESULT TTTR
- WHERE TTTR.RESULT_TOTAL_ID = #{resultTotalId}
- AND TTTR.RESULT_TIME_TYPE = 7
- </select>
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- </sql>
- <!-- 查询计时作业 -->
- <select id="getAllTimeTaskResult" resultType="java.util.Map">
- select RC.CAPACITY_NUMBER "capacityNumber",
- OO.ORDER_NUMBER "orderNumber",
- CONCAT(TTTR.RESULT_VALUE,RUOM.UNIT_OF_MEASURE_NAME) AS "resultTime",
- RCT.CAPACITY_TYPE_NAME "capacityTypeName",
- TTTR.INSERT_TIME "insertTime",
- (
- SELECT TTTR2.RESULT_TIME
- FROM TMSTRUCK_TIME_TASK_RESULT TTTR2
- WHERE TTTR2.RESULT_TOTAL_ID = TTTR.RESULT_TOTAL_ID
- AND TTTR2.RESULT_TIME_TYPE = 1
- ) "startTime",
- (
- SELECT TTTR2.RESULT_TIME
- FROM TMSTRUCK_TIME_TASK_RESULT TTTR2
- WHERE TTTR2.RESULT_TOTAL_ID = TTTR.RESULT_TOTAL_ID
- AND TTTR2.RESULT_TIME_TYPE = 3
- ) "endTime",
- RM.MATERIAL_NAME "materialName",
- RS.SHIPPER_NAME "shipperName",
- RW.WAREHOUSE_NAME "unloadPointName",
- RW2.WAREHOUSE_NAME "loadPointName"
- from OMSTRUCK_ORDER OO
- LEFT JOIN AMSTRUCK_INWARD_PLAN AIP
- ON AIP.PLAN_ID=OO.ORDER_PLAN_ID
- LEFT JOIN AMSTRUCK_REQUIREMENT_PLAN ARP
- ON ARP.PLAN_ID=AIP.PLAN_ID
- LEFT JOIN AMSTRUCK_INWARD_REQUIREMENT AIR
- ON AIR.REQUIREMENT_ID=ARP.REQUIREMENT_ID
- LEFT JOIN AMSTRUCK_REQUIREMENT_MATERIAL ARM
- ON ARM.REQUIREMENT_ID=AIR.REQUIREMENT_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON ARM.REQUIREMENT_UNLOAD_UNIT_ID =RW.WAREHOUSE_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 RMS_SHIPPER RS
- ON RS.SHIPPER_ID = AIR.REQUIREMENT_SHIPPER_ID
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.ORDER_ID=OO.ORDER_ID
- LEFT JOIN TMSTRUCK_TIME_TASK_RESULT TTTR
- ON TTR.RESULT_TOTAL_ID=TTTR.RESULT_TOTAL_ID
- LEFT JOIN RMS_UNIT_OF_MEASURE RUOM
- ON TTTR.RESULT_UOM_ID=RUOM.UNIT_OF_MEASURE_ID
- LEFT JOIN RMS_CAPACITY RC
- ON RC.CAPACITY_ID=OO.CAPACITY_ID
- LEFT JOIN RMS_CAPACITY_TYPE RCT
- ON RCT.CAPACITY_TYPE_ID=RC.CAPACITY_TYPE_ID
- where TTTR.RESULT_TIME_TYPE = 3 AND TTTR.RESULT_VALUE IS NOT NULL
- <if test="con!=null">
- AND RC.CAPACITY_NUMBER LIKE #{con} or RM.MATERIAL_NAME LIKE #{con}
- or RS.SHIPPER_NAME LIKE #{con}
- </if>
- <if test="orgCode!=null">
- AND oo.INSERT_USERNAME LIKE #{orgCode}
- </if>
- <where>
- <if test="orderNumber != null">
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
- "orderNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="capacityNumber != null">
- and
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
- "capacityNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="driverName != null">
- and
- <foreach collection="driverName" item="item" open="(" separator="or" close=")">
- "driverName" 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="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" 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="startTime != null">
- and
- <foreach collection="startTime" item="item" open="(" separator="or" close=")">
- "startTime" like '%${item}%'
- </foreach>
- </if>
- <if test="endTime != null">
- and
- <foreach collection="endTime" item="item" open="(" separator="or" close=")">
- "endTime" like '%${item}%'
- </foreach>
- </if>
- <if test="timingTime != null">
- and
- <foreach collection="timingTime" item="item" open="(" separator="or" close=")">
- "timingTime" like '%${item}%'
- </foreach>
- </if>
- <if test="allTimeout != null">
- and
- <foreach collection="allTimeout" item="item" open="(" separator="or" close=")">
- "allTimeout" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "insertTime" desc
- </if>
- </select>
- <!-- 根据运输订单id查找实绩是否已经计时结束-->
- <select id="CountTimeTaskByOrderId" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
- select COUNT(*)
- from OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON TTR.ORDER_ID=OO.ORDER_ID
- LEFT JOIN TMSTRUCK_TIME_TASK_RESULT TTTR
- ON TTR.RESULT_TOTAL_ID=TTTR.RESULT_TOTAL_ID
- WHERE OO.ORDER_ID=#{orderId} and TTTR.RESULT_TIME_TYPE=3 and TTTR.RESULT_VALUE IS not NULL
- </select>
- </mapper>
|