|
|
@@ -6,6 +6,7 @@
|
|
|
<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="endTime" column="end_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"/>
|
|
|
@@ -21,7 +22,7 @@
|
|
|
</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
|
|
|
+id, tdl_id, start_time, end_time, dep_name, year_feature, type, inspection_items, enterprise_problems, solution, inspection_conclusion, remind_follow, remarks, aid, aname, create_time
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -34,27 +35,28 @@ id, tdl_id, start_time, dep_name, year_feature, type, inspection_items, enterpri
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<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 into task_feature_log(tdl_id, start_time, end_time, dep_name, year_feature, type, inspection_items, enterprise_problems, solution, inspection_conclusion, remind_follow, remarks, aid, aname, create_time)
|
|
|
+ values (#{tdlId}, #{startTime}, #{endTime}, #{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)
|
|
|
+ insert into task_feature_log(tdl_id, start_time, end_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})
|
|
|
+ (#{entity.tdlId}, #{entity.startTime}, #{entity.endTime}, #{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)
|
|
|
+ insert into task_feature_log(tdl_id, start_time, end_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})
|
|
|
+ (#{entity.tdlId}, #{entity.startTime}, #{entity.endTime}, #{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),
|
|
|
+end_time = values(end_time),
|
|
|
dep_name = values(dep_name),
|
|
|
year_feature = values(year_feature),
|
|
|
type = values(type),
|
|
|
@@ -79,6 +81,9 @@ create_time = values(create_time)
|
|
|
<if test="startTime != null">
|
|
|
start_time = #{startTime},
|
|
|
</if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ end_time = #{endTime},
|
|
|
+ </if>
|
|
|
<if test="depName != null and depName != ''">
|
|
|
dep_name = #{depName},
|
|
|
</if>
|
|
|
@@ -135,6 +140,9 @@ create_time = values(create_time)
|
|
|
<if test="startTime != null">
|
|
|
and start_time = #{startTime}
|
|
|
</if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and end_time = #{endTime}
|
|
|
+ </if>
|
|
|
<if test="depName != null and depName != ''">
|
|
|
and dep_name = #{depName}
|
|
|
</if>
|
|
|
@@ -191,6 +199,9 @@ create_time = values(create_time)
|
|
|
<if test="startTime != null">
|
|
|
and start_time = #{startTime}
|
|
|
</if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and end_time = #{endTime}
|
|
|
+ </if>
|
|
|
<if test="depName != null and depName != ''">
|
|
|
and dep_name = #{depName}
|
|
|
</if>
|