<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//oos.juyouhx.com//DTD Mapper 3.0//EN" "http://oss.juyouhx.com/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.scpyun.platform.standard.jilinsscgsdp.gardenTask" name="网格定时任务处理">

	<select id="selectGardenOfficeTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
		SELECT
			int_id intId,
			docking_id dockingId,
			appid,
			csc_mapjson_ht cscMapjsonHt,
			city_id cityCode,
			area_id areaCode,
			street_id streetCode,
			community_id communityCode
		FROM
			jl_grid_garden_post
		where
		operate_type = '0'
		AND grid_type = '2'
		AND type = 'insert'
		order by int_id LIMIT 3000
	</select>

	<update id="updateOfficeCscMapjsonHt" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
		UPDATE
			sys_office
		SET
			csc_mapjson_ht = #{cscMapjson}
		WHERE
			id = #{communityCode}
	</update>

	<select id="selectGardenTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            name,
            grade,
            csc_mapjson_ht cscMapjsonHt,
            city_id cityCode,
            area_id areaCode,
            street_id streetCode,
            community_id communityCode,
            create_time createTime,
         	create_by createBy,
         	update_time updateTime,
         	update_by updateBy,
            company_code companyCode,
            grid_type gridType,
            unit_contact unitContact,
            contact_phone contactPhone
        FROM
            jl_grid_garden_post 
            where operate_type = '0'
			AND grid_type = '1'
            order by int_id LIMIT 3000
    </select>
    
    <insert id="insertGarden" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
        INSERT INTO jl_grid_garden(
			id,
			name,
			grade,
			csc_mapjson,
			csc_mapjson_ht,
			city_id,
			area_id,
			street_id,
			community_id,
			create_time,
			create_by,
			company_code,
			grid_type,
			unit_contact,
			contact_phone,
			docking_id,
			appid,
			data_source
		) values (
			#{id},
			#{name},
			#{grade},
			#{cscMapjson},
			#{cscMapjsonHt},
            #{cityCode},
            #{areaCode},
            #{streetCode},
            #{communityCode},
			#{createTime},
			#{createBy},
			#{companyCode},
			#{gridType},
            #{unitContact},
            #{contactPhone},
			#{dockingId},
			#{appid},
			'3'
		) 	
    </insert>

	<update id="updateGarden" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
		update jl_grid_garden a
		set
			<if test="name != null and name != ''">
				name=#{name,jdbcType=VARCHAR},
			</if>
			<if test="cscMapjsonHt != null and cscMapjsonHt != ''">
				csc_mapjson_ht = #{cscMapjsonHt,jdbcType=VARCHAR},
			</if>
			<if test="cityCode != null and cityCode != ''">
				city_id=#{cityCode},
			</if>
			<if test="areaCode != null and areaCode != ''">
				area_id=#{areaCode},
			</if>
			<if test="streetCode != null and streetCode != ''">
				street_id=#{streetCode},
			</if>
			<if test="communityCode != null and communityCode != ''">
				community_id=#{communityCode},
			</if>
			<if test="companyCode != null and companyCode != ''">
				company_code=#{companyCode},
			</if>
			<if test="gridType != null and gridType != ''">
				grid_type = #{gridType,jdbcType=VARCHAR},
			</if>
			<if test="unitContact != null and unitContact != ''">
				unit_contact = #{unitContact,jdbcType=VARCHAR},
			</if>
			<if test="contactPhone != null and contactPhone != ''">
				contact_phone = #{contactPhone,jdbcType=VARCHAR},
			</if>
			update_by = #{updateBy,jdbcType=VARCHAR},
			update_time = #{updateTime,jdbcType=TIMESTAMP}
		where 
		docking_id=#{dockingId} and appid=#{appid} 
	</update>
	
	<delete id="deleteGarden" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
		delete from jl_grid_garden where
		docking_id=#{dockingId} and appid=#{appid} AND int_id = #{intId}
	</delete>
	
	<update id="updateGardenPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
		update jl_grid_garden_post set operate_type=#{operateType},data_processing_time=now() where
		docking_id=#{dockingId} and appid=#{appid} AND int_id = #{intId}
	</update>

	<select id="selectResidentialTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqResidentialVo">
		SELECT
			int_id intId,
			id,
			name,
			address,
			measure,
			city_id,
			grade,
			csc_mapjson,
			area_id,
			street_id,
			community_id,
			garden_id,
			create_by,
			create_time,
			update_by,
			update_time,
			'Amap' mapType,
			manager,
			binding,
			del_flag,
			parent_ids,
			company_code,
			szdwbb,
			szdzbbb,
			type,
			csc_mapjson_ht,
			appid,
			docking_id
		FROM
			jl_grid_residential_post
		where operate_type = '0'
		order by create_time ASC,update_time ASC
		LIMIT 3000;
	</select>

	<insert id="insertResidentialTask" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqResidentialVo">
		INSERT INTO jl_grid_residential (
			id,
			name,
			address,
			measure,
			city_id,
			grade,
			csc_mapjson,
			area_id,
			street_id,
			community_id,
			garden_id,
			create_by,
			create_time,
			update_by,
			update_time,
			map_type,
			type,
			csc_mapjson_ht,
			appid,
			docking_id,
			data_source
		) VALUES (
			#{id},
			#{name},
			#{address},
			#{measure},
			#{cityCode},
			#{grade},
			#{cscMapjson},
			#{areaCode},
			#{streetCode},
			#{communityCode},
			#{gardenId},
			#{appid},
			NOW(),
			#{mapType},
			#{type},
			#{cscMapjsonHt},
			#{appid},
			#{dockingId},
			'3'
		)
	</insert>

	<update id="updateResidentialTask" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqResidentialVo">
		update jl_grid_residential
		set
			name = #{name},
			address = #{address},
			measure = #{measure},
			city_id = #{cityCode},
			grade = #{grade},
			csc_mapjson = #{cscMapjson},
			area_id = #{areaCode},
			street_id = #{streetCode},
			community_id = #{communityCode},
			garden_id = #{gardenId},
			update_by = #{appid},
			update_time = NOW(),
			map_type = #{mapType},
			type = #{type},
			csc_mapjson_ht = #{cscMapjsonHt}
		WHERE
		docking_id=#{dockingId}
		and appid=#{appid}
	</update>

	<delete id="deleteResidentialTask" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqResidentialVo">
		delete from jl_grid_residential where docking_id=#{dockingId} and appid=#{appid}
	</delete>

	<update id="updateResidentialPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenVo">
		update jl_grid_residential_post set operate_type=#{operateType},data_processing_time=now() where
		docking_id=#{dockingId} and appid=#{appid} AND int_id=#{intId}
	</update>
	
	<select id="selectBuildingTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqBuildingVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            name,
            grade,
            csc_mapjson_ht cscMapjsonHt,
            company_code companyCode,
            city_id cityCode,
            area_id areaCode,
            street_id streetCode,
            community_id communityCode,
            create_time createTime,
         	create_by createBy,
         	update_time updateTime,
         	update_by updateBy,
            'Amap' mapType,
            garden_id gardenId,
            brand
        FROM
            jl_grid_building_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
    
    
    <insert id="insertBuilding" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqBuildingVo">
        INSERT INTO jl_grid_building(
			id,
            name,
            grade,
            csc_mapjson_ht,
            company_code,
            city_id,
            area_id,
            street_id,
            community_id,
            create_time,
			create_by,
            map_type,
            garden_id,
            brand,
            docking_id,
			appid,
			data_source
        ) values (
			#{id},
            #{name},
            #{grade},
            #{cscMapjsonHt},
            #{companyCode},
            #{cityCode},
            #{areaCode},
            #{streetCode},
            #{communityCode},
            #{createTime},
			#{createBy},
            #{mapType},
            #{gardenId},
            #{brand},
            #{dockingId},
			#{appid},
			'3'
		)
    </insert>
    
    <update id="updateBuilding" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqBuildingVo">
		update jl_grid_building
		set 
		name=#{name},
		grade=#{grade},
		csc_mapjson_ht=#{cscMapjsonHt},
		company_code=#{companyCode},
		city_id=#{cityCode},
		area_id=#{areaCode},
		street_id=#{streetCode},
		community_id=#{communityCode},
		map_type=#{mapType},
		garden_id=#{gardenId},
		brand=#{brand},
		update_by = #{updateBy,jdbcType=VARCHAR},
		update_time = #{updateTime,jdbcType=TIMESTAMP}
		where 
		docking_id=#{dockingId} and appid=#{appid} 
	</update>
	
	<delete id="deleteBuilding" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqBuildingVo">
		delete from jl_grid_building where docking_id=#{dockingId} and appid=#{appid}
	</delete>
	
	<update id="updateBuildingPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqBuildingVo">
		update jl_grid_building_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="selectUnitTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqUnitVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            name,
            grade,
            company_code companyCode,
            city_id cityCode,
            area_id areaCode,
            street_id streetCode,
            community_id communityCode,
            garden_id gardenId,
            building_id buildingId,
            create_time createTime,
         	create_by createBy,
         	update_time updateTime,
         	update_by updateBy,
            'Amap' mapType
        FROM
            jl_grid_unit_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
    
    
    <insert id="insertUnit" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqUnitVo">
        INSERT INTO jl_grid_unit(
			id,
			name,
			grade,
			company_code,
			city_id,
			area_id,
			street_id,
			community_id,
			garden_id,
			building_id,
			create_time,
			create_by,
			map_type,
			docking_id,
			appid,
			data_source
        ) values (
			#{id,jdbcType=VARCHAR},
            #{name,jdbcType=VARCHAR},
            #{grade,jdbcType=VARCHAR},
			#{companyCode,jdbcType=VARCHAR},
            #{cityCode,jdbcType=VARCHAR},
            #{areaCode,jdbcType=VARCHAR},
            #{streetCode,jdbcType=VARCHAR},
            #{communityCode,jdbcType=VARCHAR},
			#{gardenId,jdbcType=VARCHAR},
			#{buildingId,jdbcType=VARCHAR},
			#{createTime,jdbcType=TIMESTAMP},
			#{createBy,jdbcType=VARCHAR},
			#{mapType,jdbcType=VARCHAR},
			#{dockingId,jdbcType=VARCHAR},
			#{appid,jdbcType=VARCHAR},
			'3'
		)
    </insert>
    
    <update id="updateUnit" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqUnitVo">
		update jl_grid_unit
		set 
		name=#{name},
		grade=#{grade},
		company_code=#{companyCode},
		city_id=#{cityCode},
		area_id=#{areaCode},
		street_id=#{streetCode},
		community_id=#{communityCode},
		garden_id=#{gardenId},
		building_id=#{buildingId},
		map_type=#{mapType},
		update_by = #{updateBy,jdbcType=VARCHAR},
		update_time = #{updateTime,jdbcType=TIMESTAMP}
		where 
		docking_id=#{dockingId} and appid=#{appid} 
	</update>
	
	<delete id="deleteUnit" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqUnitVo">
		delete from jl_grid_unit where docking_id=#{dockingId} and appid=#{appid}
	</delete>
	
	<update id="updateUnitPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqUnitVo">
		update jl_grid_unit_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="selectFloorTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFloorVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            name,
            grade,
            company_code companyCode,
            city_id cityCode,
            area_id areaCode,
            street_id streetCode,
            community_id communityCode,
            garden_id gardenId,
            building_id buildingId,
            unit_id unitId,
            sort,
            create_time createTime,
         	create_by createBy,
         	update_time updateTime,
         	update_by updateBy
        FROM
            jl_grid_floor_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
      
    <insert id="insertFloor" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFloorVo">
        INSERT INTO jl_grid_floor(
			id,
			name,
			grade,
			company_code,
			city_id,
			area_id,
			street_id,
			community_id,
			garden_id,
			building_id,
			unit_id,
			create_time,
			create_by,
			sort,
			docking_id,
			appid,
			data_source
        ) values (
			#{id},
            #{name},
            #{grade},
			#{companyCode},
            #{cityCode},
            #{areaCode},
            #{streetCode},
            #{communityCode},
			#{gardenId},
			#{buildingId},
			#{unitId},
			#{createTime},
			#{createBy},
			#{sort},
			#{dockingId},
			#{appid},
			'3'
		)
    </insert>
    
    <update id="updateFloor" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFloorVo">
		update jl_grid_floor
		set 
		name=#{name},
		grade=#{grade},
		company_code=#{companyCode},
		city_id=#{cityCode},
		area_id=#{areaCode},
		street_id=#{streetCode},
		community_id=#{communityCode},
		garden_id=#{gardenId},
		building_id=#{buildingId},
		unit_id=#{unitId},
		sort=#{sort},
		update_by = #{updateBy,jdbcType=VARCHAR},
		update_time = #{updateTime,jdbcType=TIMESTAMP}
		where 
		docking_id=#{dockingId} and appid=#{appid} 
	</update>
	
	<delete id="deleteFloor" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFloorVo">
		delete from jl_grid_floor where docking_id=#{dockingId} and appid=#{appid}
	</delete>
	
	<update id="updateFloorPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFloorVo">
		update jl_grid_floor_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="selectDoorplateTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqDoorplateVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            name,
            grade,
            company_code companyCode,
            city_id cityCode,
            area_id areaCode,
            street_id streetCode,
            community_id communityCode,
            garden_id gardenId,
            building_id buildingId,
            unit_id unitId,
            floor_id floorId,
            sort,
            create_time createTime,
         	create_by createBy,
         	update_time updateTime,
         	update_by updateBy
        FROM
            jl_grid_doorplate_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
	
	<insert id="insertDoorplate" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqDoorplateVo">
        INSERT INTO jl_grid_doorplate(
			id,
			name,
			grade,
			company_code,
			city_id,
			area_id,
			street_id,
			community_id,
			garden_id,
			building_id,
			unit_id,			
			floor_id,
			sort,
			create_time,
			create_by,
			docking_id,
			appid,
			data_source
        ) values (
			#{id},
            #{name},
            #{grade},
			#{companyCode},
            #{cityCode},
            #{areaCode},
            #{streetCode},
            #{communityCode},
			#{gardenId},
			#{buildingId},
			#{unitId},
			#{floorId},
			#{sort},
			#{createTime},
			#{createBy},
			#{dockingId},
			#{appid},
			'3'
		)
    </insert>
    
    <update id="updateDoorplate" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqDoorplateVo">
		update jl_grid_doorplate
		set 
		name=#{name},
		grade=#{grade},
		company_code=#{companyCode},
		city_id=#{cityCode},
		area_id=#{areaCode},
		street_id=#{streetCode},
		community_id=#{communityCode},
		garden_id=#{gardenId},
		building_id=#{buildingId},
		unit_id=#{unitId},
		floor_id=#{floorId},
		sort=#{sort},
		update_by = #{updateBy,jdbcType=VARCHAR},
		update_time = #{updateTime,jdbcType=TIMESTAMP}
		where 
		docking_id=#{dockingId} and appid=#{appid} 
	</update>
	
	<delete id="deleteDoorplate" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqDoorplateVo">
		delete from jl_grid_doorplate where docking_id=#{dockingId} and appid=#{appid}
	</delete>
	
	<update id="updateDoorplatePostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqDoorplateVo">
		update jl_grid_doorplate_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="selectGardenUserTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenUserVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            name,
            cardno,
            tel,
            remark,
            city_id cityCode,
            area_id areaCode,
            street_id streetCode,
            community_id communityCode,
            garden_id gardenId,
            create_time createTime,
         	create_by createBy,
         	update_time updateTime,
         	update_by updateBy
        FROM
            jl_grid_garden_user_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
	
	<insert id="insertGardenUser" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenUserVo">
        INSERT INTO jl_grid_garden_user(
			id,
			name,
			cardno,
			tel,
			remark,
			city_id,
			area_id,
			street_id,
			community_id,
			garden_id,
			create_time,
			create_by,
			docking_id,
			appid,
			data_source
        ) values (
			#{id},
            #{name},
			#{cardno},
			#{tel},
			#{remark},
            #{cityCode},
            #{areaCode},
            #{streetCode},
            #{communityCode},
			#{gardenId},
			#{createTime},
			#{createBy},
			#{dockingId},
			#{appid},
			'3'
		)
    </insert>
    
    <update id="updateGardenUser" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenUserVo">
		update jl_grid_garden_user a
		set 
		name=#{name},
		cardno=#{cardno},
		tel=#{tel},
		remark=#{remark},
		city_id=#{cityCode},
		area_id=#{areaCode},
		street_id=#{streetCode},
		community_id=#{communityCode},
		garden_id=#{gardenId},
		update_by = #{updateBy,jdbcType=VARCHAR},
		update_time = #{updateTime,jdbcType=TIMESTAMP}
		where 
		docking_id=#{dockingId} and appid=#{appid} 
	</update>
	
	<delete id="deleteGardenUser" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenUserVo">
		delete from jl_grid_garden_user where docking_id=#{dockingId} and appid=#{appid}
	</delete>
	
	<update id="updateGardenUserPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqGardenUserVo">
		update jl_grid_garden_user_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="selectFocusGroupTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFocusGroupVo">
        SELECT
            int_id intId,
            docking_id dockingId,
            appid,
            type,
            id,
            cardno,
            lable_id lableId,
            create_time createTime,
         	create_by createBy
        FROM
            jl_grid_user_focusgroup_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
	
	<insert id="insertFocusGroup" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFocusGroupVo">
        INSERT INTO jl_grid_user_focusgroup(
			id,
			cardno,
			lable_id,
			create_by,
			create_time,
			docking_id,
			appid
        ) values (
			#{id},
			#{cardno},
			#{lableId},
			#{createBy},
			#{createTime},
			#{dockingId},
			#{appid}
		)
    </insert>
    
	<delete id="deleteFocusGroup" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFocusGroupVo">
		delete from jl_grid_user_focusgroup where docking_id=#{dockingId} and appid=#{appid}
	</delete>
	
	<update id="updateFocusGroupPostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.vo.task.ReqFocusGroupVo">
		update jl_grid_user_focusgroup_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="selectPeopleTaskList" resultType="com.scpyun.platform.jilinsscgsdp.bean.bo.task.ExecutorUserBo">
        SELECT
        	id buzId,
        	appid,
			user_type userType,
			huji_type hujiType,
			is_kgh isKgh,
			relation relation,
			juzhu_type juzhuType,
			living_condition livingCondition,
			user_name userName,
			card_type cardType,
			cardno cardno,
			tel tel,
			folk folk,
			sex sex,
			political_outlook politicalOutlook,
			city_id cityCode,
			area_id areaCode,
			street_id streetCode,
			community_id communityCode,
			garden_id gardenId,
			building_id buildingId,
			unit_id unitId,
			floor_id floorId,
			doorplate_id doorplateId,
			create_by createBy,
			create_time createTime,
			update_by updateBy,
			update_time updateTime,
			hj_address hjAddress,
			now_address nowAddress,
			remarks remarks,
			docking_id dockingId,
			int_id intId,
			type
        FROM
            jl_grid_user_post 
            where operate_type = '0'
            order by int_id LIMIT 3000
    </select>
	
	<insert id="insertPeople" parameterType="com.scpyun.platform.jilinsscgsdp.bean.bo.task.ExecutorUserBo">
        INSERT INTO jl_grid_user(
            id,
            user_type,
            huji_type,
            is_kgh,
            relation,
            juzhu_type,
            living_condition,
            user_name,
            card_type,
            cardno,
            tel,
            folk,
            sex,
            political_outlook,
            city_id,
            area_id,
            street_id,
            community_id,
            garden_id,
            building_id,
            unit_id,
            floor_id,
            doorplate_id,
			create_by,
            create_time,
            hj_address,
            now_address,
            remarks,
            docking_id,
            appid,
			data_source
        ) VALUE (
            #{buzId},
            #{userType},
            #{hujiType},
            #{isKgh},
            #{relation},
            #{juzhuType},
            #{livingCondition},
            #{userName},
            #{cardType},
            #{cardno},
            #{tel},
            #{folk},
            #{sex},
            #{politicalOutlook},
            #{cityCode},
            #{areaCode},
            #{streetCode},
            #{communityCode},
            #{gardenId},
            #{buildingId},
            #{unitId},
            #{floorId},
            #{doorplateId},
            #{createBy},
            #{createTime},
            #{hjAddress},
            #{nowAddress},
            #{remarks},
            #{dockingId},
            #{appid},
			'3'
        )
    </insert>
    
    <update id="updatePeople" parameterType="com.scpyun.platform.jilinsscgsdp.bean.bo.task.ExecutorUserBo">
		update jl_grid_user
		set 
		user_type=#{userType},
		huji_type=#{hujiType},
		is_kgh=#{isKgh},
		relation=#{relation},
		juzhu_type=#{juzhuType},
		living_condition=#{livingCondition},
		user_name=#{userName},
		card_type=#{cardType},
		tel=#{tel},
		folk=#{folk},
		sex=#{sex},
		political_outlook=#{politicalOutlook},
		area_id=#{areaCode},
		street_id=#{streetCode},
		community_id=#{communityCode},
		garden_id=#{gardenId},
		building_id=#{buildingId},
		unit_id=#{unitId},
		floor_id=#{floorId},
		doorplate_id=#{doorplateId},
		update_by=#{updateBy},
		update_time=#{updateTime},
		hj_address=#{hjAddress},
		now_address=#{nowAddress},
		remarks=#{remarks}
		where
		id=#{buzId}
	</update>
	
	<delete id="deletePeople" parameterType="com.scpyun.platform.jilinsscgsdp.bean.bo.task.ExecutorUserBo">
		delete from jl_grid_user where id=#{buzId}
	</delete>
	
	<update id="updatePeoplePostResult" parameterType="com.scpyun.platform.jilinsscgsdp.bean.bo.task.ExecutorUserBo">
		update jl_grid_user_post set operate_type=#{operateType},data_processing_time=now() where int_id=#{intId}
	</update>
	
	<select id="getUserByCardNo" parameterType="string" resultType="map">
        SELECT
            city_id,cardno
        FROM
            jl_grid_user
        WHERE
            cardno = #{cardno}
    </select>

</mapper>