<?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.chinacreator.video.mapper.CapReverseDao" >
  	
  	
    <insert id="addCapInfo" parameterType="com.chinacreator.video.restful.bean.CapRevBean">
       INSERT INTO TD_CAP_REVSYNC_ORDER(
			ID,SEQUENCE_ID,ORDER_ID,UPDATE_TYPE,MDN,
  			ACCEPT_TIME,IN_MODE_CODE,SOURCEDEVICE_ID,SP_PRODUCT_ID,SP_ID,START_DATE,END_DATE,DEPART_ID,STAFF_ID )
 		VALUES(#{id,jdbcType=VARCHAR},#{sequenceId,jdbcType=VARCHAR},#{orderId,jdbcType=VARCHAR},#{updateType,jdbcType=VARCHAR},#{mdn,jdbcType=VARCHAR},
 		TO_DATE(#{acceptTime,jdbcType=DATE},'YYYYMMDDHH24MISS'),#{inModeCode,jdbcType=VARCHAR},#{sourcedeviceId,jdbcType=VARCHAR},#{spProductId,jdbcType=VARCHAR},
 		#{spId,jdbcType=VARCHAR},TO_DATE(#{startDate,jdbcType=DATE},'YYYYMMDDHH24MISS'),TO_DATE(#{endDate,jdbcType=DATE},'YYYYMMDDHH24MISS'),#{departId,jdbcType=VARCHAR},#{staffId,jdbcType=VARCHAR})
    </insert>
    
    <select id="getId" resultType="String" >
       SELECT
         TO_CHAR(SYSDATE,'yyyyMMddhh24miss')||SEQ_COMMON6.NEXTVAL ID
 		FROM DUAL       
    </select>
</mapper>