| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?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.ruoyi.project.production.mapper.TMonthlyQualityReportS2007Mapper">
-
- <resultMap type="TMonthlyQualityReportS2007" id="TMonthlyQualityReportS2007Result">
- <result property="id" column="id" />
- <result property="locationName" column="location_name" />
- <result property="samplePoint" column="sample_point" />
- <result property="sampleDate" column="sample_date" />
- <result property="sampleName" column="sample_name" />
- <result property="viscosity" column="viscosity" />
- <result property="deptId" column="dept_id" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="deptName" column="dept_name" />
- <result property="startDate" column="start_date" />
- <result property="endDate" column="end_date" />
- <result property="endPoint" column="end_point" />
- <result property="pressureDifference" column="pressure_difference" />
- <result property="production" column="production" />
- </resultMap>
- <sql id="selectTMonthlyQualityReportS2007Vo">
- select d.id, d.end_point, d.pressure_difference, d.production, d.location_name, d.sample_point, d.sample_date, d.sample_name, d.viscosity, d.dept_id, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time ,s.dept_name from t_monthly_quality_report_s2007 d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <select id="selectTMonthlyQualityReportS2007List" parameterType="TMonthlyQualityReportS2007" resultMap="TMonthlyQualityReportS2007Result">
- <include refid="selectTMonthlyQualityReportS2007Vo"/>
- <where>
- <if test="startDate != null "> and sample_date >= #{startDate}</if>
- <if test="endDate != null "> and sample_date <= #{endDate}</if>
- <if test="locationName != null and locationName != ''"> and location_name like concat(concat('%', #{locationName}), '%')</if>
- <if test="samplePoint != null and samplePoint != ''"> and sample_point = #{samplePoint}</if>
- <if test="sampleDate != null "> and sample_date = #{sampleDate}</if>
- <if test="sampleName != null and sampleName != ''"> and sample_name like concat(concat('%', #{sampleName}), '%')</if>
- <if test="viscosity != null and viscosity != ''"> and viscosity = #{viscosity}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="endPoint != null "> and end_point = #{endPoint}</if>
- <if test="pressureDifference != null "> and pressure_difference = #{pressureDifference}</if>
- <if test="production != null "> and production = #{production}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
-
- <select id="selectTMonthlyQualityReportS2007ById" parameterType="Long" resultMap="TMonthlyQualityReportS2007Result">
- <include refid="selectTMonthlyQualityReportS2007Vo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTMonthlyQualityReportS2007" parameterType="TMonthlyQualityReportS2007">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_quality_report_s2007.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_monthly_quality_report_s2007
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="locationName != null">location_name,</if>
- <if test="samplePoint != null">sample_point,</if>
- <if test="sampleDate != null">sample_date,</if>
- <if test="sampleName != null">sample_name,</if>
- <if test="viscosity != null">viscosity,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="delFlag != null">del_flag,</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="endPoint != null">end_point,</if>
- <if test="pressureDifference != null">pressure_difference,</if>
- <if test="production != null">production,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="locationName != null">#{locationName},</if>
- <if test="samplePoint != null">#{samplePoint},</if>
- <if test="sampleDate != null">#{sampleDate},</if>
- <if test="sampleName != null">#{sampleName},</if>
- <if test="viscosity != null">#{viscosity},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="delFlag != null">#{delFlag},</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="endPoint != null">#{endPoint},</if>
- <if test="pressureDifference != null">#{pressureDifference},</if>
- <if test="production != null">#{production},</if>
- </trim>
- </insert>
- <update id="updateTMonthlyQualityReportS2007" parameterType="TMonthlyQualityReportS2007">
- update t_monthly_quality_report_s2007
- <trim prefix="SET" suffixOverrides=",">
- <if test="locationName != null">location_name = #{locationName},</if>
- <if test="samplePoint != null">sample_point = #{samplePoint},</if>
- <if test="sampleDate != null">sample_date = #{sampleDate},</if>
- <if test="sampleName != null">sample_name = #{sampleName},</if>
- <if test="viscosity != null">viscosity = #{viscosity},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</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="endPoint != null">end_point = #{endPoint},</if>
- <if test="pressureDifference != null">pressure_difference = #{pressureDifference},</if>
- <if test="production != null">production = #{production},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTMonthlyQualityReportS2007ById" parameterType="Long">
- update t_monthly_quality_report_s2007 set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTMonthlyQualityReportS2007ByIds" parameterType="String">
- update t_monthly_quality_report_s2007 set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
-
- </mapper>
|