|
|
|
@ -11,23 +11,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="tireId" column="tire_id" />
|
|
|
|
<result property="tireId" column="tire_id" />
|
|
|
|
<result property="tireCode" column="tire_code" />
|
|
|
|
<result property="tireCode" column="tire_code" />
|
|
|
|
<result property="treadDepth" column="tread_depth" />
|
|
|
|
<result property="treadDepth" column="tread_depth" />
|
|
|
|
|
|
|
|
<result property="tirePress" column="tire_press" />
|
|
|
|
<result property="tireStatus" column="tire_status" />
|
|
|
|
<result property="tireStatus" column="tire_status" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="tyreBrand" column="tyre_brand" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="tyreModel" column="tyre_model" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="tyreLevel" column="tyre_level" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="tyrePattern" column="tyre_pattern" />
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
<result property="grooves" column="grooves" />
|
|
|
|
|
|
|
|
<result property="patternDepth" column="pattern_depth" />
|
|
|
|
|
|
|
|
<result property="tyreType" column="tyre_type" />
|
|
|
|
|
|
|
|
<result property="selfNo" column="self_no" />
|
|
|
|
|
|
|
|
<result property="tyreEpc" column="tyre_epc" />
|
|
|
|
|
|
|
|
<result property="positionDesc" column="position_desc" />
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectBizOrderTireDetailVo">
|
|
|
|
<sql id="selectBizOrderTireDetailVo">
|
|
|
|
select detail_id, order_id, position_id, tire_id, tire_code, tread_depth, tire_status, create_time from biz_order_tire_detail
|
|
|
|
select detail_id, order_id, position_id, tire_id, tire_code, tread_depth, tire_press, tire_status, create_by, create_time, update_by, update_time, remark from biz_order_tire_detail
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBizOrderTireDetailList" parameterType="BizOrderTireDetail" resultMap="BizOrderTireDetailResult">
|
|
|
|
<select id="selectBizOrderTireDetailList" parameterType="BizOrderTireDetail" resultMap="BizOrderTireDetailResult">
|
|
|
|
@ -36,51 +30,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="orderId != null "> and order_id = #{orderId}</if>
|
|
|
|
<if test="orderId != null "> and order_id = #{orderId}</if>
|
|
|
|
<if test="positionId != null "> and position_id = #{positionId}</if>
|
|
|
|
<if test="positionId != null "> and position_id = #{positionId}</if>
|
|
|
|
<if test="tireId != null "> and tire_id = #{tireId}</if>
|
|
|
|
<if test="tireId != null "> and tire_id = #{tireId}</if>
|
|
|
|
<if test="tireCode != null and tireCode != ''"> and tire_code like concat('%', #{tireCode}, '%')</if>
|
|
|
|
<if test="tireCode != null and tireCode != ''"> and tire_code = #{tireCode}</if>
|
|
|
|
<if test="treadDepth != null "> and tread_depth = #{treadDepth}</if>
|
|
|
|
<if test="treadDepth != null "> and tread_depth = #{treadDepth}</if>
|
|
|
|
|
|
|
|
<if test="tirePress != null "> and tire_press = #{tirePress}</if>
|
|
|
|
<if test="tireStatus != null and tireStatus != ''"> and tire_status = #{tireStatus}</if>
|
|
|
|
<if test="tireStatus != null and tireStatus != ''"> and tire_status = #{tireStatus}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBizOrderTireDetailById" parameterType="Long" resultMap="BizOrderTireDetailResult">
|
|
|
|
<select id="selectBizOrderTireDetailByDetailId" parameterType="Long" resultMap="BizOrderTireDetailResult">
|
|
|
|
<include refid="selectBizOrderTireDetailVo"/>
|
|
|
|
<include refid="selectBizOrderTireDetailVo"/>
|
|
|
|
where detail_id = #{detailId}
|
|
|
|
where detail_id = #{detailId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectTireDetailByOrderId" parameterType="Long" resultMap="BizOrderTireDetailResult">
|
|
|
|
<insert id="insertBizOrderTireDetail" parameterType="BizOrderTireDetail" useGeneratedKeys="true" keyProperty="detailId">
|
|
|
|
select d.detail_id, d.order_id, d.position_id, d.tire_id, d.tire_code, d.tread_depth, d.tire_status, d.create_time,
|
|
|
|
|
|
|
|
t.tyre_brand, t.tyre_model, t.tyre_level, t.tyre_pattern, t.grooves, t.pattern_depth, t.tyre_type, t.self_no, t.tyre_epc,
|
|
|
|
|
|
|
|
p.dict_label as position_desc
|
|
|
|
|
|
|
|
from biz_order_tire_detail d
|
|
|
|
|
|
|
|
left join base_tyre t on d.tire_id = t.tyre_id
|
|
|
|
|
|
|
|
left join sys_dict_data p on d.position_id = p.dict_code and p.dict_type='WheelPosition'
|
|
|
|
|
|
|
|
where d.order_id = #{orderId}
|
|
|
|
|
|
|
|
order by d.position_id
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertBizOrderTireDetail" parameterType="BizOrderTireDetail">
|
|
|
|
|
|
|
|
insert into biz_order_tire_detail
|
|
|
|
insert into biz_order_tire_detail
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="detailId != null">detail_id,</if>
|
|
|
|
<if test="orderId != null">order_id,</if>
|
|
|
|
<if test="orderConservativeId != null">order_id,</if>
|
|
|
|
|
|
|
|
<if test="positionId != null">position_id,</if>
|
|
|
|
<if test="positionId != null">position_id,</if>
|
|
|
|
<if test="tireId != null">tire_id,</if>
|
|
|
|
<if test="tireId != null">tire_id,</if>
|
|
|
|
<if test="tireCode != null">tire_code,</if>
|
|
|
|
<if test="tireCode != null">tire_code,</if>
|
|
|
|
<if test="treadDepth != null">tread_depth,</if>
|
|
|
|
<if test="treadDepth != null">tread_depth,</if>
|
|
|
|
|
|
|
|
<if test="tirePress != null">tire_press,</if>
|
|
|
|
<if test="tireStatus != null">tire_status,</if>
|
|
|
|
<if test="tireStatus != null">tire_status,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="detailId != null">#{detailId},</if>
|
|
|
|
|
|
|
|
<if test="orderId != null">#{orderId},</if>
|
|
|
|
<if test="orderId != null">#{orderId},</if>
|
|
|
|
<if test="positionId != null>">#{positionId},</if>
|
|
|
|
<if test="positionId != null">#{positionId},</if>
|
|
|
|
<if test="tireId != null>">#{tireId},</if>
|
|
|
|
<if test="tireId != null">#{tireId},</if>
|
|
|
|
<if test="tireCode != null>">#{tireCode},</if>
|
|
|
|
<if test="tireCode != null">#{tireCode},</if>
|
|
|
|
<if test="treadDepth != null>">#{treadDepth},</if>
|
|
|
|
<if test="treadDepth != null">#{treadDepth},</if>
|
|
|
|
<if test="tireStatus != null>">#{tireStatus},</if>
|
|
|
|
<if test="tirePress != null">#{tirePress},</if>
|
|
|
|
<if test="createTime != null>">#{createTime},</if>
|
|
|
|
<if test="tireStatus != null">#{tireStatus},</if>
|
|
|
|
<if test="createBy != null>">#{createBy},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
@ -92,32 +82,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="tireId != null">tire_id = #{tireId},</if>
|
|
|
|
<if test="tireId != null">tire_id = #{tireId},</if>
|
|
|
|
<if test="tireCode != null">tire_code = #{tireCode},</if>
|
|
|
|
<if test="tireCode != null">tire_code = #{tireCode},</if>
|
|
|
|
<if test="treadDepth != null">tread_depth = #{treadDepth},</if>
|
|
|
|
<if test="treadDepth != null">tread_depth = #{treadDepth},</if>
|
|
|
|
|
|
|
|
<if test="tirePress != null">tire_press = #{tirePress},</if>
|
|
|
|
<if test="tireStatus != null">tire_status = #{tireStatus},</if>
|
|
|
|
<if test="tireStatus != null">tire_status = #{tireStatus},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where detail_id = #{detailId}
|
|
|
|
where detail_id = #{detailId}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBizOrderTireDetailById" parameterType="Long">
|
|
|
|
<delete id="deleteBizOrderTireDetailByDetailId" parameterType="Long">
|
|
|
|
delete from biz_order_tire_detail where detail_id = #{detailId}
|
|
|
|
delete from biz_order_tire_detail where detail_id = #{detailId}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBizOrderTireDetailByIds" parameterType="String">
|
|
|
|
<delete id="deleteBizOrderTireDetailByDetailIds" parameterType="String">
|
|
|
|
delete from biz_order_tire_detail where detail_id in
|
|
|
|
delete from biz_order_tire_detail where detail_id in
|
|
|
|
<foreach item="detailId" collection="array" open="(" separator="," close=")">
|
|
|
|
<foreach item="detailId" collection="array" open="(" separator="," close=")">
|
|
|
|
#{detailId}
|
|
|
|
#{detailId}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsertTireDetail" parameterType="java.util.List">
|
|
|
|
|
|
|
|
insert into biz_order_tire_detail (order_id, position_id, tire_id, tire_code, tread_depth, tire_status, create_time, create_by) values
|
|
|
|
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
|
|
|
|
(#{item.orderId}, #{item.positionId}, #{item.tireId}, #{item.tireCode}, #{item.treadDepth}, #{item.tireStatus}, #{item.createTime}, #{item.createBy})
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTireDetailByOrderId" parameterType="Long">
|
|
|
|
|
|
|
|
delete from biz_order_tire_detail where order_id = #{orderId}
|
|
|
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|