|
@@ -0,0 +1,516 @@
|
|
|
+<?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.TmstrainPleaseResultMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainPleaseResult">
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="RAIL_PLAN_ID" jdbcType="DECIMAL" property="railPlanId" />
|
|
|
+ <result column="RESULT_PLEASE_PLAN_NO" jdbcType="VARCHAR" property="resultPleasePlanNo" />
|
|
|
+ <result column="RESULT_DATE" jdbcType="TIMESTAMP" property="resultDate" />
|
|
|
+ <result column="RESULT_APPROVE_NUMBER" jdbcType="DECIMAL" property="resultApproveNumber" />
|
|
|
+ <result column="RESULT_VOID_NUMBER" jdbcType="DECIMAL" property="resultVoidNumber" />
|
|
|
+ <result column="RESULT_REAL_NUMBER" jdbcType="DECIMAL" property="resultRealNumber" />
|
|
|
+ <result column="RESULT_SURPLUS_NUMBER" jdbcType="DECIMAL" property="resultSurplusNumber" />
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
+ <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
+ <result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_DATE, RESULT_APPROVE_NUMBER,
|
|
|
+ RESULT_VOID_NUMBER, RESULT_REAL_NUMBER, RESULT_SURPLUS_NUMBER, INSERT_USERNAME, INSERT_TIME,
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, RESULT_TYPE
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.RESULT_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_DATE, t.RESULT_APPROVE_NUMBER,
|
|
|
+ t.RESULT_VOID_NUMBER, t.RESULT_REAL_NUMBER, t.RESULT_SURPLUS_NUMBER, t.INSERT_USERNAME,
|
|
|
+ t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
+ t.RESULT_TYPE
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns" /> FROM TMSTRAIN_PLEASE_RESULT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias" /> FROM TMSTRAIN_PLEASE_RESULT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="railPlanId != null">
|
|
|
+ and RAIL_PLAN_ID = #{railPlanId}
|
|
|
+ </if>
|
|
|
+ <if test="resultPleasePlanNo != null and resultPleasePlanNo != ''">
|
|
|
+ and RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo}
|
|
|
+ </if>
|
|
|
+ <if test="resultDate != null">
|
|
|
+ and TO_CHAR(RESULT_DATE,'yyyy-MM-dd') = #{resultDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultApproveNumber != null">
|
|
|
+ and RESULT_APPROVE_NUMBER = #{resultApproveNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultVoidNumber != null">
|
|
|
+ and RESULT_VOID_NUMBER = #{resultVoidNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultRealNumber != null">
|
|
|
+ and RESULT_REAL_NUMBER = #{resultRealNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultSurplusNumber != null">
|
|
|
+ and RESULT_SURPLUS_NUMBER = #{resultSurplusNumber}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ and DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ and RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="railPlanId != null">
|
|
|
+ and RAIL_PLAN_ID = #{railPlanId}
|
|
|
+ </if>
|
|
|
+ <if test="resultPleasePlanNo != null and resultPleasePlanNo != ''">
|
|
|
+ and RESULT_PLEASE_PLAN_NO LIKE '%${resultPleasePlanNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="resultDate != null">
|
|
|
+ and TO_CHAR(RESULT_DATE,'yyyy-MM-dd') = #{resultDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultApproveNumber != null">
|
|
|
+ and RESULT_APPROVE_NUMBER = #{resultApproveNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultVoidNumber != null">
|
|
|
+ and RESULT_VOID_NUMBER = #{resultVoidNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultRealNumber != null">
|
|
|
+ and RESULT_REAL_NUMBER = #{resultRealNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultSurplusNumber != null">
|
|
|
+ and RESULT_SURPLUS_NUMBER = #{resultSurplusNumber}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ and DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ and RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from TMSTRAIN_PLEASE_RESULT
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from TMSTRAIN_PLEASE_RESULT
|
|
|
+ where 1!=1
|
|
|
+ <if test="railPlanId != null">
|
|
|
+ or RAIL_PLAN_ID = #{railPlanId}
|
|
|
+ </if>
|
|
|
+ <if test="resultPleasePlanNo != null and resultPleasePlanNo != ''">
|
|
|
+ or RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo}
|
|
|
+ </if>
|
|
|
+ <if test="resultDate != null">
|
|
|
+ or TO_CHAR(RESULT_DATE,'yyyy-MM-dd') = '#{resultDate}'
|
|
|
+ </if>
|
|
|
+ <if test="resultApproveNumber != null">
|
|
|
+ or RESULT_APPROVE_NUMBER = #{resultApproveNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultVoidNumber != null">
|
|
|
+ or RESULT_VOID_NUMBER = #{resultVoidNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultRealNumber != null">
|
|
|
+ or RESULT_REAL_NUMBER = #{resultRealNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultSurplusNumber != null">
|
|
|
+ or RESULT_SURPLUS_NUMBER = #{resultSurplusNumber}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ or INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ or UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ or DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ or RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainPleaseResult">
|
|
|
+ insert into TMSTRAIN_PLEASE_RESULT (RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
|
|
|
+ RESULT_DATE, RESULT_APPROVE_NUMBER, RESULT_VOID_NUMBER,
|
|
|
+ RESULT_REAL_NUMBER, RESULT_SURPLUS_NUMBER,
|
|
|
+ INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
+ RESULT_TYPE)
|
|
|
+ values (#{resultId,jdbcType=DECIMAL}, #{railPlanId,jdbcType=DECIMAL}, #{resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
+ #{resultDate,jdbcType=TIMESTAMP}, #{resultApproveNumber,jdbcType=DECIMAL}, #{resultVoidNumber,jdbcType=DECIMAL},
|
|
|
+ #{resultRealNumber,jdbcType=DECIMAL}, #{resultSurplusNumber,jdbcType=DECIMAL},
|
|
|
+ #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
|
|
|
+ #{resultType,jdbcType=DECIMAL})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseResult">
|
|
|
+ insert into TMSTRAIN_PLEASE_RESULT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="railPlanId != null">
|
|
|
+ RAIL_PLAN_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultPleasePlanNo != null">
|
|
|
+ RESULT_PLEASE_PLAN_NO,
|
|
|
+ </if>
|
|
|
+ <if test="resultDate != null">
|
|
|
+ RESULT_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="resultApproveNumber != null">
|
|
|
+ RESULT_APPROVE_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="resultVoidNumber != null">
|
|
|
+ RESULT_VOID_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="resultRealNumber != null">
|
|
|
+ RESULT_REAL_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="resultSurplusNumber != null">
|
|
|
+ RESULT_SURPLUS_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK,
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ DELETED,
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ RESULT_TYPE,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ #{resultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="railPlanId != null">
|
|
|
+ #{railPlanId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultPleasePlanNo != null">
|
|
|
+ #{resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultDate != null">
|
|
|
+ #{resultDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultApproveNumber != null">
|
|
|
+ #{resultApproveNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultVoidNumber != null">
|
|
|
+ #{resultVoidNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultRealNumber != null">
|
|
|
+ #{resultRealNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultSurplusNumber != null">
|
|
|
+ #{resultSurplusNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ #{deleted,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ #{resultType,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainPleaseResult">
|
|
|
+ update TMSTRAIN_PLEASE_RESULT
|
|
|
+ set RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
|
|
|
+ RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
+ RESULT_DATE = #{resultDate,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_APPROVE_NUMBER = #{resultApproveNumber,jdbcType=DECIMAL},
|
|
|
+ RESULT_VOID_NUMBER = #{resultVoidNumber,jdbcType=DECIMAL},
|
|
|
+ RESULT_REAL_NUMBER = #{resultRealNumber,jdbcType=DECIMAL},
|
|
|
+ RESULT_SURPLUS_NUMBER = #{resultSurplusNumber,jdbcType=DECIMAL},
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ RESULT_TYPE = #{resultType,jdbcType=DECIMAL}
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseResult">
|
|
|
+ update TMSTRAIN_PLEASE_RESULT
|
|
|
+ <set>
|
|
|
+ <if test="railPlanId != null">
|
|
|
+ RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultPleasePlanNo != null">
|
|
|
+ RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultDate != null">
|
|
|
+ RESULT_DATE = #{resultDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultApproveNumber != null">
|
|
|
+ RESULT_APPROVE_NUMBER = #{resultApproveNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultVoidNumber != null">
|
|
|
+ RESULT_VOID_NUMBER = #{resultVoidNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultRealNumber != null">
|
|
|
+ RESULT_REAL_NUMBER = #{resultRealNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultSurplusNumber != null">
|
|
|
+ RESULT_SURPLUS_NUMBER = #{resultSurplusNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </select>
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
+ </select>
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="whereLike" />
|
|
|
+ </select>
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
+ insert into TMSTRAIN_PLEASE_RESULT
|
|
|
+ (RESULT_ID,
|
|
|
+ RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
|
|
|
+ RESULT_DATE, RESULT_APPROVE_NUMBER,
|
|
|
+ RESULT_VOID_NUMBER, RESULT_REAL_NUMBER,
|
|
|
+ RESULT_SURPLUS_NUMBER, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
+ DELETED, RESULT_TYPE)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultId,jdbcType=DECIMAL},
|
|
|
+ #{item.railPlanId,jdbcType=DECIMAL}, #{item.resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
+ #{item.resultDate,jdbcType=TIMESTAMP}, #{item.resultApproveNumber,jdbcType=DECIMAL},
|
|
|
+ #{item.resultVoidNumber,jdbcType=DECIMAL}, #{item.resultRealNumber,jdbcType=DECIMAL},
|
|
|
+ #{item.resultSurplusNumber,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{item.deleted,jdbcType=DECIMAL}, #{item.resultType,jdbcType=DECIMAL} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update TMSTRAIN_PLEASE_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RAIL_PLAN_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.railPlanId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_PLEASE_PLAN_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleasePlanNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_DATE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDate,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_APPROVE_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_VOID_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultVoidNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_REAL_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultRealNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_SURPLUS_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSurplusNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_TYPE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultType,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from TMSTRAIN_PLEASE_RESULT
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
|
+ select seq_tmstrain_please.nextval from dual
|
|
|
+ </select>
|
|
|
+ <select id="getPleaseResult" resultType="java.util.Map">
|
|
|
+ select
|
|
|
+ RESULT_ID "resultId",
|
|
|
+ RAIL_PLAN_ID "railPlanId",
|
|
|
+ RESULT_DATE "resultDate",
|
|
|
+ RESULT_APPROVE_NUMBER "resultApproveNumber",
|
|
|
+ RESULT_VOID_NUMBER "resultVoidNumber",
|
|
|
+ RESULT_REAL_NUMBER "resultRealNumber",
|
|
|
+ RESULT_SURPLUS_NUMBER "resultSurplusNumber",
|
|
|
+ DELETED "deleted"
|
|
|
+ from TMSTRAIN_PLEASE_RESULT
|
|
|
+ where DELETED=0 and RESULT_ID=#{resultId}
|
|
|
+ </select>
|
|
|
+ <select id="getAllPleaseResult" resultType="java.util.Map">
|
|
|
+ select
|
|
|
+ RESULT_ID "resultId",
|
|
|
+ RAIL_PLAN_ID "railPlanId",
|
|
|
+ RESULT_DATE "resultDate",
|
|
|
+ RESULT_APPROVE_NUMBER "resultApproveNumber",
|
|
|
+ RESULT_VOID_NUMBER "resultVoidNumber",
|
|
|
+ RESULT_REAL_NUMBER "resultRealNumber",
|
|
|
+ RESULT_SURPLUS_NUMBER "resultSurplusNumber",
|
|
|
+ DELETED "deleted"
|
|
|
+ from TMSTRAIN_PLEASE_RESULT
|
|
|
+ where DELETED=0
|
|
|
+ <if test="oneDate != null">
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= INSERT_TIME
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= INSERT_TIME
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= INSERT_TIME
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getRealNumber" resultType="java.math.BigDecimal">
|
|
|
+ select count(TLT.RESULT_ID) from TMSTRAIN_LOADING_TEMP TLT,WMSH_OUTBOUND_RESULT WOR
|
|
|
+ where TLT.OUTBOUNT_ID=WOR.RESULT_ID
|
|
|
+ AND to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= WOR.INSERT_TIME
|
|
|
+ AND to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= WOR.INSERT_TIME
|
|
|
+ </select>
|
|
|
+</mapper>
|