|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.ruoyi.system.mapper.SysSalesEstimateChildMapper"> |
|
|
|
|
|
|
|
<resultMap type="SysSalesEstimateChild" id="SysSalesEstimateChildResult"> |
|
|
|
<resultMap type="SalesEstimateChild" id="SysSalesEstimateChildResult"> |
|
|
|
<result property="id" column="id" /> |
|
|
|
<result property="quoteId" column="quoteId" /> |
|
|
|
<result property="materialId" column="materialId" /> |
|
|
@ -43,10 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectSysSalesEstimateChildVo"> |
|
|
|
select id, quoteId, materialId, materialCode, materialName, materialBom, materialType, processMethod, brand, photoUrl, unit, describe, countTax, usdTax, materialNum, materialSole, materialRmb, materialNoRmb, materialRmbSum, materialNoRmbSum, materialNoUsd, materialUsd, materialNoUsdSum, materialUsdSum, delivery_time, expiry_day, create_by, create_time, update_by, update_time, remark, use_status, audit_status, out_bound_quantity, un_bound_quantity from sys_sales_estimate_child |
|
|
|
select id, quoteId, materialId, materialCode, materialName, materialBom, materialType, processMethod, brand, photoUrl, unit, describe, countTax, usdTax, materialNum, materialSole, materialRmb, materialNoRmb, materialRmbSum, materialNoRmbSum, materialNoUsd, materialUsd, materialNoUsdSum, materialUsdSum, delivery_time, expiry_day, create_by, create_time, update_by, update_time, remark, use_status, audit_status, out_bound_quantity, un_bound_quantity from sales_estimate_child |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectSysSalesEstimateChildList" parameterType="SysSalesEstimateChild" resultMap="SysSalesEstimateChildResult"> |
|
|
|
<select id="selectSysSalesEstimateChildList" parameterType="SalesEstimateChild" resultMap="SysSalesEstimateChildResult"> |
|
|
|
<include refid="selectSysSalesEstimateChildVo"/> |
|
|
|
<where> |
|
|
|
<if test="quoteId != null and quoteId != ''"> and quoteId = #{quoteId}</if> |
|
|
@ -74,8 +74,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertSysSalesEstimateChild" parameterType="SysSalesEstimateChild" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
insert into sys_sales_estimate_child |
|
|
|
<insert id="insertSysSalesEstimateChild" parameterType="SalesEstimateChild" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
insert into sales_estimate_child |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="quoteId != null">quoteId,</if> |
|
|
|
<if test="materialId != null">materialId,</if> |
|
|
@ -150,8 +150,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateSysSalesEstimateChild" parameterType="SysSalesEstimateChild"> |
|
|
|
update sys_sales_estimate_child |
|
|
|
<update id="updateSysSalesEstimateChild" parameterType="SalesEstimateChild"> |
|
|
|
update sales_estimate_child |
|
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
<if test="quoteId != null">quoteId = #{quoteId},</if> |
|
|
|
<if test="materialId != null">materialId = #{materialId},</if> |
|
|
@ -192,22 +192,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteSysSalesEstimateChildById" parameterType="Long"> |
|
|
|
delete from sys_sales_estimate_child where id = #{id} |
|
|
|
delete from sales_estimate_child where id = #{id} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<delete id="deleteSysSalesEstimateChildByIds" parameterType="String"> |
|
|
|
delete from sys_sales_estimate_child where id in |
|
|
|
delete from sales_estimate_child where id in |
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
</delete> |
|
|
|
|
|
|
|
<update id="cancelSysSalesEstimateChildById" parameterType="Long"> |
|
|
|
update sys_sales_estimate_child set del_flag = '1' where id = #{id} |
|
|
|
update sales_estimate_child set del_flag = '1' where id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="restoreSysSalesEstimateChildById" parameterType="Long"> |
|
|
|
update sys_sales_estimate_child set del_flag = '0' where id = #{id} |
|
|
|
update sales_estimate_child set del_flag = '0' where id = #{id} |
|
|
|
</update> |
|
|
|
|
|
|
|
</mapper> |