|
@@ -20,19 +20,23 @@
|
|
|
<result column="STEEL_RECEIPT_DATE" jdbcType="TIMESTAMP" property="steelReceiptDate" />
|
|
|
<result column="PRICE_ID" jdbcType="DECIMAL" property="priceId" />
|
|
|
<result column="TRUCK_REMARK" jdbcType="VARCHAR" property="truckRemark" />
|
|
|
+ <result column="WARRANTY_NUMBER" jdbcType="DECIMAL" property="warrantyNumber" />
|
|
|
<result column="SHIPPING_ADDRESS_IDS" jdbcType="VARCHAR" property="shippingAddressIds" />
|
|
|
+ <result column="PREVIOUS_ORDER_NUMBER" jdbcType="VARCHAR" property="previousOrderNumber" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- SALE_ORDER_MATERIAL_ID, SALE_ORDER_ID, SALE_ORDER_MATERIAL_TRUCK_NO, SALE_SHIPPING_ADDRESS_ID,
|
|
|
- SALE_DATE_OF_RECEIPT, SALE_ORDER_CONSIGNEE, SALE_ORDER_CONSIGNEE_TEL, INSERT_USERNAME,
|
|
|
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, UPDATED,
|
|
|
- ISSUE_STATUS, STEEL_RECEIPT_DATE, PRICE_ID, TRUCK_REMARK ,SHIPPING_ADDRESS_IDS
|
|
|
+ SALE_ORDER_MATERIAL_ID, SALE_ORDER_ID, SALE_ORDER_MATERIAL_TRUCK_NO, SALE_SHIPPING_ADDRESS_ID,
|
|
|
+ SALE_DATE_OF_RECEIPT, SALE_ORDER_CONSIGNEE, SALE_ORDER_CONSIGNEE_TEL, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, UPDATED,
|
|
|
+ ISSUE_STATUS, STEEL_RECEIPT_DATE, PRICE_ID, TRUCK_REMARK, WARRANTY_NUMBER, SHIPPING_ADDRESS_IDS,
|
|
|
+ PREVIOUS_ORDER_NUMBER
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.SALE_ORDER_MATERIAL_ID, t.SALE_ORDER_ID, t.SALE_ORDER_MATERIAL_TRUCK_NO, t.SALE_SHIPPING_ADDRESS_ID,
|
|
|
- t.SALE_DATE_OF_RECEIPT, t.SALE_ORDER_CONSIGNEE, t.SALE_ORDER_CONSIGNEE_TEL, t.INSERT_USERNAME,
|
|
|
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
- t.UPDATED, t.ISSUE_STATUS, t.STEEL_RECEIPT_DATE, t.PRICE_ID, t.TRUCK_REMARK,t.SHIPPING_ADDRESS_IDS
|
|
|
+ t.SALE_ORDER_MATERIAL_ID, t.SALE_ORDER_ID, t.SALE_ORDER_MATERIAL_TRUCK_NO, t.SALE_SHIPPING_ADDRESS_ID,
|
|
|
+ t.SALE_DATE_OF_RECEIPT, t.SALE_ORDER_CONSIGNEE, t.SALE_ORDER_CONSIGNEE_TEL, t.INSERT_USERNAME,
|
|
|
+ t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
+ t.UPDATED, t.ISSUE_STATUS, t.STEEL_RECEIPT_DATE, t.PRICE_ID, t.TRUCK_REMARK, t.WARRANTY_NUMBER,
|
|
|
+ t.SHIPPING_ADDRESS_IDS, t.PREVIOUS_ORDER_NUMBER
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM AMS_SALE_ORDER_MATERIAL
|
|
@@ -96,6 +100,15 @@
|
|
|
<if test="truckRemark != null and truckRemark != ''">
|
|
|
and TRUCK_REMARK = #{truckRemark}
|
|
|
</if>
|
|
|
+ <if test="warrantyNumber != null">
|
|
|
+ and WARRANTY_NUMBER = #{warrantyNumber}
|
|
|
+ </if>
|
|
|
+ <if test="shippingAddressIds != null and shippingAddressIds != ''">
|
|
|
+ and SHIPPING_ADDRESS_IDS = #{shippingAddressIds}
|
|
|
+ </if>
|
|
|
+ <if test="previousOrderNumber != null and previousOrderNumber != ''">
|
|
|
+ and PREVIOUS_ORDER_NUMBER = #{previousOrderNumber}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -154,9 +167,18 @@
|
|
|
<if test="truckRemark != null and truckRemark != ''">
|
|
|
and TRUCK_REMARK LIKE '%${truckRemark}%'
|
|
|
</if>
|
|
|
+ <if test="warrantyNumber != null">
|
|
|
+ and WARRANTY_NUMBER = #{warrantyNumber}
|
|
|
+ </if>
|
|
|
+ <if test="shippingAddressIds != null and shippingAddressIds != ''">
|
|
|
+ and SHIPPING_ADDRESS_IDS LIKE '%${shippingAddressIds}%'
|
|
|
+ </if>
|
|
|
+ <if test="previousOrderNumber != null and previousOrderNumber != ''">
|
|
|
+ and PREVIOUS_ORDER_NUMBER LIKE '%${previousOrderNumber}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
delete from AMS_SALE_ORDER_MATERIAL
|
|
|
where SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
@@ -214,6 +236,15 @@
|
|
|
<if test="truckRemark != null and truckRemark != ''">
|
|
|
or TRUCK_REMARK = #{truckRemark}
|
|
|
</if>
|
|
|
+ <if test="warrantyNumber != null">
|
|
|
+ or WARRANTY_NUMBER = #{warrantyNumber}
|
|
|
+ </if>
|
|
|
+ <if test="shippingAddressIds != null and shippingAddressIds != ''">
|
|
|
+ or SHIPPING_ADDRESS_IDS = #{shippingAddressIds}
|
|
|
+ </if>
|
|
|
+ <if test="previousOrderNumber != null and previousOrderNumber != ''">
|
|
|
+ or PREVIOUS_ORDER_NUMBER = #{previousOrderNumber}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmsSaleOrderMaterial">
|
|
|
insert into AMS_SALE_ORDER_MATERIAL (SALE_ORDER_MATERIAL_ID, SALE_ORDER_ID,
|
|
@@ -223,7 +254,8 @@
|
|
|
INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETED, UPDATED,
|
|
|
ISSUE_STATUS, STEEL_RECEIPT_DATE, PRICE_ID,
|
|
|
- TRUCK_REMARK)
|
|
|
+ TRUCK_REMARK, WARRANTY_NUMBER, SHIPPING_ADDRESS_IDS,
|
|
|
+ PREVIOUS_ORDER_NUMBER)
|
|
|
values (#{saleOrderMaterialId,jdbcType=DECIMAL}, #{saleOrderId,jdbcType=DECIMAL},
|
|
|
#{saleOrderMaterialTruckNo,jdbcType=DECIMAL}, #{saleShippingAddressId,jdbcType=DECIMAL},
|
|
|
#{saleDateOfReceipt,jdbcType=TIMESTAMP}, #{saleOrderConsignee,jdbcType=VARCHAR},
|
|
@@ -231,7 +263,8 @@
|
|
|
#{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
#{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{updated,jdbcType=DECIMAL},
|
|
|
#{issueStatus,jdbcType=DECIMAL}, #{steelReceiptDate,jdbcType=TIMESTAMP}, #{priceId,jdbcType=DECIMAL},
|
|
|
- #{truckRemark,jdbcType=VARCHAR})
|
|
|
+ #{truckRemark,jdbcType=VARCHAR}, #{warrantyNumber,jdbcType=DECIMAL}, #{shippingAddressIds,jdbcType=VARCHAR},
|
|
|
+ #{previousOrderNumber,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsSaleOrderMaterial">
|
|
|
insert into AMS_SALE_ORDER_MATERIAL
|
|
@@ -290,6 +323,15 @@
|
|
|
<if test="truckRemark != null">
|
|
|
TRUCK_REMARK,
|
|
|
</if>
|
|
|
+ <if test="warrantyNumber != null">
|
|
|
+ WARRANTY_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="shippingAddressIds != null">
|
|
|
+ SHIPPING_ADDRESS_IDS,
|
|
|
+ </if>
|
|
|
+ <if test="previousOrderNumber != null">
|
|
|
+ PREVIOUS_ORDER_NUMBER,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="saleOrderMaterialId != null">
|
|
@@ -346,6 +388,15 @@
|
|
|
<if test="truckRemark != null">
|
|
|
#{truckRemark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="warrantyNumber != null">
|
|
|
+ #{warrantyNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="shippingAddressIds != null">
|
|
|
+ #{shippingAddressIds,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="previousOrderNumber != null">
|
|
|
+ #{previousOrderNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsSaleOrderMaterial">
|
|
@@ -366,7 +417,10 @@
|
|
|
ISSUE_STATUS = #{issueStatus,jdbcType=DECIMAL},
|
|
|
STEEL_RECEIPT_DATE = #{steelReceiptDate,jdbcType=TIMESTAMP},
|
|
|
PRICE_ID = #{priceId,jdbcType=DECIMAL},
|
|
|
- TRUCK_REMARK = #{truckRemark,jdbcType=VARCHAR}
|
|
|
+ TRUCK_REMARK = #{truckRemark,jdbcType=VARCHAR},
|
|
|
+ WARRANTY_NUMBER = #{warrantyNumber,jdbcType=DECIMAL},
|
|
|
+ SHIPPING_ADDRESS_IDS = #{shippingAddressIds,jdbcType=VARCHAR},
|
|
|
+ PREVIOUS_ORDER_NUMBER = #{previousOrderNumber,jdbcType=VARCHAR}
|
|
|
where SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsSaleOrderMaterial">
|
|
@@ -423,13 +477,19 @@
|
|
|
<if test="truckRemark != null">
|
|
|
TRUCK_REMARK = #{truckRemark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="shippingAddressIds !=null">
|
|
|
- SHIPPING_ADDRESS_IDS = #{shippingAddressIds,jdbcType=VARCHAR}
|
|
|
+ <if test="warrantyNumber != null">
|
|
|
+ WARRANTY_NUMBER = #{warrantyNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="shippingAddressIds != null">
|
|
|
+ SHIPPING_ADDRESS_IDS = #{shippingAddressIds,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="previousOrderNumber != null">
|
|
|
+ PREVIOUS_ORDER_NUMBER = #{previousOrderNumber,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where SALE_ORDER_MATERIAL_ID = #{saleOrderMaterialId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -451,7 +511,9 @@
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, DELETED,
|
|
|
UPDATED, ISSUE_STATUS, STEEL_RECEIPT_DATE,
|
|
|
- PRICE_ID, TRUCK_REMARK)
|
|
|
+ PRICE_ID, TRUCK_REMARK, WARRANTY_NUMBER,
|
|
|
+ SHIPPING_ADDRESS_IDS, PREVIOUS_ORDER_NUMBER
|
|
|
+ )
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.saleOrderMaterialId,jdbcType=DECIMAL},
|
|
@@ -462,7 +524,9 @@
|
|
|
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
|
|
|
#{item.updated,jdbcType=DECIMAL}, #{item.issueStatus,jdbcType=DECIMAL}, #{item.steelReceiptDate,jdbcType=TIMESTAMP},
|
|
|
- #{item.priceId,jdbcType=DECIMAL}, #{item.truckRemark,jdbcType=VARCHAR} from dual
|
|
|
+ #{item.priceId,jdbcType=DECIMAL}, #{item.truckRemark,jdbcType=VARCHAR}, #{item.warrantyNumber,jdbcType=DECIMAL},
|
|
|
+ #{item.shippingAddressIds,jdbcType=VARCHAR}, #{item.previousOrderNumber,jdbcType=VARCHAR}
|
|
|
+ from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -540,12 +604,23 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case SALE_ORDER_MATERIAL_ID" separator=" ">
|
|
|
when #{item.saleOrderMaterialId,jdbcType=DECIMAL} then #{item.truckRemark,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
+ ,WARRANTY_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SALE_ORDER_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.saleOrderMaterialId,jdbcType=DECIMAL} then #{item.warrantyNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SHIPPING_ADDRESS_IDS=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SALE_ORDER_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.saleOrderMaterialId,jdbcType=DECIMAL} then #{item.shippingAddressIds,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PREVIOUS_ORDER_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case SALE_ORDER_MATERIAL_ID" separator=" ">
|
|
|
+ when #{item.saleOrderMaterialId,jdbcType=DECIMAL} then #{item.previousOrderNumber,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
where SALE_ORDER_MATERIAL_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.saleOrderMaterialId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
-
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from AMS_SALE_ORDER_MATERIAL
|
|
|
where SALE_ORDER_MATERIAL_ID in
|
|
@@ -554,6 +629,9 @@
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
|
<select id="selectMaxIdReceive" resultType="java.math.BigDecimal">
|