<?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.zehong.system.mapper.TConGasProInforMapper"> <resultMap type="TConGasProInfor" id="TConGasProInforResult"> <result property="fConGasProInforId" column="f_con_gas_pro_infor_id" /> <result property="fProjectCode" column="f_project_code" /> <result property="fProjectNo" column="f_project_no" /> <result property="fProjectName" column="f_project_name" /> <result property="fConstructionStart" column="f_construction_start" /> <result property="fConstructionEnd" column="f_construction_end" /> <result property="fAddress" column="f_address" /> <result property="fDistrictId" column="f_district_id" /> <result property="fConstructionLongitude" column="f_construction_longitude" /> <result property="fConstructionLatitude" column="f_construction_latitude" /> <result property="fConstructionPointType" column="f_construction_point_type" /> <result property="fVillageId" column="f_village_id" /> <result property="fPipePress" column="f_pipe_press" /> <result property="fReportFlag" column="f_report_flag" /> <result property="fConstructionStatus" column="f_construction_status" /> <result property="fBuildDepartment" column="f_build_department" /> <result property="fProjectLeader" column="f_project_leader" /> <result property="fProjectLeaderPhone" column="f_project_leader_phone" /> <result property="fIndustry" column="f_industry" /> <result property="fDepartmentName" column="f_department_name" /> <result property="fConstructDepartment" column="f_construct_department" /> <result property="fBuildProjectLeaderName" column="f_build_project_leader_name" /> <result property="fBuildProjectLeaderPhone" column="f_build_project_leader_phone" /> <result property="fTechnicalLeaderName" column="f_technical_leader_name" /> <result property="fTechnicalLeaderPhone" column="f_technical_leader_phone" /> <result property="fSupervisionUnitName" column="f_supervision_unit_name" /> <result property="fChiefEngineerName" column="f_chief_engineer_name" /> <result property="fChiefEngineerPhone" column="f_chief_engineer_phone" /> <result property="fCompanyInfoId" column="f_company_info_id" /> <result property="fPatrolSafetyOfficerNo" column="f_patrol_safety_officer_no" /> <result property="fPartrolSafetyOfficerName" column="f_partrol_safety_officer_name" /> <result property="fPatrolSafetyOfficerPhone" column="f_patrol_safety_officer_phone" /> <result property="fResidentSafetyOfficerNo" column="f_resident_safety_officer_no" /> <result property="fResidentSafetyOfficerName" column="f_resident_safety_officer_name" /> <result property="fResidentSafetyOfficerPhone" column="f_resident_safety_officer_phone" /> <result property="fGasCompanyStationNo" column="f_gas_company_station_no" /> <result property="fGasCompanyStationName" column="f_gas_company_station_name" /> <result property="fGasCompanyStationPhone" column="f_gas_company_station_phone" /> <result property="fRemark" column="f_remark" /> <result property="fUpdateTime" column="f_update_time" /> <result property="entUploadTime" column="f_ent_upload_time" /> <result property="entUploadState" column="f_ent_upload_state" /> <result property="govUploadTime" column="f_gov_upload_time" /> <result property="govUploadState" column="f_gov_upload_state" /> </resultMap> <sql id="selectTConGasProInforVo"> select f_con_gas_pro_infor_id, f_project_code, f_project_no, f_project_name, f_construction_start, f_construction_end, f_address, f_district_id, f_construction_longitude, f_construction_latitude, f_construction_point_type, f_village_id, f_pipe_press, f_report_flag, f_construction_status, f_build_department, f_project_leader, f_project_leader_phone, f_industry, f_department_name, f_construct_department, f_build_project_leader_name, f_build_project_leader_phone, f_technical_leader_name, f_technical_leader_phone, f_supervision_unit_name, f_chief_engineer_name, f_chief_engineer_phone, f_company_info_id, f_patrol_safety_officer_no, f_partrol_safety_officer_name, f_patrol_safety_officer_phone, f_resident_safety_officer_no, f_resident_safety_officer_name, f_resident_safety_officer_phone, f_gas_company_station_no, f_gas_company_station_name, f_gas_company_station_phone, f_remark, f_update_time,f_ent_upload_time,f_ent_upload_state,f_gov_upload_time,f_gov_upload_state from t_con_gas_pro_infor </sql> <resultMap type="TConGasProInfor" id="TConGasProInforResultForExport"> <result property="fConGasProInforId" column="f_con_gas_pro_infor_id" /> <result property="fProjectCode" column="f_project_code" /> <result property="fProjectNo" column="f_project_no" /> <result property="fProjectName" column="f_project_name" /> <result property="fConstructionStart" column="f_construction_start" /> <result property="fConstructionEnd" column="f_construction_end" /> <result property="fAddress" column="f_address" /> <result property="fDistrictId" column="f_district_id" /> <result property="districtName" column="regionName" /> <result property="fConstructionLongitude" column="f_construction_longitude" /> <result property="fConstructionLatitude" column="f_construction_latitude" /> <result property="fConstructionPointType" column="f_construction_point_type" /> <result property="fVillageId" column="f_village_id" /> <result property="fPipePress" column="f_pipe_press" /> <result property="fReportFlag" column="f_report_flag" /> <result property="fConstructionStatus" column="f_construction_status" /> <result property="fBuildDepartment" column="f_build_department" /> <result property="fProjectLeader" column="f_project_leader" /> <result property="fProjectLeaderPhone" column="f_project_leader_phone" /> <result property="fIndustry" column="f_industry" /> <result property="fDepartmentName" column="f_department_name" /> <result property="fConstructDepartment" column="f_construct_department" /> <result property="fBuildProjectLeaderName" column="f_build_project_leader_name" /> <result property="fBuildProjectLeaderPhone" column="f_build_project_leader_phone" /> <result property="fTechnicalLeaderName" column="f_technical_leader_name" /> <result property="fTechnicalLeaderPhone" column="f_technical_leader_phone" /> <result property="fSupervisionUnitName" column="f_supervision_unit_name" /> <result property="fChiefEngineerName" column="f_chief_engineer_name" /> <result property="fChiefEngineerPhone" column="f_chief_engineer_phone" /> <result property="fCompanyInfoId" column="f_company_info_id" /> <result property="companyInfoName" column="enterpriseName" /> <result property="fPatrolSafetyOfficerNo" column="f_patrol_safety_officer_no" /> <result property="fPartrolSafetyOfficerName" column="f_partrol_safety_officer_name" /> <result property="fPatrolSafetyOfficerPhone" column="f_patrol_safety_officer_phone" /> <result property="fResidentSafetyOfficerNo" column="f_resident_safety_officer_no" /> <result property="fResidentSafetyOfficerName" column="f_resident_safety_officer_name" /> <result property="fResidentSafetyOfficerPhone" column="f_resident_safety_officer_phone" /> <result property="fGasCompanyStationNo" column="f_gas_company_station_no" /> <result property="fGasCompanyStationName" column="f_gas_company_station_name" /> <result property="fGasCompanyStationPhone" column="f_gas_company_station_phone" /> <result property="fRemark" column="f_remark" /> <result property="fUpdateTime" column="f_update_time" /> <result property="entUploadTime" column="f_ent_upload_time" /> <result property="entUploadState" column="f_ent_upload_state" /> <result property="govUploadTime" column="f_gov_upload_time" /> <result property="govUploadState" column="f_gov_upload_state" /> </resultMap> <sql id="exprotTConGasProInforVo"> select f_con_gas_pro_infor_id, f_project_code, f_project_no, f_project_name, f_construction_start, f_construction_end, f_address, f_district_id, region.f_name as regionName,f_construction_longitude, f_construction_latitude, f_construction_point_type, f_village_id, f_pipe_press, f_report_flag, f_construction_status, f_build_department, f_project_leader, f_project_leader_phone, f_industry, f_department_name, f_construct_department, f_build_project_leader_name, f_build_project_leader_phone, f_technical_leader_name, f_technical_leader_phone, f_supervision_unit_name, f_chief_engineer_name, f_chief_engineer_phone, f_company_info_id, enterprise.enterprise_name as enterpriseName,f_patrol_safety_officer_no, f_partrol_safety_officer_name, f_patrol_safety_officer_phone, f_resident_safety_officer_no, f_resident_safety_officer_name, f_resident_safety_officer_phone, f_gas_company_station_no, f_gas_company_station_name, f_gas_company_station_phone, f_remark, f_update_time,f_ent_upload_time,f_ent_upload_state, f_gov_upload_time,f_gov_upload_state from t_con_gas_pro_infor gasInfo left join t_enterprise_info enterprise on gasInfo.f_company_info_id = enterprise.enterprise_id left join t_county_level_region region on gasInfo.f_district_id = region.f_id </sql> <select id="selectTConGasProInforList" parameterType="TConGasProInfor" resultMap="TConGasProInforResult"> <include refid="selectTConGasProInforVo"/> <where> <if test="fProjectCode != null and fProjectCode != ''"> and f_project_code like concat('%', #{fProjectCode}, '%')</if> <if test="fProjectNo != null "> and f_project_no = #{fProjectNo}</if> <if test="fProjectName != null and fProjectName != ''"> and f_project_name like concat('%', #{fProjectName}, '%')</if> <if test="fPipePress != null and fPipePress != ''"> and f_pipe_press = #{fPipePress}</if> <if test="entUploadState != null and entUploadState != ''"> and f_ent_upload_state = #{entUploadState}</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''"> and f_company_info_id = #{fCompanyInfoId}</if> </where> order by f_update_time desc </select> <select id="exportTConGasProInforList" parameterType="TConGasProInfor" resultMap="TConGasProInforResultForExport"> <include refid="exprotTConGasProInforVo"/> <where> <if test="fProjectCode != null and fProjectCode != ''"> and f_project_code like concat('%', #{fProjectCode}, '%')</if> <if test="fProjectNo != null "> and f_project_no = #{fProjectNo}</if> <if test="fProjectName != null and fProjectName != ''"> and f_project_name like concat('%', #{fProjectName}, '%')</if> <if test="fPipePress != null and fPipePress != ''"> and f_pipe_press = #{fPipePress}</if> <if test="entUploadState != null and entUploadState != ''"> and f_ent_upload_state = #{entUploadState}</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''"> and f_company_info_id = #{fCompanyInfoId}</if> <if test="govUploadState != null and govUploadState != ''"> and f_gov_upload_state = #{govUploadState}</if> </where> order by f_update_time desc </select> <select id="selectTConGasProInforById" parameterType="Long" resultMap="TConGasProInforResult"> <include refid="selectTConGasProInforVo"/> where f_con_gas_pro_infor_id = #{fConGasProInforId} </select> <insert id="insertTConGasProInfor" parameterType="TConGasProInfor" useGeneratedKeys="true" keyProperty="fConGasProInforId"> insert into t_con_gas_pro_infor <trim prefix="(" suffix=")" suffixOverrides=","> <if test="fProjectCode != null and fProjectCode != ''">f_project_code,</if> <if test="fProjectNo != null">f_project_no,</if> <if test="fProjectName != null and fProjectName != ''">f_project_name,</if> <if test="fConstructionStart != null and fConstructionStart != ''">f_construction_start,</if> <if test="fConstructionEnd != null and fConstructionEnd != ''">f_construction_end,</if> <if test="fAddress != null and fAddress != ''">f_address,</if> <if test="fDistrictId != null">f_district_id,</if> <if test="fConstructionLongitude != null">f_construction_longitude,</if> <if test="fConstructionLatitude != null">f_construction_latitude,</if> <if test="fConstructionPointType != null">f_construction_point_type,</if> <if test="fVillageId != null">f_village_id,</if> <if test="fPipePress != null and fPipePress != ''">f_pipe_press,</if> <if test="fReportFlag != null">f_report_flag,</if> <if test="fConstructionStatus != null">f_construction_status,</if> <if test="fBuildDepartment != null and fBuildDepartment != ''">f_build_department,</if> <if test="fProjectLeader != null">f_project_leader,</if> <if test="fProjectLeaderPhone != null">f_project_leader_phone,</if> <if test="fIndustry != null and fIndustry != ''">f_industry,</if> <if test="fDepartmentName != null">f_department_name,</if> <if test="fConstructDepartment != null and fConstructDepartment != ''">f_construct_department,</if> <if test="fBuildProjectLeaderName != null">f_build_project_leader_name,</if> <if test="fBuildProjectLeaderPhone != null">f_build_project_leader_phone,</if> <if test="fTechnicalLeaderName != null">f_technical_leader_name,</if> <if test="fTechnicalLeaderPhone != null">f_technical_leader_phone,</if> <if test="fSupervisionUnitName != null">f_supervision_unit_name,</if> <if test="fChiefEngineerName != null">f_chief_engineer_name,</if> <if test="fChiefEngineerPhone != null">f_chief_engineer_phone,</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''">f_company_info_id,</if> <if test="fPatrolSafetyOfficerNo != null">f_patrol_safety_officer_no,</if> <if test="fPartrolSafetyOfficerName != null">f_partrol_safety_officer_name,</if> <if test="fPatrolSafetyOfficerPhone != null">f_patrol_safety_officer_phone,</if> <if test="fResidentSafetyOfficerNo != null">f_resident_safety_officer_no,</if> <if test="fResidentSafetyOfficerName != null">f_resident_safety_officer_name,</if> <if test="fResidentSafetyOfficerPhone != null">f_resident_safety_officer_phone,</if> <if test="fGasCompanyStationNo != null">f_gas_company_station_no,</if> <if test="fGasCompanyStationName != null">f_gas_company_station_name,</if> <if test="fGasCompanyStationPhone != null">f_gas_company_station_phone,</if> <if test="fRemark != null">f_remark,</if> <if test="fUpdateTime != null and fUpdateTime != ''">f_update_time,</if> <if test="entUploadTime != null">f_ent_upload_time,</if> <if test="entUploadState != null and entUploadStatue != ''">f_ent_upload_state,</if> <if test="govUploadTime != null">f_gov_upload_time,</if> <if test="govUploadState != null and govUploadStatue != ''">f_gov_upload_state,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="fProjectCode != null and fProjectCode != ''">#{fProjectCode},</if> <if test="fProjectNo != null">#{fProjectNo},</if> <if test="fProjectName != null and fProjectName != ''">#{fProjectName},</if> <if test="fConstructionStart != null and fConstructionStart != ''">#{fConstructionStart},</if> <if test="fConstructionEnd != null and fConstructionEnd != ''">#{fConstructionEnd},</if> <if test="fAddress != null and fAddress != ''">#{fAddress},</if> <if test="fDistrictId != null">#{fDistrictId},</if> <if test="fConstructionLongitude != null">#{fConstructionLongitude},</if> <if test="fConstructionLatitude != null">#{fConstructionLatitude},</if> <if test="fConstructionPointType != null">#{fConstructionPointType},</if> <if test="fVillageId != null">#{fVillageId},</if> <if test="fPipePress != null and fPipePress != ''">#{fPipePress},</if> <if test="fReportFlag != null">#{fReportFlag},</if> <if test="fConstructionStatus != null">#{fConstructionStatus},</if> <if test="fBuildDepartment != null and fBuildDepartment != ''">#{fBuildDepartment},</if> <if test="fProjectLeader != null">#{fProjectLeader},</if> <if test="fProjectLeaderPhone != null">#{fProjectLeaderPhone},</if> <if test="fIndustry != null and fIndustry != ''">#{fIndustry},</if> <if test="fDepartmentName != null">#{fDepartmentName},</if> <if test="fConstructDepartment != null and fConstructDepartment != ''">#{fConstructDepartment},</if> <if test="fBuildProjectLeaderName != null">#{fBuildProjectLeaderName},</if> <if test="fBuildProjectLeaderPhone != null">#{fBuildProjectLeaderPhone},</if> <if test="fTechnicalLeaderName != null">#{fTechnicalLeaderName},</if> <if test="fTechnicalLeaderPhone != null">#{fTechnicalLeaderPhone},</if> <if test="fSupervisionUnitName != null">#{fSupervisionUnitName},</if> <if test="fChiefEngineerName != null">#{fChiefEngineerName},</if> <if test="fChiefEngineerPhone != null">#{fChiefEngineerPhone},</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''">#{fCompanyInfoId},</if> <if test="fPatrolSafetyOfficerNo != null">#{fPatrolSafetyOfficerNo},</if> <if test="fPartrolSafetyOfficerName != null">#{fPartrolSafetyOfficerName},</if> <if test="fPatrolSafetyOfficerPhone != null">#{fPatrolSafetyOfficerPhone},</if> <if test="fResidentSafetyOfficerNo != null">#{fResidentSafetyOfficerNo},</if> <if test="fResidentSafetyOfficerName != null">#{fResidentSafetyOfficerName},</if> <if test="fResidentSafetyOfficerPhone != null">#{fResidentSafetyOfficerPhone},</if> <if test="fGasCompanyStationNo != null">#{fGasCompanyStationNo},</if> <if test="fGasCompanyStationName != null">#{fGasCompanyStationName},</if> <if test="fGasCompanyStationPhone != null">#{fGasCompanyStationPhone},</if> <if test="fRemark != null">#{fRemark},</if> <if test="fUpdateTime != null">#{fUpdateTime},</if> <if test="entUploadTime != null ">#{entUploadTime},</if> <if test="entUploadState != null and entUploadState != ''">#{entUploadState},</if> <if test="govUploadTime != null ">#{govUploadTime},</if> <if test="govUploadState != null and govUploadState != ''">#{govUploadState},</if> </trim> </insert> <update id="updateTConGasProInfor" parameterType="TConGasProInfor"> update t_con_gas_pro_infor <trim prefix="SET" suffixOverrides=","> <if test="fProjectCode != null and fProjectCode != ''">f_project_code = #{fProjectCode},</if> <if test="fProjectNo != null">f_project_no = #{fProjectNo},</if> <if test="fProjectName != null and fProjectName != ''">f_project_name = #{fProjectName},</if> <if test="fConstructionStart != null and fConstructionStart != ''">f_construction_start = #{fConstructionStart},</if> <if test="fConstructionEnd != null and fConstructionEnd != ''">f_construction_end = #{fConstructionEnd},</if> <if test="fAddress != null and fAddress != ''">f_address = #{fAddress},</if> <if test="fDistrictId != null">f_district_id = #{fDistrictId},</if> <if test="fConstructionLongitude != null">f_construction_longitude = #{fConstructionLongitude},</if> <if test="fConstructionLatitude != null">f_construction_latitude = #{fConstructionLatitude},</if> <if test="fConstructionPointType != null">f_construction_point_type = #{fConstructionPointType},</if> <if test="fVillageId != null">f_village_id = #{fVillageId},</if> <if test="fPipePress != null and fPipePress != ''">f_pipe_press = #{fPipePress},</if> <if test="fReportFlag != null">f_report_flag = #{fReportFlag},</if> <if test="fConstructionStatus != null">f_construction_status = #{fConstructionStatus},</if> <if test="fBuildDepartment != null and fBuildDepartment != ''">f_build_department = #{fBuildDepartment},</if> <if test="fProjectLeader != null">f_project_leader = #{fProjectLeader},</if> <if test="fProjectLeaderPhone != null">f_project_leader_phone = #{fProjectLeaderPhone},</if> <if test="fIndustry != null and fIndustry != ''">f_industry = #{fIndustry},</if> <if test="fDepartmentName != null">f_department_name = #{fDepartmentName},</if> <if test="fConstructDepartment != null and fConstructDepartment != ''">f_construct_department = #{fConstructDepartment},</if> <if test="fBuildProjectLeaderName != null">f_build_project_leader_name = #{fBuildProjectLeaderName},</if> <if test="fBuildProjectLeaderPhone != null">f_build_project_leader_phone = #{fBuildProjectLeaderPhone},</if> <if test="fTechnicalLeaderName != null">f_technical_leader_name = #{fTechnicalLeaderName},</if> <if test="fTechnicalLeaderPhone != null">f_technical_leader_phone = #{fTechnicalLeaderPhone},</if> <if test="fSupervisionUnitName != null">f_supervision_unit_name = #{fSupervisionUnitName},</if> <if test="fChiefEngineerName != null">f_chief_engineer_name = #{fChiefEngineerName},</if> <if test="fChiefEngineerPhone != null">f_chief_engineer_phone = #{fChiefEngineerPhone},</if> <if test="fCompanyInfoId != null and fCompanyInfoId != ''">f_company_info_id = #{fCompanyInfoId},</if> <if test="fPatrolSafetyOfficerNo != null">f_patrol_safety_officer_no = #{fPatrolSafetyOfficerNo},</if> <if test="fPartrolSafetyOfficerName != null">f_partrol_safety_officer_name = #{fPartrolSafetyOfficerName},</if> <if test="fPatrolSafetyOfficerPhone != null">f_patrol_safety_officer_phone = #{fPatrolSafetyOfficerPhone},</if> <if test="fResidentSafetyOfficerNo != null">f_resident_safety_officer_no = #{fResidentSafetyOfficerNo},</if> <if test="fResidentSafetyOfficerName != null">f_resident_safety_officer_name = #{fResidentSafetyOfficerName},</if> <if test="fResidentSafetyOfficerPhone != null">f_resident_safety_officer_phone = #{fResidentSafetyOfficerPhone},</if> <if test="fGasCompanyStationNo != null">f_gas_company_station_no = #{fGasCompanyStationNo},</if> <if test="fGasCompanyStationName != null">f_gas_company_station_name = #{fGasCompanyStationName},</if> <if test="fGasCompanyStationPhone != null">f_gas_company_station_phone = #{fGasCompanyStationPhone},</if> <if test="fRemark != null">f_remark = #{fRemark},</if> <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if> <if test="entUploadTime != null">f_ent_upload_time = #{entUploadTime},</if> <if test="entUploadState != null and entUploadState != ''">f_ent_upload_state = #{entUploadState},</if> <if test="govUploadTime != null ">f_gov_upload_time = #{govUploadTime},</if> <if test="govUploadState != null and govUploadState != ''">f_gov_upload_state = #{govUploadState},</if> </trim> where f_con_gas_pro_infor_id = #{fConGasProInforId} </update> <update id="updateEntUploadStateById"> update t_con_gas_pro_infor set f_ent_upload_state = #{state}, f_ent_upload_time = #{entUploadTime} where f_con_gas_pro_infor_id = #{fConGasProInforId} </update> <delete id="deleteTConGasProInforById" parameterType="Long"> delete from t_con_gas_pro_infor where f_con_gas_pro_infor_id = #{fConGasProInforId} </delete> <delete id="deleteTConGasProInforByIds" parameterType="String"> delete from t_con_gas_pro_infor where f_con_gas_pro_infor_id in <foreach item="fConGasProInforId" collection="array" open="(" separator="," close=")"> #{fConGasProInforId} </foreach> </delete> </mapper>