|
@@ -22,29 +22,30 @@
|
|
|
<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" />
|
|
|
</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
|
|
|
+ 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
|
|
|
</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.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
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM TMSTRUCK_TIME_TASK_RESULT
|
|
|
+ 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
|
|
|
+ SELECT <include refid="columns_alias" /> FROM TMSTRUCK_TIME_TASK_RESULT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="timeTaskResultId != null">
|
|
|
and TIME_TASK_RESULT_ID = #{timeTaskResultId}
|
|
|
</if>
|
|
@@ -105,10 +106,13 @@
|
|
|
<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>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="timeTaskResultId != null">
|
|
|
and TIME_TASK_RESULT_ID = #{timeTaskResultId}
|
|
|
</if>
|
|
@@ -169,90 +173,98 @@
|
|
|
<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>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ <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>
|
|
|
+ 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>
|
|
|
</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 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
|
|
|
+ )
|
|
|
+ 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}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckTimeTaskResult">
|
|
|
insert into TMSTRUCK_TIME_TASK_RESULT
|
|
@@ -317,6 +329,9 @@
|
|
|
<if test="deleteTime != null">
|
|
|
DELETE_TIME,
|
|
|
</if>
|
|
|
+ <if test="resultAboutTime != null">
|
|
|
+ RESULT_ABOUT_TIME,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="timeTaskResultId != null">
|
|
@@ -379,29 +394,33 @@
|
|
|
<if test="deleteTime != null">
|
|
|
#{deleteTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="resultAboutTime != null">
|
|
|
+ #{resultAboutTime,jdbcType=VARCHAR},
|
|
|
+ </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_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}
|
|
|
where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckTimeTaskResult">
|
|
@@ -464,151 +483,161 @@
|
|
|
<if test="deleteTime != null">
|
|
|
DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="resultAboutTime != null">
|
|
|
+ RESULT_ABOUT_TIME = #{resultAboutTime,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where TIME_TASK_RESULT_ID = #{timeTaskResultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <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"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="whereLike"/>
|
|
|
+ <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 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
|
|
|
+ )
|
|
|
+ ( <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}
|
|
|
+ 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 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>
|
|
|
+ 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 collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ where TIME_TASK_RESULT_ID in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+
|
|
|
+
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
-<!-- 通过运输订单号查询总实绩ID -->
|
|
|
+ <!-- 通过运输订单号查询总实绩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
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
+ ON TTR.ORDER_ID = OO.ORDER_ID
|
|
|
WHERE OO.ORDER_NUMBER = #{orderNumber}
|
|
|
</select>
|
|
|
|
|
@@ -617,11 +646,11 @@
|
|
|
<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
|
|
|
+ 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>
|
|
@@ -639,7 +668,7 @@
|
|
|
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
|
|
@@ -647,7 +676,7 @@
|
|
|
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
|
|
@@ -672,6 +701,7 @@
|
|
|
OO.ORDER_NUMBER "orderNumber",
|
|
|
CONCAT(TTTR.RESULT_VALUE,RUOM.UNIT_OF_MEASURE_NAME) AS "resultTime",
|
|
|
RCT.CAPACITY_TYPE_NAME "capacityTypeName",
|
|
|
+ TTTR.RESULT_ABOUT_TIME "aboutTime",
|
|
|
TTTR.INSERT_TIME "insertTime",
|
|
|
RP.PERSONNEL_NAME "personName",
|
|
|
(
|
|
@@ -731,7 +761,7 @@
|
|
|
or RS.SHIPPER_NAME LIKE #{con}
|
|
|
</if>
|
|
|
<if test="userId!=null">
|
|
|
- AND oo.INSERT_USERNAME LIKE #{userId}
|
|
|
+ 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
|
|
@@ -747,13 +777,13 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="capacityNumber != null">
|
|
|
- and
|
|
|
+ and
|
|
|
<foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
"capacityNumber" like '%${item}%'
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="driverName != null">
|
|
|
- and
|
|
|
+ and
|
|
|
<foreach collection="driverName" item="item" open="(" separator="or" close=")">
|
|
|
"driverName" like '%${item}%'
|
|
|
</foreach>
|
|
@@ -806,38 +836,69 @@
|
|
|
order by "insertTime" desc
|
|
|
</if>
|
|
|
</select>
|
|
|
-<!-- 根据运输订单id查找实绩是否已经计时结束-->
|
|
|
+ <!-- 根据运输订单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
|
|
|
+ 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="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 AIR.CAPACITY_TYPE_ID "capacityTypeId" ,AIR.REQUIREMENT_TYPE "requirementType" 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 = #{orderId1}
|
|
|
+ select AIR.CAPACITY_TYPE_ID "capacityTypeId" ,
|
|
|
+ AIR.REQUIREMENT_TYPE "requirementType",
|
|
|
+ RCT.CAPACITY_TYPE_NAME "capacityTypeName"
|
|
|
+ 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}
|
|
|
+ </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>
|
|
|
|
|
|
</mapper>
|