用水户和取水口信息
This commit is contained in:
@ -0,0 +1,131 @@
|
||||
<?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.fastbee.rechargecard.mapper.NgInformationWaterIntakeMapper">
|
||||
|
||||
<resultMap type="NgInformationWaterIntake" id="NgInformationWaterIntakeResult">
|
||||
<result property="intakeId" column="intake_id" />
|
||||
<result property="wellId" column="well_id" />
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="location" column="location" />
|
||||
<result property="constructionDate" column="construction_date" />
|
||||
<result property="maintenanceStatus" column="maintenance_status" />
|
||||
<result property="lastMaintenanceDate" column="last_maintenance_date" />
|
||||
<result property="waterQuality" column="water_quality" />
|
||||
<result property="waterExtractionVolume" column="water_extraction_volume" />
|
||||
<result property="type" column="type" />
|
||||
<result property="responsiblePerson" column="responsible_person" />
|
||||
<result property="contactInformation" column="contact_information" />
|
||||
<result property="parameter" column="parameter" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNgInformationWaterIntakeVo">
|
||||
select intake_id, well_id, device_code, location, construction_date, maintenance_status, last_maintenance_date, water_quality, water_extraction_volume, type, responsible_person, contact_information, parameter, remark, create_time, update_time, create_by, update_by from ng_information_water_intake
|
||||
</sql>
|
||||
|
||||
<select id="selectNgInformationWaterIntakeList" parameterType="NgInformationWaterIntake" resultMap="NgInformationWaterIntakeResult">
|
||||
<include refid="selectNgInformationWaterIntakeVo"/>
|
||||
<where>
|
||||
<if test="wellId != null and wellId != ''"> and well_id = #{wellId}</if>
|
||||
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="constructionDate != null "> and construction_date = #{constructionDate}</if>
|
||||
<if test="maintenanceStatus != null "> and maintenance_status = #{maintenanceStatus}</if>
|
||||
<if test="lastMaintenanceDate != null "> and last_maintenance_date = #{lastMaintenanceDate}</if>
|
||||
<if test="waterQuality != null and waterQuality != ''"> and water_quality = #{waterQuality}</if>
|
||||
<if test="waterExtractionVolume != null "> and water_extraction_volume = #{waterExtractionVolume}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
|
||||
<if test="contactInformation != null and contactInformation != ''"> and contact_information = #{contactInformation}</if>
|
||||
<if test="parameter != null and parameter != ''"> and parameter = #{parameter}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNgInformationWaterIntakeByIntakeId" parameterType="Long" resultMap="NgInformationWaterIntakeResult">
|
||||
<include refid="selectNgInformationWaterIntakeVo"/>
|
||||
where intake_id = #{intakeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertNgInformationWaterIntake" parameterType="NgInformationWaterIntake" useGeneratedKeys="true" keyProperty="intakeId">
|
||||
insert into ng_information_water_intake
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wellId != null">well_id,</if>
|
||||
<if test="deviceCode != null">device_code,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="constructionDate != null">construction_date,</if>
|
||||
<if test="maintenanceStatus != null">maintenance_status,</if>
|
||||
<if test="lastMaintenanceDate != null">last_maintenance_date,</if>
|
||||
<if test="waterQuality != null">water_quality,</if>
|
||||
<if test="waterExtractionVolume != null">water_extraction_volume,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="responsiblePerson != null">responsible_person,</if>
|
||||
<if test="contactInformation != null">contact_information,</if>
|
||||
<if test="parameter != null">parameter,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wellId != null">#{wellId},</if>
|
||||
<if test="deviceCode != null">#{deviceCode},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="constructionDate != null">#{constructionDate},</if>
|
||||
<if test="maintenanceStatus != null">#{maintenanceStatus},</if>
|
||||
<if test="lastMaintenanceDate != null">#{lastMaintenanceDate},</if>
|
||||
<if test="waterQuality != null">#{waterQuality},</if>
|
||||
<if test="waterExtractionVolume != null">#{waterExtractionVolume},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="responsiblePerson != null">#{responsiblePerson},</if>
|
||||
<if test="contactInformation != null">#{contactInformation},</if>
|
||||
<if test="parameter != null">#{parameter},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNgInformationWaterIntake" parameterType="NgInformationWaterIntake">
|
||||
update ng_information_water_intake
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wellId != null">well_id = #{wellId},</if>
|
||||
<if test="deviceCode != null">device_code = #{deviceCode},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="constructionDate != null">construction_date = #{constructionDate},</if>
|
||||
<if test="maintenanceStatus != null">maintenance_status = #{maintenanceStatus},</if>
|
||||
<if test="lastMaintenanceDate != null">last_maintenance_date = #{lastMaintenanceDate},</if>
|
||||
<if test="waterQuality != null">water_quality = #{waterQuality},</if>
|
||||
<if test="waterExtractionVolume != null">water_extraction_volume = #{waterExtractionVolume},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="responsiblePerson != null">responsible_person = #{responsiblePerson},</if>
|
||||
<if test="contactInformation != null">contact_information = #{contactInformation},</if>
|
||||
<if test="parameter != null">parameter = #{parameter},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where intake_id = #{intakeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNgInformationWaterIntakeByIntakeId" parameterType="Long">
|
||||
delete from ng_information_water_intake where intake_id = #{intakeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNgInformationWaterIntakeByIntakeIds" parameterType="String">
|
||||
delete from ng_information_water_intake where intake_id in
|
||||
<foreach item="intakeId" collection="array" open="(" separator="," close=")">
|
||||
#{intakeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,111 @@
|
||||
<?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.fastbee.rechargecard.mapper.NgInformationWaterUserMapper">
|
||||
|
||||
<resultMap type="NgInformationWaterUser" id="NgInformationWaterUserResult">
|
||||
<result property="waterUserId" column="water_user_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="account" column="account" />
|
||||
<result property="waterConsumption" column="water_consumption" />
|
||||
<result property="waterConsumptionindex" column="water_consumptionIndex" />
|
||||
<result property="warningStatus" column="warning_status" />
|
||||
<result property="irrigatedArea" column="irrigated_area" />
|
||||
<result property="belongingGegion" column="belonging_gegion" />
|
||||
<result property="contactInformation" column="contact_information" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNgInformationWaterUserVo">
|
||||
select water_user_id, name, account, water_consumption, water_consumptionIndex, warning_status, irrigated_area, belonging_gegion, contact_information, remark, create_time, create_by, update_time, update_by from ng_information_water_user
|
||||
</sql>
|
||||
|
||||
<select id="selectNgInformationWaterUserList" parameterType="NgInformationWaterUser" resultMap="NgInformationWaterUserResult">
|
||||
<include refid="selectNgInformationWaterUserVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="account != null and account != ''"> and account = #{account}</if>
|
||||
<if test="waterConsumption != null "> and water_consumption = #{waterConsumption}</if>
|
||||
<if test="waterConsumptionindex != null "> and water_consumptionIndex = #{waterConsumptionindex}</if>
|
||||
<if test="warningStatus != null "> and warning_status = #{warningStatus}</if>
|
||||
<if test="irrigatedArea != null "> and irrigated_area = #{irrigatedArea}</if>
|
||||
<if test="belongingGegion != null and belongingGegion != ''"> and belonging_gegion = #{belongingGegion}</if>
|
||||
<if test="contactInformation != null and contactInformation != ''"> and contact_information = #{contactInformation}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNgInformationWaterUserByWaterUserId" parameterType="Long" resultMap="NgInformationWaterUserResult">
|
||||
<include refid="selectNgInformationWaterUserVo"/>
|
||||
where water_user_id = #{waterUserId}
|
||||
</select>
|
||||
|
||||
<insert id="insertNgInformationWaterUser" parameterType="NgInformationWaterUser" useGeneratedKeys="true" keyProperty="waterUserId">
|
||||
insert into ng_information_water_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="account != null">account,</if>
|
||||
<if test="waterConsumption != null">water_consumption,</if>
|
||||
<if test="waterConsumptionindex != null">water_consumptionIndex,</if>
|
||||
<if test="warningStatus != null">warning_status,</if>
|
||||
<if test="irrigatedArea != null">irrigated_area,</if>
|
||||
<if test="belongingGegion != null">belonging_gegion,</if>
|
||||
<if test="contactInformation != null">contact_information,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="account != null">#{account},</if>
|
||||
<if test="waterConsumption != null">#{waterConsumption},</if>
|
||||
<if test="waterConsumptionindex != null">#{waterConsumptionindex},</if>
|
||||
<if test="warningStatus != null">#{warningStatus},</if>
|
||||
<if test="irrigatedArea != null">#{irrigatedArea},</if>
|
||||
<if test="belongingGegion != null">#{belongingGegion},</if>
|
||||
<if test="contactInformation != null">#{contactInformation},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNgInformationWaterUser" parameterType="NgInformationWaterUser">
|
||||
update ng_information_water_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="account != null">account = #{account},</if>
|
||||
<if test="waterConsumption != null">water_consumption = #{waterConsumption},</if>
|
||||
<if test="waterConsumptionindex != null">water_consumptionIndex = #{waterConsumptionindex},</if>
|
||||
<if test="warningStatus != null">warning_status = #{warningStatus},</if>
|
||||
<if test="irrigatedArea != null">irrigated_area = #{irrigatedArea},</if>
|
||||
<if test="belongingGegion != null">belonging_gegion = #{belongingGegion},</if>
|
||||
<if test="contactInformation != null">contact_information = #{contactInformation},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where water_user_id = #{waterUserId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNgInformationWaterUserByWaterUserId" parameterType="Long">
|
||||
delete from ng_information_water_user where water_user_id = #{waterUserId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNgInformationWaterUserByWaterUserIds" parameterType="String">
|
||||
delete from ng_information_water_user where water_user_id in
|
||||
<foreach item="waterUserId" collection="array" open="(" separator="," close=")">
|
||||
#{waterUserId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user