123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?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.TMonthlyQualityReportS6107Mapper">
-
- <resultMap type="TMonthlyQualityReportS6107" id="TMonthlyQualityReportS6107Result">
- <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="cod" column="cod" />
- <result property="ph" column="ph" />
- <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" />
- </resultMap>
- <sql id="selectTMonthlyQualityReportS6107Vo">
- select d.id, d.location_name, d.sample_point, d.sample_date, d.sample_name, d.cod, d.ph, 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_s6107 d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <select id="selectTMonthlyQualityReportS6107List" parameterType="TMonthlyQualityReportS6107" resultMap="TMonthlyQualityReportS6107Result">
- <include refid="selectTMonthlyQualityReportS6107Vo"/>
- <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="cod != null and cod != ''"> and cod = #{cod}</if>
- <if test="ph != null and ph != ''"> and ph = #{ph}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
-
- <select id="selectTMonthlyQualityReportS6107ById" parameterType="Long" resultMap="TMonthlyQualityReportS6107Result">
- <include refid="selectTMonthlyQualityReportS6107Vo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTMonthlyQualityReportS6107" parameterType="TMonthlyQualityReportS6107">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_quality_report_s6107.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_monthly_quality_report_s6107
- <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="cod != null">cod,</if>
- <if test="ph != null">ph,</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>
- </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="cod != null">#{cod},</if>
- <if test="ph != null">#{ph},</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>
- </trim>
- </insert>
- <update id="updateTMonthlyQualityReportS6107" parameterType="TMonthlyQualityReportS6107">
- update t_monthly_quality_report_s6107
- <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="cod != null">cod = #{cod},</if>
- <if test="ph != null">ph = #{ph},</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>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTMonthlyQualityReportS6107ById" parameterType="Long">
- update t_monthly_quality_report_s6107 set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTMonthlyQualityReportS6107ByIds" parameterType="String">
- update t_monthly_quality_report_s6107 set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
-
- </mapper>
|