| | |
| | | |
| | | <select id="selectTaskPlaceRectificationById" parameterType="long" resultMap="TaskPlaceRectificationDTOResult"> |
| | | SELECT |
| | | jtpr.*, |
| | | jtpr.id, |
| | | jtpr.place_check_id, |
| | | jtpr.task_id, |
| | | jtpr.STATUS, |
| | | jtpr.task_name, |
| | | jtpr.remark, |
| | | jtpr.update_time, |
| | | jtpr.create_time, |
| | | jtpr.house_code, |
| | | jtpr.rectification_notice_flag, |
| | | jtpr.rectification_end_time, |
| | | jtpr.rectification_complete_time, |
| | | jtpr.rectification_flag, |
| | | jtpr.punish_flag, |
| | | jtpr.police_station, |
| | | jtpr.rectification_notice_img_url, |
| | | jtpr.signature_path, |
| | | jtpr.create_user, |
| | | jtpr.image_urls, |
| | | jp.id jpid, |
| | | jp.place_name, |
| | | jp.location, |
| | |
| | | bu.`name`, |
| | | jpe.legal_tel, |
| | | jpe.legal_person, |
| | | jt.remark reasonFailure |
| | | jt.remark reasonFailure, |
| | | jda.address_name |
| | | FROM |
| | | jczz_task_place_rectification jtpr |
| | | LEFT JOIN jczz_task jt on jt.id = jtpr.task_id |
| | |
| | | LEFT JOIN blade_region br ON br.`code` = jg.community_code |
| | | LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id |
| | | LEFT JOIN blade_user bu ON bu.id = jtpr.create_user |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpr.house_code |
| | | WHERE jtpr.task_id = #{taskId} |
| | | </select> |
| | | |
| | |
| | | jtpr.signature_path, |
| | | jtpr.create_user, |
| | | jtpr.image_urls, |
| | | bd.dept_name, |
| | | jpag.pcs_name deptName, |
| | | jp.id jpid, |
| | | jp.place_name, |
| | | jp.location, |
| | |
| | | LEFT JOIN blade_region br ON br.`code` = jg.community_code |
| | | LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id |
| | | LEFT JOIN blade_user bu ON bu.id = jtpr.create_user |
| | | LEFT JOIN blade_dept bd ON bu.dept_id = bd.id |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpr.house_code |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code |
| | | <where> |
| | | <if test="taskPalce.id != null ">and id = #{taskPalce.id}</if> |
| | | <if test="taskPalce.placeCheckId != null ">and place_check_id = #{taskPalce.placeCheckId}</if> |
| | | <if test="taskPalce.taskId != null ">and task_id = #{taskPalce.taskId}</if> |
| | | <if test="taskPalce.status != null ">and status = #{taskPalce.status}</if> |
| | | <if test="taskPalce.taskName != null and taskPalce.taskName != ''">and task_name = #{taskPalce.taskName} |
| | | </if> |
| | | |
| | | <if test="taskPalce.startTime!=null and taskPalce.startTime!=''"> |
| | | and jtpr.create_time>=#{taskPalce.startTime} |
| | | </if> |
| | | <if test="taskPalce.endTime!=null and taskPalce.endTime!=''"> |
| | | and jtpr.create_time<=#{taskPalce.endTime} |
| | | </if> |
| | | |
| | | <if test="taskPalce.placeName!=null and taskPalce.placeName!=''"> |
| | |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jg.grid_code in |
| | | and |
| | | ( |
| | | jg.grid_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | or |
| | | jpag.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | and |
| | | ( |
| | | jg.grid_code in ('') or jpag.community_code in ('') |
| | | ) |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | and jtpr.create_time=( |
| | | SELECT MAX(create_time) FROM jczz_task_place_rectification where jtpr.house_code=house_code |
| | | ) |
| | | order by jtpr.create_time desc |
| | | </where> |
| | | |
| | | order by jtpr.create_time desc |
| | | </select> |
| | | |
| | | |
| | |
| | | and jpr.state = '0' |
| | | and jp.nine_type = bd.dict_key |
| | | and br.town_code =#{code} |
| | | and jpc.create_time=( |
| | | SELECT MAX(create_time) FROM jczz_place_check where jpc.house_code=house_code |
| | | <if test="taskPlaceRectification.startTime!=null and taskPlaceRectification.startTime!=''"> |
| | | and create_time>=#{taskPlaceRectification.startTime} |
| | | and jpc.create_time>=#{taskPlaceRectification.startTime} |
| | | </if> |
| | | <if test="taskPlaceRectification.endTime!=null and taskPlaceRectification.endTime!=''"> |
| | | and create_time<=#{taskPlaceRectification.endTime} |
| | | and jpc.create_time<=#{taskPlaceRectification.endTime} |
| | | </if> |
| | | ) |
| | | </where> |
| | | ) number |
| | | FROM |
| | |
| | | jtpr.signature_path, |
| | | jtpr.create_user, |
| | | jtpr.image_urls, |
| | | bd.dept_name, |
| | | jpag.pcs_name deptName, |
| | | jp.id jpid, |
| | | jp.place_name, |
| | | jp.location, |
| | |
| | | LEFT JOIN blade_region br ON br.`code` = jg.community_code |
| | | LEFT JOIN jczz_place_ext jpe ON jpe.place_id = jp.id |
| | | LEFT JOIN blade_user bu ON bu.id = jtpr.create_user |
| | | LEFT JOIN blade_dept bd ON bu.dept_id = bd.id |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jp.house_code |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jtpr.house_code |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jpag.community_code= jg.community_code |
| | | <where> |
| | | <if test="taskPalce.id != null ">and id = #{taskPalce.id}</if> |
| | | <if test="taskPalce.placeCheckId != null ">and place_check_id = #{taskPalce.placeCheckId}</if> |
| | |
| | | </when> |
| | | </choose> |
| | | </if> |
| | | and jtpr.create_time=( |
| | | SELECT MAX(create_time) FROM jczz_task_place_rectification where jtpr.house_code=house_code |
| | | ) |
| | | |
| | | </where> |
| | | |
| | | |