CitAssetEamMappingExtendsMapper.xml 8.21 KB
<?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="pwc.taxtech.atms.dao.CitAssetEamMappingMapper">

  <insert id="insertBatch" parameterType="java.util.List">
    insert into cit_asset_eam_mapping
    (<include refid="Base_Column_List"/>)
    values
    <foreach collection="list" item="item" index="index" separator=",">
      <trim prefix="(" suffix=")" suffixOverrides=",">
        <choose>
          <when test="item.id != null">#{item.id,jdbcType=BIGINT},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.period != null">#{item.period,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.assetNumber != null">#{item.assetNumber,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.serialNumber != null">#{item.serialNumber,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.assetGroupName != null">#{item.assetGroupName,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.assetDetailGroupId != null">#{item.assetDetailGroupId,jdbcType=BIGINT},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.assetDescription != null">#{item.assetDescription,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.buyDate != null">#{item.buyDate,jdbcType=TIMESTAMP},</when>
          <otherwise>CURRENT_TIMESTAMP,</otherwise>
        </choose>
        <choose>
          <when test="item.depreciationDate != null">#{item.depreciationDate,jdbcType=TIMESTAMP},</when>
          <otherwise>CURRENT_TIMESTAMP,</otherwise>
        </choose>
        <choose>
          <when test="item.depreciationPeriod != null">#{item.depreciationPeriod,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.acquisitionValue != null">#{item.acquisitionValue,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.adjustmentValue != null">#{item.adjustmentValue,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.disposedDate != null">#{item.disposedDate,jdbcType=TIMESTAMP},</when>
          <otherwise>null,</otherwise>
        </choose>
        <choose>
          <when test="item.residualRate != null">#{item.residualRate,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.yearDepreciationAmount != null">#{item.yearDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.yearAdjustmentAmount != null">#{item.yearAdjustmentAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.yearEndValue != null">#{item.yearEndValue,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.status != null">#{item.status,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.accountAcquisitionValue != null">#{item.accountAcquisitionValue,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.accountMonthDepreciationAmount != null">#{item.accountMonthDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.accountYearDepreciationAmount != null">#{item.accountYearDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.accountTotalDepreciationAmount != null">#{item.accountTotalDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxDepreciationPeriod != null">#{item.taxDepreciationPeriod,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxToLastYearDepreciationPeriod != null">#{item.taxToLastYearDepreciationPeriod,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxToCurrentYearDepreciationPeriod != null">#{item.taxToCurrentYearDepreciationPeriod,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxYearDepreciationPeriod != null">#{item.taxYearDepreciationPeriod,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxMonthDepreciationAmount != null">#{item.taxMonthDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxToCurrentYearDepreciationAmount != null">#{item.taxToCurrentYearDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxCurrentYearDepreciationAmount != null">#{item.taxCurrentYearDepreciationAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.totalDifferenceAmount != null">#{item.totalDifferenceAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.yearDifferenceAmount != null">#{item.yearDifferenceAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.isRetain != null">#{item.isRetain,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.assetType != null">#{item.assetType,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when>
          <otherwise>CURRENT_TIMESTAMP,</otherwise>
        </choose>
        <choose>
          <when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
          <otherwise>CURRENT_TIMESTAMP,</otherwise>
        </choose>
        <choose>
          <when test="item.taxAccountCompare != null">#{item.taxAccountCompare,jdbcType=INTEGER},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxGroupName != null">#{item.taxGroupName,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.scrapType != null">#{item.scrapType,jdbcType=VARCHAR},</when>
          <otherwise>'',</otherwise>
        </choose>
        <choose>
          <when test="item.compensationSaleAmount != null">#{item.compensationSaleAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.saleAmount != null">#{item.saleAmount,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.disposalProfitAndLoss != null">#{item.disposalProfitAndLoss,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.taxNetValue != null">#{item.taxNetValue,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
        <choose>
          <when test="item.disposalTaxBenefit != null">#{item.disposalTaxBenefit,jdbcType=DECIMAL},</when>
          <otherwise>0,</otherwise>
        </choose>
      </trim>
    </foreach>;
    SELECT 1 FROM DUAL;
  </insert>

</mapper>