fix:更新任务所有结构细化完成时间、工位升级时间、清单下发时间
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?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.sdm.project.dao.SimulationTaskExtraMapper">
|
||||
|
||||
<!-- 批量新增任务扩展属性 -->
|
||||
<insert id="addTaskExtraBatch">
|
||||
insert into simulation_task_extra (task_id, property_name, property_value, value_type, property_class, creator, create_time) values
|
||||
<foreach collection='list' item='taskExtra' index='index' separator=','>
|
||||
(#{taskExtra.nodeId}, #{taskExtra.propertyName}, #{taskExtra.propertyValue}, #{taskExtra.valueType}, #{taskExtra.propertyClass}, #{taskExtra.creator}, #{taskExtra.createTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 更新任务扩展属性(支持设置null值) -->
|
||||
<update id="editTaskExtraWithNull">
|
||||
update simulation_task_extra
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="taskExtra.propertyName != null and taskExtra.propertyName != ''">
|
||||
property_name = #{taskExtra.propertyName},
|
||||
</if>
|
||||
<choose>
|
||||
<when test="taskExtra.propertyValue != null">
|
||||
property_value = #{taskExtra.propertyValue},
|
||||
</when>
|
||||
<otherwise>
|
||||
property_value = null,
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="taskExtra.valueType != null and taskExtra.valueType != ''">
|
||||
value_type = #{taskExtra.valueType},
|
||||
</if>
|
||||
<if test="taskExtra.propertyClass != null and taskExtra.propertyClass != ''">
|
||||
property_class = #{taskExtra.propertyClass},
|
||||
</if>
|
||||
<if test="taskExtra.updater != null and taskExtra.updater != ''">
|
||||
updater = #{taskExtra.updater},
|
||||
</if>
|
||||
<if test="taskExtra.updateTime != null and taskExtra.updateTime != ''">
|
||||
update_time = #{taskExtra.updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{taskExtra.id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user