社区,小区,网格查询修改,报事报修,物业申请数据过滤
| | |
| | | <!--自定义分页列表查询--> |
| | | <select id="selectCommunityPage" resultType="org.springblade.modules.community.vo.CommunityVO"> |
| | | select |
| | | jc.* |
| | | jc.*, |
| | | br.town_name townName |
| | | from jczz_community jc |
| | | left join blade_region br on br.code = jc.code |
| | | where jc.is_deleted = 0 |
| | |
| | | <if test="community.regionCode !=null and community.regionCode !=''"> |
| | | and jc.code like concat('%',#{community.regionCode},'%') |
| | | </if> |
| | | <if test="community.townName !=null and community.townName !=''"> |
| | | and br.town_name like concat('%',#{community.townName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <!--自定义分页列表查询--> |
| | |
| | | */ |
| | | private String regionCode; |
| | | |
| | | /** |
| | | * 街道名称 |
| | | */ |
| | | private String townName; |
| | | |
| | | } |
| | |
| | | union all |
| | | ( |
| | | select |
| | | aoi_code as id, |
| | | id, |
| | | community_code as parentId, |
| | | name |
| | | from jczz_district |
| | |
| | | */ |
| | | @ApiModelProperty(value = "社区编号") |
| | | private String communityCode; |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | @ApiModelProperty(value = "社区名称") |
| | | private String communityName; |
| | | |
| | | /** |
| | | * 网格名称 |
| | | */ |
| | |
| | | <!--自定义分页查询--> |
| | | <select id="selectGridPage" resultType="org.springblade.modules.grid.vo.GridVO"> |
| | | select |
| | | id,community_code,grid_name,principal,principal_phone,remark |
| | | from jczz_grid |
| | | where is_deleted = 0 |
| | | jg.id,jg.community_code,jg.grid_name,jg.principal,jg.principal_phone,jg.remark, |
| | | br.name as communityName,br.town_name as townName |
| | | from jczz_grid jg |
| | | left join blade_region br on br.code = jg.community_code |
| | | where jg.is_deleted = 0 |
| | | <if test="grid.communityCode!=null and grid.communityCode!=''"> |
| | | and community_code = #{grid.communityCode} |
| | | and jg.community_code = #{grid.communityCode} |
| | | </if> |
| | | <if test="grid.gridName!=null and grid.gridName!=''"> |
| | | and grid_name like concat('%',#{grid.gridName},'%') |
| | | and jg.grid_name like concat('%',#{grid.gridName},'%') |
| | | </if> |
| | | <if test="grid.principal!=null and grid.principal!=''"> |
| | | and principal like concat('%',#{grid.principal},'%') |
| | | and jg.principal like concat('%',#{grid.principal},'%') |
| | | </if> |
| | | <if test="grid.principalPhone!=null and grid.principalPhone!=''"> |
| | | and principal_phone like concat('%',#{grid.principalPhone},'%') |
| | | and jg.principal_phone like concat('%',#{grid.principalPhone},'%') |
| | | </if> |
| | | <if test="grid.regionCode != null and grid.regionCode !='' "> |
| | | and community_code like concat('%',#{grid.regionCode},'%') |
| | | and jg.community_code like concat('%',#{grid.regionCode},'%') |
| | | </if> |
| | | <if test="grid.communityName != null and grid.communityName !='' "> |
| | | and br.name like concat('%',#{grid.communityName},'%') |
| | | </if> |
| | | <if test="grid.townName != null and grid.townName !='' "> |
| | | and br.town_name like concat('%',#{grid.townName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | String[] split = gridExcel.getGridName().split("居民委员会"); |
| | | GridEntity gridEntity = new GridEntity(); |
| | | String communityName = split[0] + "居民委员会"; |
| | | gridEntity.setCommunityName(communityName); |
| | | // gridEntity.setCommunityName(communityName); |
| | | // 通过社区名称查询对应的社区编号 |
| | | QueryWrapper<Region> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("name",split[0]); |
| | |
| | | */ |
| | | package org.springblade.modules.grid.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | |
| | | private String gridPhone; |
| | | |
| | | /** |
| | | * 社区名称 |
| | | */ |
| | | private String communityName; |
| | | |
| | | /** |
| | | * 街道名称 |
| | | */ |
| | | private String townStreetName; |
| | | private String townName; |
| | | |
| | | /** |
| | | * 区域编号 |
| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPropertyCapitalApplyPage" resultType="org.springblade.modules.property.vo.PropertyCapitalApplyVO"> |
| | | select * from jczz_property_capital_apply where is_deleted = 0 |
| | | select |
| | | jpca.*, |
| | | jd.name as districtName |
| | | from jczz_property_capital_apply jpca |
| | | left join jczz_district jd on jd.id = jpca.district_id and jd.is_deleted = 0 |
| | | where jpca.is_deleted = 0 |
| | | <if test="propertyCapitalApply.districtId!=null"> |
| | | and district_id = #{propertyCapitalApply.districtId} |
| | | and jpca.district_id = #{propertyCapitalApply.districtId} |
| | | </if> |
| | | <if test="propertyCapitalApply.name!=null and propertyCapitalApply.name!=''"> |
| | | and name like concat('%',#{propertyCapitalApply.name},'%') |
| | | and jpca.name like concat('%',#{propertyCapitalApply.name},'%') |
| | | </if> |
| | | <if test="propertyCapitalApply.linkman!=null and propertyCapitalApply.linkman!=''"> |
| | | and linkman like concat('%',#{propertyCapitalApply.linkman},'%') |
| | | and jpca.linkman like concat('%',#{propertyCapitalApply.linkman},'%') |
| | | </if> |
| | | |
| | | <if test="propertyCapitalApply.districtName!=null and propertyCapitalApply.districtName!=''"> |
| | | and jd.name like concat('%',#{propertyCapitalApply.districtName},'%') |
| | | </if> |
| | | <if test="propertyCapitalApply.districtIdList!=null and propertyCapitalApply.districtIdList!=''"> |
| | | and district_id in |
| | | and jpca.district_id in |
| | | <foreach collection="propertyCapitalApply.districtIdList" item="item" separator ="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="propertyCapitalApply.regionCode != null and propertyCapitalApply.regionCode !='' "> |
| | | and jd.community_code like concat('%',#{propertyCapitalApply.regionCode},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPropertyCompanyDistrictPage" resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO"> |
| | | select * from jczz_property_company_district |
| | | where is_deleted = 0 |
| | | select |
| | | jpcd.*, |
| | | jd.name as districtName |
| | | from jczz_property_company_district jpcd |
| | | left join jczz_district jd on jd.id = jpca.district_id and jd.is_deleted = 0 |
| | | where jpcd.is_deleted = 0 |
| | | <if test="propertyCompanyDistrict.propertyCompanyId!=null"> |
| | | and property_company_id = #{propertyCompanyDistrict.propertyCompanyId} |
| | | and jpcd.property_company_id = #{propertyCompanyDistrict.propertyCompanyId} |
| | | </if> |
| | | <if test="propertyCompanyDistrict.districtId!=null"> |
| | | and district_id = #{propertyCompanyDistrict.districtId} |
| | | and jpcd.district_id = #{propertyCompanyDistrict.districtId} |
| | | </if> |
| | | <if test="propertyCompanyDistrict.propertyStage!=null"> |
| | | and property_stage = #{propertyCompanyDistrict.propertyStage} |
| | | and jpcd.property_stage = #{propertyCompanyDistrict.propertyStage} |
| | | </if> |
| | | <if test="propertyCompanyDistrict.principal!=null and propertyCompanyDistrict.principal!=''"> |
| | | and principal like concat('%',#{propertyCompanyDistrict.principal},'%') |
| | | and jpcd.principal like concat('%',#{propertyCompanyDistrict.principal},'%') |
| | | </if> |
| | | <if test="propertyCompanyDistrict.districtName!=null and propertyCompanyDistrict.districtName!=''"> |
| | | and jd.name like concat('%',#{propertyCompanyDistrict.districtName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | @Service |
| | | public class PropertyCapitalApplyServiceImpl extends ServiceImpl<PropertyCapitalApplyMapper, PropertyCapitalApplyEntity> implements IPropertyCapitalApplyService { |
| | | |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | @Override |
| | | public IPage<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage<PropertyCapitalApplyVO> page, PropertyCapitalApplyVO propertyCapitalApply) { |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null!=dept){ |
| | | propertyCapitalApply.setRegionCode(dept.getRegionCode()); |
| | | } |
| | | // 判断角色,物业角色只能查询当前小区的 |
| | | |
| | | String userRole = AuthUtil.getUserRole(); |
| | | if (userRole.contains("wygly")) { |
| | | IPropertyDistrictUserService bean = SpringUtils.getBean(IPropertyDistrictUserService.class); |
| | | List<String> strings = bean.selectPropertyDistrictByUserId(AuthUtil.getUserId()); |
| | | propertyCapitalApply.setDistrictIdList(strings); |
| | | } |
| | | |
| | | |
| | | return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply)); |
| | | } |
| | | |
| | |
| | | |
| | | private List<String> districtIdList; |
| | | |
| | | /** |
| | | * 小区名称 |
| | | */ |
| | | private String districtName; |
| | | |
| | | /** |
| | | * 区域编号 |
| | | */ |
| | | private String regionCode; |
| | | |
| | | } |
| | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class PropertyCompanyDistrictVO extends PropertyCompanyDistrictEntity { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 小区名称 |
| | | */ |
| | | private String districtName; |
| | | |
| | | } |
| | |
| | | jda.address_name as addressName |
| | | from jczz_task_report_for_repairs jtrfr |
| | | left join jczz_doorplate_address jda on jda.address_code = jtrfr.address_code |
| | | left join jczz_grid_range jgr on jgr.house_code = jtrfr.address_code |
| | | left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | where jtrfr.is_deleted = 0 |
| | | <if test="vo.createUser != null and vo.createUser != ''"> |
| | | AND jtrfr.create_user = #{vo.createUser} |
| | |
| | | <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != '' "> |
| | | AND jtrfr.create_time BETWEEN #{vo.startTime} and #{vo.endTime} |
| | | </if> |
| | | <if test="vo.regionCode != null and vo.regionCode !='' "> |
| | | and jg.community_code like concat('%',#{vo.regionCode},'%') |
| | | </if> |
| | | <if test="vo.roleName!=null and vo.roleName!=''"> |
| | | <if test="vo.roleName=='网格员'"> |
| | | <choose> |
| | |
| | | import org.springblade.modules.grid.entity.GridmanEntity; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.sse.server.SSEServer; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.modules.task.entity.TaskReportForRepairsEntity; |
| | | import org.springblade.modules.task.mapper.TaskReportForRepairsMapper; |
| | |
| | | @Autowired |
| | | private IGridService gridService; |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public IPage<TaskReportForRepairsVO> selectTaskReportForRepairsPage(IPage<TaskReportForRepairsVO> page, TaskReportForRepairsVO taskReportForRepairs) { |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null!=dept){ |
| | | taskReportForRepairs.setRegionCode(dept.getRegionCode()); |
| | | } |
| | | List<String> list = new ArrayList<>(); |
| | | if (null != taskReportForRepairs.getRoleName() && !taskReportForRepairs.getRoleName().equals("")) { |
| | | if (taskReportForRepairs.getRoleName().equals("网格员")) { |
| | |
| | | @ApiModelProperty("结束时间") |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 区域编号 |
| | | */ |
| | | private String regionCode; |
| | | |
| | | } |