| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillPlanList" resultMap="emergencyDrillPlanInfoPageDOResult"> |
| | | select id,`drill_name`,`drill_address`,`drill_way`,`drill_level`,drill_plan_date ,gmt_moditify from emergency_drill_plan where del_flag = 0 |
| | | select id,`drill_name`,`drill_address`,`drill_way`,`drill_level`,drill_plan_date ,gmt_moditify |
| | | from emergency_drill_plan where del_flag = 0 |
| | | <if test="query.drillName != null and query.drillName != ''">and `drill_name` like concat('%', #{query.drillName}, '%')</if> |
| | | </select> |
| | | |
| | | <insert id="addEmergencyDrillPlan" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyDrillPlanInfo" |
| | |
| | | <if test="makingPlanDate != null ">making_plan_date,</if> |
| | | <if test="drillPlanDate != null ">drill_plan_date,</if> |
| | | <if test="makingUserUid != null ">making_user_uid,</if> |
| | | <if test="makingUserName != null and makingUserName != ''">`making_user_name`,</if> |
| | | <if test="makingDepartmentId != null ">making_department_id,</if> |
| | | <if test="planId != null ">plan_id,</if> |
| | | <if test="departmentId != null ">department_id,</if> |
| | |
| | | <if test="makingPlanDate != null ">#{makingPlanDate},</if> |
| | | <if test="drillPlanDate != null ">#{drillPlanDate},</if> |
| | | <if test="makingUserUid != null ">#{makingUserUid},</if> |
| | | <if test="makingUserName != null and makingUserName != ''">#{makingUserName},</if> |
| | | <if test="makingDepartmentId != null ">#{makingDepartmentId},</if> |
| | | <if test="planId != null ">#{planId},</if> |
| | | <if test="departmentId != null ">#{departmentId},</if> |
| | |
| | | <result column="making_plan_date" property="makingPlanDate"/> |
| | | <result column="drill_plan_date" property="drillPlanDate"/> |
| | | <result column="making_user_uid" property="makingUserUid"/> |
| | | <result column="making_user_name" property="makingUserName"/> |
| | | <result column="making_department_id" property="makingDepartmentId"/> |
| | | <result column="plan_id" property="planId"/> |
| | | <result column="department_id" property="departmentId"/> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillPlanById" resultMap="emergencyDrillPlanInfoDetailDOResult"> |
| | | select id ,`status`,`gmt_moditify`,`making_plan_date`,`drill_plan_date`,making_user_uid ,making_department_id ,plan_id ,department_id, |
| | | drill_expense ,drill_name ,drill_address ,drill_way ,drill_level ,insurance_measures ,remark ,purpose |
| | | from emergency_drill_plan |
| | | where del_flag = 0 and id = #{id} |
| | | SELECT |
| | | a.id, |
| | | a.`status`, |
| | | a.`gmt_moditify`, |
| | | a.`making_plan_date`, |
| | | a.`drill_plan_date`, |
| | | a.making_user_uid, |
| | | a.making_user_name, |
| | | a.making_department_id, |
| | | a.plan_id, |
| | | a.department_id, |
| | | a.drill_expense, |
| | | a.drill_name, |
| | | a.drill_address, |
| | | a.drill_way, |
| | | a.drill_level, |
| | | a.insurance_measures, |
| | | a.remark, |
| | | a.purpose, |
| | | b.`name` AS planName |
| | | FROM |
| | | emergency_drill_plan a |
| | | LEFT JOIN emergency_plan b ON a.plan_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | AND a.id = #{id} |
| | | </select> |
| | | |
| | | <update id="updateEmergencyDrillPlan" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyDrillPlanInfo"> |
| | | update emergency_drill_plan |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="gmtCreate != null ">gmt_create = #{gmtCreate},</if> |
| | | <if test="gmtModitify != null ">gmt_moditify = #{gmtModitify},</if> |
| | | <if test="createUid != null ">create_uid = #{createUid},</if> |
| | | <if test="updateUid != null ">update_uid = #{updateUid},</if> |
| | | <if test="status != null ">status = #{status},</if> |
| | | <if test="makingPlanDate != null ">making_plan_date=#{makingPlanDate},</if> |
| | | <if test="drillPlanDate != null ">drill_plan_date=#{drillPlanDate},</if> |
| | | <if test="makingUserUid != null ">making_user_uid=#{makingUserUid},</if> |
| | | <if test="makingUserName != null and makingUserName != ''">making_user_name=#{makingUserName},</if> |
| | | <if test="makingDepartmentId != null ">making_department_id=#{makingDepartmentId},</if> |
| | | <if test="planId != null ">plan_id=#{planId},</if> |
| | | <if test="departmentId != null ">department_id=#{departmentId},</if> |