1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003 |
- <?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" />
- <result column="RESULT_ABOUT_TIME" jdbcType="VARCHAR" property="resultAboutTime" />
- <result column="RESULT_BALANCE_TIME" jdbcType="DECIMAL" property="resultBalanceTime" />
- </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, RESULT_ABOUT_TIME, RESULT_BALANCE_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, t.RESULT_ABOUT_TIME, t.RESULT_BALANCE_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>
- <if test="resultAboutTime != null and resultAboutTime != ''">
- and RESULT_ABOUT_TIME = #{resultAboutTime}
- </if>
- <if test="resultBalanceTime != null">
- and RESULT_BALANCE_TIME = #{resultBalanceTime}
- </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>
- <if test="resultAboutTime != null and resultAboutTime != ''">
- and RESULT_ABOUT_TIME LIKE '%${resultAboutTime}%'
- </if>
- <if test="resultBalanceTime != null">
- and RESULT_BALANCE_TIME = #{resultBalanceTime}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
- 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>
- <if test="resultAboutTime != null and resultAboutTime != ''">
- or RESULT_ABOUT_TIME = #{resultAboutTime}
- </if>
- <if test="resultBalanceTime != null">
- or RESULT_BALANCE_TIME = #{resultBalanceTime}
- </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, RESULT_ABOUT_TIME,
- RESULT_BALANCE_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}, #{resultAboutTime,jdbcType=VARCHAR},
- #{resultBalanceTime,jdbcType=DECIMAL})
- </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>
- <if test="resultAboutTime != null">
- RESULT_ABOUT_TIME,
- </if>
- <if test="resultBalanceTime != null">
- RESULT_BALANCE_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>
- <if test="resultAboutTime != null">
- #{resultAboutTime,jdbcType=VARCHAR},
- </if>
- <if test="resultBalanceTime != null">
- #{resultBalanceTime,jdbcType=DECIMAL},
- </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},
- RESULT_ABOUT_TIME = #{resultAboutTime,jdbcType=VARCHAR},
- RESULT_BALANCE_TIME = #{resultBalanceTime,jdbcType=DECIMAL}
- 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>
- <if test="resultAboutTime != null">
- RESULT_ABOUT_TIME = #{resultAboutTime,jdbcType=VARCHAR},
- </if>
- <if test="resultBalanceTime != null">
- RESULT_BALANCE_TIME = #{resultBalanceTime,jdbcType=DECIMAL},
- </if>
- </set>
- where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.Short" 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, RESULT_ABOUT_TIME,
- RESULT_BALANCE_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}, #{item.resultAboutTime,jdbcType=VARCHAR},
- #{item.resultBalanceTime,jdbcType=DECIMAL} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSTRUCK_TIME_TASK_RESULT
- set
- TIME_TASK_RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.timeTaskResultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TOTAL_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_VALUE=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultValue,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_UOM_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultUomId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TIME_TYPE=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultTimeType,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_START_NODE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultStartNodeId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_START_LONGITUDE_VAL=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultStartLongitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_START_LATITUDE_VAL=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultStartLatitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_END_NODE_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultEndNodeId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_END_LONGITUDE_VAL=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultEndLongitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_END_LATITUDE_VAL=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultEndLatitudeVal,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_MEMO=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultMemo,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
- </foreach>
- ,DELETE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
- </foreach>
- ,RESULT_ABOUT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultAboutTime,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_BALANCE_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case TIME_TASK_RESULT_ID" separator=" ">
- when #{item.timeTaskResultId,jdbcType=DECIMAL} then #{item.resultBalanceTime,jdbcType=DECIMAL}
- </foreach>
- where TIME_TASK_RESULT_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{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 close=")" collection="list" item="id" open="(" 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="getLastTimeEnd" 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 = 7
- 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>
- </sql>
- <!-- 查询计时作业 -->
- <select id="getAllTimeTaskResult" resultType="java.util.Map">
- select * from (select RC.CAPACITY_NUMBER "capacityNumber",
- OO.ORDER_ID "orderId",
- OO.ORDER_NUMBER "orderNumber",
- TTTR.RESULT_VALUE AS "resultTime",
- AIR.REQUIREMENT_ESTIMATED_DURATION "planTimeDuration",
- (CASE WHEN
- AIR.REQUIREMENT_ESTIMATED_DURATION is null
- then '未填写预计时长,无法比较'
- WHEN AIR.REQUIREMENT_ESTIMATED_DURATION is NOT null
- then (AIR.REQUIREMENT_ESTIMATED_DURATION - TTTR.RESULT_VALUE) || ''
- end) "dValue",
- RCT.CAPACITY_TYPE_NAME "capacityTypeName",
- TTTR.result_balance_time "aboutTime",
- TTTR.INSERT_TIME "insertTime",
- SU.USER_NAME "personName",
- AIR.INSERT_UPDATE_REMARK "requirementRemark",
- (
- 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",
- (
- SELECT count(TTTR2.RESULT_VALUE)
- FROM TMSTRUCK_TIME_TASK_RESULT TTTR2
- WHERE TTTR2.RESULT_TOTAL_ID = TTTR.RESULT_TOTAL_ID
- AND TTTR2.RESULT_TIME_TYPE = 7
- ) "pauseTime",
- RM.MATERIAL_NAME "materialName",
- RS.SHIPPER_NAME "shipperName",
- RW.WAREHOUSE_NAME "unloadPointName",
- RW2.WAREHOUSE_NAME "loadPointName",
- TWR.RESULT_GROSS_WEIGHT_TIME "grossWeightTime",
- TWR.RESULT_TARE_WEIGHT_TIME "tareWeightTime"
- 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 TMSTRUCK_WEIGHT_RESULT TWR
- ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
- LEFT JOIN SSO.SYS_USER SU
- ON SU.USER_ID =TTTR.INSERT_USERNAME
- 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=AIR.CAPACITY_TYPE_ID
- where TTTR.RESULT_TIME_TYPE = 3 AND TTTR.RESULT_VALUE IS NOT NULL
- <if test="orderType!=null and orderType != 26">
- AND OO.ORDER_TYPE in (#{orderType},11)
- </if>
- <if test="orderType!=null and orderType == 26">
- AND OO.ORDER_TYPE = #{orderType}
- </if>
- <if test="con!=null and con != ''">
- AND RC.CAPACITY_NUMBER || RM.MATERIAL_NAME || RS.SHIPPER_NAME LIKE CONCAT('%',CONCAT(#{con},'%'))
- </if>
- <if test="userId!=null">
- AND instr(AIR.INSERT_USERNAME,#{userId}) > 0
- </if>
- <if test="oneDate != null">
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TTTR.INSERT_TIME
- </if>
- <if test="startDate != null">
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TTTR.INSERT_TIME
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TTTR.INSERT_TIME
- </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=")">
- to_char("startTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
- </foreach>
- </if>
- <if test="endTime != null">
- and
- <foreach collection="endTime" item="item" open="(" separator="or" close=")">
- to_char("endTime",'yyyy-mm-dd hh24:mi:ss') 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>
- <select id="selectInwardDueTimeByOrderId" resultType="java.util.Map" parameterType="java.math.BigDecimal">
- select AIR.DUE_DATE "dueTime",
- AIR.INSERT_UPDATE_REMARK "remark"
- 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
- where OO.ORDER_ID=#{orderId}
- </select>
- <!--获取需求信息-->
- <select id="getRequirementInfo" resultType="java.util.Map" parameterType="decimal">
- select DISTINCT
- AIR.CAPACITY_TYPE_ID "capacityTypeId" ,
- AIR.REQUIREMENT_TYPE "requirementType",
- RCT.CAPACITY_TYPE_NAME "capacityTypeName",
- AIR.insert_update_remark "insertUpdateRemark"
- 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 RMS_CAPACITY_TYPE RCT
- ON AIR.CAPACITY_TYPE_ID = RCT.CAPACITY_TYPE_ID
- where oo.ORDER_ID = #{orderId1}
- fetch next 1 rows only
- </select>
- <!-- 查找计时开始时间-->
- <select id="getStartTimeTask" resultType="java.util.Map" parameterType="java.util.Map">
- select TTTR.TIME_TASK_RESULT_ID "timeTaskResultId",
- TTTR.RESULT_TIME "resultTime"
- from OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON OO.ORDER_ID=TTR.ORDER_ID
- LEFT JOIN TMSTRUCK_TIME_TASK_RESULT TTTR
- ON TTTR.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
- WHERE TTTR.RESULT_TIME_TYPE = #{resultType} and OO.ORDER_NUMBER = #{orderNumber}
- </select>
- <!-- 查找计时总时长-->
- <select id="getResultValue" resultType="java.util.Map" parameterType="java.lang.String">
- select TTTR.RESULT_VALUE "resultValue",
- TTTR.TIME_TASK_RESULT_ID "timeTaskResultId",
- OO.ORDER_ID "orderId"
- from OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
- ON OO.ORDER_ID=TTR.ORDER_ID
- LEFT JOIN TMSTRUCK_TIME_TASK_RESULT TTTR
- ON TTR.RESULT_TOTAL_ID= TTTR.RESULT_TOTAL_ID
- WHERE TTTR.RESULT_TIME_TYPE= 3 AND OO.ORDER_NUMBER=#{orderNumber}
- </select>
- <select id="getShipperName" resultType="java.lang.String">
- SELECT RS.SHIPPER_NAME || rs.INSERT_USERNAME
- 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 RMS_SHIPPER RS
- ON RS.SHIPPER_ID = AIR.REQUIREMENT_SHIPPER_ID
- where RS.SHIPPER_NAME is not null AND OO.ORDER_NUMBER=#{orderNumber}
- FETCH NEXT 1 rows only
- </select>
- <select id="CountStartTaskByOrderId" resultType="java.lang.Integer">
- 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=1
- </select>
- <select id="getLastStep" resultType="java.lang.Integer">
- select TTTR.RESULT_TIME_TYPE
- 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}
- ORDER BY TTTR.RESULT_TIME DESC
- FETCH NEXT 1 ROWS ONLY
- </select>
- <delete id="deleteErrorTimeTaskResult">
- DELETE FROM TMSTRUCK_TIME_TASK_RESULT
- WHERE TIME_TASK_RESULT_ID IN
- (
- SELECT MIN(TIME_TASK_RESULT_ID)
- FROM TMSTRUCK_TIME_TASK_RESULT
- WHERE RESULT_TOTAL_ID IN
- (
- SELECT RESULT_TOTAL_ID
- FROM TMSTRUCK_TIME_TASK_RESULT WHERE RESULT_TIME_TYPE = 3
- GROUP BY RESULT_TOTAL_ID HAVING COUNT(TIME_TASK_RESULT_ID) > 1
- )
- GROUP BY RESULT_TOTAL_ID
- )
- </delete>
- <select id="checkOrderType" resultType="java.lang.Integer">
- SELECT COUNT(AIR.REQUIREMENT_ID)
- FROM OMSTRUCK_ORDER OO
- LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON OO.ORDER_ID=TTR.ORDER_ID
- 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
- WHERE (AIR.INSERT_UPDATE_REMARK like '%计时且过计量%' OR OO .ORDER_TYPE in (21,26))
- AND OO .ORDER_ID = #{orderId}
- </select>
- </mapper>
|