65 lines
2.6 KiB
XML
65 lines
2.6 KiB
XML
|
|
<?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.bonus.digital.mapper.PlanManagementMapper">
|
||
|
|
<insert id="addPlanManagement">
|
||
|
|
insert into tb_plan_management (plan_management_month,project_name,work_content,inspection_station_id,
|
||
|
|
stare_date,end_date,risk_level,remark,create_user,create_time)
|
||
|
|
values (#{planManagementMonth},#{projectName},#{workContent},#{inspectionStationId},
|
||
|
|
#{stareDate}, #{endDate},#{riskLevel},#{remark},#{createUser},#{createTime})
|
||
|
|
</insert>
|
||
|
|
<update id="updatePlanManagement">
|
||
|
|
update tb_plan_management
|
||
|
|
<trim prefix="set" suffixOverrides=",">
|
||
|
|
<if test="planManagementMonth!= null " >
|
||
|
|
plan_management_month=#{planManagementMonth},
|
||
|
|
</if>
|
||
|
|
<if test="projectName!= null " >
|
||
|
|
project_name=#{projectName},
|
||
|
|
</if>
|
||
|
|
<if test="workContent!= null " >
|
||
|
|
work_content=#{workContent},
|
||
|
|
</if>
|
||
|
|
<if test="inspectionStationId!= null " >
|
||
|
|
inspection_station_id=#{inspectionStationId},
|
||
|
|
</if>
|
||
|
|
<if test="stareDate!= null " >
|
||
|
|
stare_date=#{stareDate},
|
||
|
|
</if>
|
||
|
|
<if test="endDate!= null " >
|
||
|
|
end_date=#{endDate},
|
||
|
|
</if>
|
||
|
|
<if test="riskLevel!= null " >
|
||
|
|
risk_level=#{riskLevel},
|
||
|
|
</if>
|
||
|
|
<if test="updateUser!= null " >
|
||
|
|
update_user=#{updateUser},
|
||
|
|
</if>
|
||
|
|
<if test="updateTime!= null " >
|
||
|
|
update_time=#{updateTime},
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
where plan_management_id = #{planManagementId}
|
||
|
|
</update>
|
||
|
|
<delete id="delPlanManagement">
|
||
|
|
update tb_plan_management set is_active ='0' where plan_management_id = #{planManagementId}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<select id="getPlanManagementList" resultType="com.bonus.digital.dao.PlanManagementVo">
|
||
|
|
select tis.plan_management_id,
|
||
|
|
tis.plan_management_month,
|
||
|
|
tis.project_name,
|
||
|
|
tis.work_content,
|
||
|
|
tis.inspection_station_id,
|
||
|
|
tis2.inspection_station_name as inspectionStationName
|
||
|
|
tis.stare_date,
|
||
|
|
tis.end_date,
|
||
|
|
tis.remark,
|
||
|
|
tis.create_user
|
||
|
|
from tb_plan_management tpm
|
||
|
|
left join tb_inspection_station tis2 on tpm.inspection_station_id = tis2.inspection_station_id
|
||
|
|
where category = #{category} and is_active = '1'
|
||
|
|
</select>
|
||
|
|
</mapper>
|