149 lines
3.9 KiB
XML
149 lines
3.9 KiB
XML
<?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.bonus.newSettlement.dao.ProjectSettlementDetailsDao">
|
|
<resultMap id="baseMap" type="com.bonus.newSettlement.beans.ProjectSettlementDetailsBean">
|
|
<id column="ID" property="id" />
|
|
<result column="agreementId" property="agreement.id" />
|
|
<result column="agreementCode" property="agreement.code" />
|
|
<result column="typeId" property="type.id" />
|
|
<result column="typeName" property="type.name" />
|
|
<result column="num" property="num" />
|
|
<result column="price" property="price" />
|
|
<result column="startDate" property="startDate" />
|
|
<result column="endDate" property="endDate" />
|
|
<result column="backDate" property="backDate" />
|
|
<result column="status" property="status" />
|
|
<result column="isActive" property="isActive" />
|
|
<result column="batchFlag" property="batchFlag" />
|
|
<result column="settlementTimes" property="settlementTimes" />
|
|
<result column="remarks" property="remarks" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
<update id="updateBean" parameterType="com.bonus.newSettlement.beans.ProjectSettlementDetailsBean">
|
|
UPDATE project_settlement_details
|
|
<set>
|
|
<if test="sltInfo != null">
|
|
slt_info = #{sltInfo.id},
|
|
</if>
|
|
<if test="costType != null">
|
|
cost_type = #{costType.id},
|
|
</if>
|
|
<if test="type != null">
|
|
type = #{type.id},
|
|
</if>
|
|
<if test="num != null">
|
|
num = #{num},
|
|
</if>
|
|
<if test="price != null">
|
|
price = #{price},
|
|
</if>
|
|
<if test="subtotal != null">
|
|
subtotal = #{subtotal},
|
|
</if>
|
|
<if test="startDate != null and startDate != '' ">
|
|
start_date = #{startDate},
|
|
</if>
|
|
<if test="endDate != null and endDate != '' ">
|
|
end_date = #{endDate},
|
|
</if>
|
|
<if test="dayLen != null">
|
|
day_len = #{dayLen},
|
|
</if>
|
|
|
|
<if test="storage != null">
|
|
storage = #{storage.id,},
|
|
</if>
|
|
<if test="remarks != null and remarks != ''">
|
|
remarks = #{remarks},
|
|
</if>
|
|
<if test="backDate != null and backDate != '' ">
|
|
back_date = #{backDate},
|
|
</if>
|
|
</set>
|
|
where ID = #{id}
|
|
</update>
|
|
|
|
<insert id="insertBean" keyProperty="id" useGeneratedKeys="true" parameterType="com.bonus.newSettlement.beans.ProjectSettlementDetailsBean" >
|
|
INSERT INTO project_settlement_details
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="sltInfo != null">
|
|
slt_info,
|
|
</if>
|
|
<if test="costType != null">
|
|
cost_type,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
<if test="num != null">
|
|
num,
|
|
</if>
|
|
<if test="price != null">
|
|
price,
|
|
</if>
|
|
<if test="subtotal != null">
|
|
subtotal,
|
|
</if>
|
|
<if test="startDate != null and startDate != '' ">
|
|
start_date,
|
|
</if>
|
|
<if test="endDate != null and endDate != '' ">
|
|
end_date,
|
|
</if>
|
|
<if test="dayLen != null">
|
|
day_len,
|
|
</if>
|
|
|
|
<if test="storage != null">
|
|
storage,
|
|
</if>
|
|
<if test="backDate != null and backDate != '' ">
|
|
back_date,
|
|
</if>
|
|
<if test="remarks != null and remarks != ''">
|
|
remarks,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="sltInfo != null">
|
|
#{sltInfo.id},
|
|
</if>
|
|
<if test="costType != null">
|
|
#{costType},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type.id},
|
|
</if>
|
|
<if test="num != null">
|
|
#{num},
|
|
</if>
|
|
<if test="price != null">
|
|
#{price},
|
|
</if>
|
|
<if test="subtotal != null">
|
|
#{subtotal},
|
|
</if>
|
|
<if test="startDate != null and startDate != '' ">
|
|
#{startDate},
|
|
</if>
|
|
<if test="endDate != null and endDate != '' ">
|
|
#{endDate},
|
|
</if>
|
|
<if test="dayLen != null">
|
|
#{dayLen},
|
|
</if>
|
|
<if test="storage != null">
|
|
#{storage.id},
|
|
</if>
|
|
<if test="backDate != null and backDate != '' ">
|
|
#{backDate},
|
|
</if>
|
|
<if test="remarks != null and remarks != ''">
|
|
#{remarks},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
</mapper> |