| | |
| | | operateDt, |
| | | deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voPr.VoAllIntake"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from pr_intake |
| | | where id = #{id,jdbcType=BIGINT} |
| | | and deleted = 0 |
| | | ge.id, |
| | | ge.countyId, |
| | | ge.townId, |
| | | ge.villageId, |
| | | ge.divideId, |
| | | ge.blockId, |
| | | ge.`name`, |
| | | ge.lng, |
| | | ge.lat, |
| | | ge.remarks, |
| | | ge.`operator`, |
| | | ge.operateDt, |
| | | blo.`name` AS blockName, |
| | | CONCAT(country.`name`, town.`name`, village.`name`) AS address |
| | | FROM pr_intake ge |
| | | INNER JOIN pr_divide divi ON ge.divideId = divi.id |
| | | INNER JOIN ba_block blo ON divi.blockId = blo.id |
| | | LEFT JOIN ba_district country ON ge.countyId = country.id |
| | | LEFT JOIN ba_district town ON ge.townId = town.id |
| | | LEFT JOIN ba_district village ON ge.villageId = village.id |
| | | where ge.id = #{id,jdbcType=BIGINT} |
| | | AND ge.deleted = 0 |
| | | AND divi.deleted = 0 |
| | | AND blo.deleted = 0 |
| | | </select> |
| | | |
| | | <delete id="deleteLogicById" parameterType="java.lang.Long"> |
| | |
| | | </select> |
| | | |
| | | <!--根据村ID获取全部地址--> |
| | | <select id="getNameById" resultType="java.lang.String"> |
| | | select name |
| | | from pr_intake |
| | | where id = #{intakeId, jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <!--根据村ID获取全部地址--> |
| | | <select id="getAddressByVillageId" parameterType="_long" resultType="java.lang.String"> |
| | | select CONCAT(dis_province.`name`, dis_city.`name`, dis_county.`name`, dis_town.`name`, |
| | | dis_village.`name`) AS address |
| | |
| | | inta.name AS intakeNum, |
| | | inta.lng, |
| | | inta.lat, |
| | | IFNULL(hou.instant_amount, 0) AS instantAmount, |
| | | IFNULL(hou.total_amount, 0) AS totalAmount, |
| | | <if test="onLineMap != null and onLineMap !='' and isOnLine != null"> |
| | | rtus.isOnLine, |
| | |
| | | WHERE id != #{id} |
| | | and `name` = #{intakeName} |
| | | </select> |
| | | <!--app修改取水口经纬度--> |
| | | <update id="updateByPrimaryKeySelective1" parameterType="com.dy.pipIrrGlobal.voPr.IntakeUpdateLngLat"> |
| | | <!--@mbg.generated--> |
| | | update pr_intake |
| | | <set> |
| | | <if test="lng != null"> |
| | | lng = #{lng,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lat != null"> |
| | | lat = #{lat,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operateDt != null"> |
| | | operateDt = #{operateDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |