|
|
@@ -0,0 +1,239 @@
|
|
|
+<?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.goafanti.common.dao.TaskFeatureLogMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.goafanti.common.model.TaskFeatureLog" id="TaskFeatureLogMap">
|
|
|
+ <result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="tdlId" column="tdl_id" jdbcType="INTEGER"/>
|
|
|
+ <result property="startTime" column="start_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="depName" column="dep_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="yearFeature" column="year_feature" jdbcType="VARCHAR"/>
|
|
|
+ <result property="type" column="type" jdbcType="INTEGER"/>
|
|
|
+ <result property="inspectionItems" column="inspection_items" jdbcType="VARCHAR"/>
|
|
|
+ <result property="enterpriseProblems" column="enterprise_problems" jdbcType="VARCHAR"/>
|
|
|
+ <result property="solution" column="solution" jdbcType="VARCHAR"/>
|
|
|
+ <result property="inspectionConclusion" column="inspection_conclusion" jdbcType="VARCHAR"/>
|
|
|
+ <result property="remindFollow" column="remind_follow" jdbcType="VARCHAR"/>
|
|
|
+ <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="aname" column="aname" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="TaskFeatureLogAllSql">
|
|
|
+id, tdl_id, start_time, dep_name, year_feature, type, inspection_items, enterprise_problems, solution, inspection_conclusion, remind_follow, remarks, aid, aname, create_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--查询单个-->
|
|
|
+ <select id="selectById" resultMap="TaskFeatureLogMap">
|
|
|
+ select
|
|
|
+ <include refid="TaskFeatureLogAllSql"/>
|
|
|
+ from task_feature_log
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增所有列-->
|
|
|
+ <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into task_feature_log(tdl_id, start_time, dep_name, year_feature, type, inspection_items, enterprise_problems, solution, inspection_conclusion, remind_follow, remarks, aid, aname, create_time)
|
|
|
+ values (#{tdlId}, #{startTime}, #{depName}, #{yearFeature}, #{type}, #{inspectionItems}, #{enterpriseProblems}, #{solution}, #{inspectionConclusion}, #{remindFollow}, #{remarks}, #{aid}, #{aname}, #{createTime})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertBatch">
|
|
|
+ insert into task_feature_log(tdl_id, start_time, dep_name, year_feature, type, inspection_items, enterprise_problems, solution, inspection_conclusion, remind_follow, remarks, aid, aname, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.tdlId}, #{entity.startTime}, #{entity.depName}, #{entity.yearFeature}, #{entity.type}, #{entity.inspectionItems}, #{entity.enterpriseProblems}, #{entity.solution}, #{entity.inspectionConclusion}, #{entity.remindFollow}, #{entity.remarks}, #{entity.aid}, #{entity.aname}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into task_feature_log(tdl_id, start_time, dep_name, year_feature, type, inspection_items, enterprise_problems, solution, inspection_conclusion, remind_follow, remarks, aid, aname, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.tdlId}, #{entity.startTime}, #{entity.depName}, #{entity.yearFeature}, #{entity.type}, #{entity.inspectionItems}, #{entity.enterpriseProblems}, #{entity.solution}, #{entity.inspectionConclusion}, #{entity.remindFollow}, #{entity.remarks}, #{entity.aid}, #{entity.aname}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ on duplicate key update
|
|
|
+tdl_id = values(tdl_id),
|
|
|
+start_time = values(start_time),
|
|
|
+dep_name = values(dep_name),
|
|
|
+year_feature = values(year_feature),
|
|
|
+type = values(type),
|
|
|
+inspection_items = values(inspection_items),
|
|
|
+enterprise_problems = values(enterprise_problems),
|
|
|
+solution = values(solution),
|
|
|
+inspection_conclusion = values(inspection_conclusion),
|
|
|
+remind_follow = values(remind_follow),
|
|
|
+remarks = values(remarks),
|
|
|
+aid = values(aid),
|
|
|
+aname = values(aname),
|
|
|
+create_time = values(create_time)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!--通过主键修改数据-->
|
|
|
+ <update id="update">
|
|
|
+ update task_feature_log
|
|
|
+ <set>
|
|
|
+ <if test="tdlId != null">
|
|
|
+ tdl_id = #{tdlId},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ start_time = #{startTime},
|
|
|
+ </if>
|
|
|
+ <if test="depName != null and depName != ''">
|
|
|
+ dep_name = #{depName},
|
|
|
+ </if>
|
|
|
+ <if test="yearFeature != null and yearFeature != ''">
|
|
|
+ year_feature = #{yearFeature},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type},
|
|
|
+ </if>
|
|
|
+ <if test="inspectionItems != null and inspectionItems != ''">
|
|
|
+ inspection_items = #{inspectionItems},
|
|
|
+ </if>
|
|
|
+ <if test="enterpriseProblems != null and enterpriseProblems != ''">
|
|
|
+ enterprise_problems = #{enterpriseProblems},
|
|
|
+ </if>
|
|
|
+ <if test="solution != null and solution != ''">
|
|
|
+ solution = #{solution},
|
|
|
+ </if>
|
|
|
+ <if test="inspectionConclusion != null and inspectionConclusion != ''">
|
|
|
+ inspection_conclusion = #{inspectionConclusion},
|
|
|
+ </if>
|
|
|
+ <if test="remindFollow != null and remindFollow != ''">
|
|
|
+ remind_follow = #{remindFollow},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ remarks = #{remarks},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null and aid != ''">
|
|
|
+ aid = #{aid},
|
|
|
+ </if>
|
|
|
+ <if test="aname != null and aname != ''">
|
|
|
+ aname = #{aname},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--查询指定行数据-->
|
|
|
+ <select id="findTaskFeatureLogList" resultMap="TaskFeatureLogMap">
|
|
|
+ select
|
|
|
+ <include refid="TaskFeatureLogAllSql"/>
|
|
|
+
|
|
|
+ from task_feature_log
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="tdlId != null">
|
|
|
+ and tdl_id = #{tdlId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and start_time = #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="depName != null and depName != ''">
|
|
|
+ and dep_name = #{depName}
|
|
|
+ </if>
|
|
|
+ <if test="yearFeature != null and yearFeature != ''">
|
|
|
+ and year_feature = #{yearFeature}
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ and type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="inspectionItems != null and inspectionItems != ''">
|
|
|
+ and inspection_items = #{inspectionItems}
|
|
|
+ </if>
|
|
|
+ <if test="enterpriseProblems != null and enterpriseProblems != ''">
|
|
|
+ and enterprise_problems = #{enterpriseProblems}
|
|
|
+ </if>
|
|
|
+ <if test="solution != null and solution != ''">
|
|
|
+ and solution = #{solution}
|
|
|
+ </if>
|
|
|
+ <if test="inspectionConclusion != null and inspectionConclusion != ''">
|
|
|
+ and inspection_conclusion = #{inspectionConclusion}
|
|
|
+ </if>
|
|
|
+ <if test="remindFollow != null and remindFollow != ''">
|
|
|
+ and remind_follow = #{remindFollow}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ and remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="aid != null and aid != ''">
|
|
|
+ and aid = #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="aname != null and aname != ''">
|
|
|
+ and aname = #{aname}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--统计总行数-->
|
|
|
+ <select id="findTaskFeatureLogCount" resultType="java.lang.Integer">
|
|
|
+ select count(1)
|
|
|
+ from task_feature_log
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="tdlId != null">
|
|
|
+ and tdl_id = #{tdlId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and start_time = #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="depName != null and depName != ''">
|
|
|
+ and dep_name = #{depName}
|
|
|
+ </if>
|
|
|
+ <if test="yearFeature != null and yearFeature != ''">
|
|
|
+ and year_feature = #{yearFeature}
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ and type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="inspectionItems != null and inspectionItems != ''">
|
|
|
+ and inspection_items = #{inspectionItems}
|
|
|
+ </if>
|
|
|
+ <if test="enterpriseProblems != null and enterpriseProblems != ''">
|
|
|
+ and enterprise_problems = #{enterpriseProblems}
|
|
|
+ </if>
|
|
|
+ <if test="solution != null and solution != ''">
|
|
|
+ and solution = #{solution}
|
|
|
+ </if>
|
|
|
+ <if test="inspectionConclusion != null and inspectionConclusion != ''">
|
|
|
+ and inspection_conclusion = #{inspectionConclusion}
|
|
|
+ </if>
|
|
|
+ <if test="remindFollow != null and remindFollow != ''">
|
|
|
+ and remind_follow = #{remindFollow}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ and remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="aid != null and aid != ''">
|
|
|
+ and aid = #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="aname != null and aname != ''">
|
|
|
+ and aname = #{aname}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--通过主键删除-->
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete from task_feature_log where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|
|
|
+
|