Merge remote-tracking branch 'origin/master'
| | |
| | | return null; |
| | | } |
| | | List<String> regionCodeList = CacheUtil.get(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, List.class); |
| | | if (regionCodeList == null) { |
| | | if (regionCodeList == null || regionCodeList.size()==0) { |
| | | regionCodeList = new ArrayList<>(); |
| | | List<Region> deptChild = getRegionChild(regionCode); |
| | | if (deptChild != null) { |
| | | List<String> collect = deptChild.stream().map(Region::getCode).collect(Collectors.toList()); |
| | | regionCodeList.addAll(collect); |
| | | } |
| | | // regionCodeList.add(regionCode); |
| | | regionCodeList.add(regionCode); |
| | | CacheUtil.put(SYS_CACHE, REGION_CHILDCODES_CODE, regionCode, regionCodeList); |
| | | } |
| | | return regionCodeList; |
| | |
| | | @ApiModelProperty(value = "网格id") |
| | | private Integer gridId; |
| | | /** |
| | | * 网格编号 |
| | | */ |
| | | @ApiModelProperty(value = "网格编号") |
| | | private String gridCode; |
| | | /** |
| | | * 关联用户表id |
| | | */ |
| | | @ApiModelProperty(value = "关联用户表id") |
| | |
| | | bu.phone AS gridPhone |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_gridman jgm on jg.id = jgm.grid_id |
| | | LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_gridman jgm on jg.grid_code = jgm.grid_code |
| | | LEFT JOIN blade_region br on br.code = jg.community_code |
| | | LEFT JOIN jczz_place_rel jpr ON locate( jpr.community_name, br.name )> 0 |
| | | AND locate( jpr.grid_name, jg.grid_name )> 0 |
| | |
| | | |
| | | /** |
| | | * 走访日志数量统计 |
| | | * @param gridId 网格id |
| | | * @param gridCode 网格编号 |
| | | * @param status 状态 |
| | | * @return |
| | | */ |
| | | Integer getGridWorkCountHandleCount(@Param("gridId") Integer gridId,@Param("status") Integer status); |
| | | Integer getGridWorkCountHandleCount(@Param("gridCode") String gridCode,@Param("status") Integer status); |
| | | } |
| | |
| | | bu.real_name as createUserName |
| | | from jczz_grid_work_log jgwl |
| | | left join jczz_household jh on jgwl.household_id = jh.id and jh.is_deleted = 0 |
| | | left join jczz_house jhs on jhs.house_code = jh.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jhs.grid_code = jg.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN blade_user bu on bu.id = jgwl.create_user and bu.is_deleted = 0 |
| | | where jgwl.is_deleted = 0 |
| | | <if test="gridWorkLog.type !=null"> |
| | |
| | | </if> |
| | | <if test="gridWorkLog.personType !=null"> |
| | | and jgwl.person_type = #{gridWorkLog.personType} |
| | | </if> |
| | | <if test="gridWorkLog.gridId !=null"> |
| | | and jgr.grid_id = #{gridWorkLog.gridId} |
| | | </if> |
| | | <if test="gridWorkLog.name !=null and gridWorkLog.name!=''"> |
| | | and jh.name like concat('%',#{gridWorkLog.name},'%') |
| | |
| | | </if> |
| | | <if test="gridWorkLog.neiName!=null and gridWorkLog.neiName!=''"> |
| | | and jda.nei_name like concat('%',#{gridWorkLog.neiName},'%') |
| | | </if> |
| | | <if test="gridWorkLog.gridId !=null"> |
| | | and jg.id = #{gridWorkLog.gridId} |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | |
| | | <select id="getGridWorkCountHandleCount" resultType="java.lang.Integer"> |
| | | select count(*) from jczz_grid_work_log jgwl |
| | | left join jczz_household jh on jgwl.household_id = jh.id and jh.is_deleted = 0 |
| | | left join jczz_grid_range jgr on jgr.house_code=jh.house_code |
| | | left join jczz_house jhs on jhs.house_code=jh.house_code and jhs.is_deleted = 0 |
| | | where jgwl.is_deleted = 0 |
| | | <if test="status!=null"> |
| | | and jgwl.status = #{status} |
| | | </if> |
| | | <if test="gridId!=null"> |
| | | and jgr.grid_id = #{gridId} |
| | | <if test="gridCode!=null and gridCode!=''"> |
| | | and jhs.grid_code = #{gridCode} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | br.name as communityName, |
| | | br.town_name as townName |
| | | from jczz_gridman jgm |
| | | left join jczz_grid jg on jg.id = jgm.grid_id and jg.is_deleted = 0 |
| | | left join jczz_grid jg on jg.grid_code = jgm.grid_code and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | where jgm.is_deleted = 0 |
| | | <if test="gridman.gridmanName!=null and gridman.gridmanName!=''"> |
| | |
| | | <select id="getGridStatistics" resultType="java.lang.Integer"> |
| | | SELECT count(1) number |
| | | FROM jczz_gridman jgm |
| | | LEFT JOIN jczz_grid jg ON jg.id = jgm.grid_id |
| | | LEFT JOIN jczz_grid jg ON jg.grid_code = jgm.grid_code |
| | | WHERE jg.community_code = #{code} |
| | | AND jg.is_deleted = 0 |
| | | <if test="userId!=null and roleType == '1'"> |
| | |
| | | jda.aoi_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jgr.house_code |
| | | LEFT JOIN jczz_gridman jgm ON jg.grid_code = jgm.grid_code |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jg.house_code |
| | | WHERE |
| | | jgm.user_id = #{userId} |
| | | AND jg.is_deleted = 0 |
| | |
| | | jda.aoi_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_gridman jgm ON jg.id = jgm.grid_id |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jgr.house_code |
| | | LEFT JOIN jczz_gridman jgm ON jg.grid_code = jgm.grid_code |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jg.house_code |
| | | WHERE |
| | | jgm.user_id = #{userId} |
| | | AND jg.is_deleted = 0 |
| | |
| | | select |
| | | jgm.*,jg.community_code communityCode |
| | | from jczz_gridman jgm |
| | | left join jczz_grid jg on jg.id = jgm.grid_id and jg.is_deleted = 0 |
| | | left join jczz_grid jg on jg.grid_code = jgm.grid_code and jg.is_deleted = 0 |
| | | where jgm.is_deleted = 0 |
| | | and jgm.id = #{gridman.id} |
| | | </select> |
| | |
| | | </select> |
| | | |
| | | <select id="getGridManByCode" resultType="org.springblade.modules.system.entity.User"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN jczz_gridman jgm ON bu.id = jgm.user_id |
| | | LEFT JOIN jczz_grid jg ON jgm.grid_id = jg.id |
| | | WHERE |
| | | jg.community_code IN ( SELECT jg.community_code FROM jczz_grid jg LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id WHERE jgr.house_code = #{houseCode} ) |
| | | AND bu.is_deleted = 0 |
| | | SELECT |
| | | bu.* |
| | | FROM |
| | | blade_user bu |
| | | LEFT JOIN jczz_gridman jgm ON bu.id = jgm.user_id |
| | | LEFT JOIN jczz_grid jg ON jgm.grid_code = jg.grid_code |
| | | WHERE |
| | | jg.community_code IN |
| | | ( |
| | | SELECT jg.community_code FROM jczz_grid jg LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | WHERE jgr.house_code = #{houseCode} |
| | | ) |
| | | AND bu.is_deleted = 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | /** |
| | | * 走访日志数量统计 |
| | | * @param gridId 网格id |
| | | * @param gridCode 网格编号 |
| | | * @param status 状态 |
| | | * @return |
| | | */ |
| | | Integer getGridWorkCountHandleCount(Integer gridId, Integer status); |
| | | Integer getGridWorkCountHandleCount(String gridCode, Integer status); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 走访日志数量统计 |
| | | * @param gridId 网格id |
| | | * @param gridCode 网格编号 |
| | | * @param status 状态 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer getGridWorkCountHandleCount(Integer gridId, Integer status) { |
| | | return baseMapper.getGridWorkCountHandleCount(gridId,status); |
| | | public Integer getGridWorkCountHandleCount(String gridCode, Integer status) { |
| | | return baseMapper.getGridWorkCountHandleCount(gridCode,status); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "网格id") |
| | | private Integer gridId; |
| | | /** |
| | | * 网格编号 |
| | | */ |
| | | @ApiModelProperty(value = "网格编号") |
| | | private String gridCode; |
| | | |
| | | /** |
| | | * 来源 1:地址总表 2:国控采集 |
| | |
| | | br.town_name as townStreetName,br.name as neiName, |
| | | jg.grid_name |
| | | from jczz_house jh |
| | | left join jczz_grid_range jgr on jgr.house_code = jh.house_code |
| | | left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | <where> |
| | | <if test="house.id != null ">and jh.id = #{house.id}</if> |
| | |
| | | </if> |
| | | and jh.is_deleted = 0 |
| | | ORDER BY |
| | | jh.update_time DESC |
| | | jh.update_time desc,jh.id desc |
| | | </where> |
| | | |
| | | |
| | |
| | | select |
| | | jh.*, |
| | | jhl.id as cid,jhl.*,jhl.remark as cremark, |
| | | br.code as neiCode,jg.id as gridId,br.town_code as streetCode |
| | | br.code as neiCode,br.town_code as streetCode |
| | | from jczz_house jh |
| | | left join jczz_user_house_label jhl on jh.house_code = jhl.house_code and jhl.lable_type = 2 |
| | | left join jczz_grid_range jgr on jgr.house_code = jh.house_code |
| | | left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | left join jczz_grid jg on jg.grid_code = jgr.grid_code and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | where jh.is_deleted = 0 |
| | | <if test="house.houseCode!=null and house.houseCode!=''"> |
| | |
| | | if(jhr.termination_time is null,if(date_format(jhr.due_time,'%Y-%m-%d') >= date_format(now(),'%Y-%m-%d'),0,1),2) as status |
| | | FROM jczz_house_rental jhr |
| | | JOIN jczz_doorplate_address jda ON jda.address_code = jhr.house_code |
| | | JOIN jczz_house jh ON jh.house_code = jhr.house_code |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN ( |
| | | SELECT jht.housing_rental_id,jht.name as tenantName,jht.phone_number as phone |
| | | FROM jczz_household jht RIGHT JOIN ( |
| | |
| | | jczz_household jh |
| | | LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0 |
| | | <where> |
| | | <if test="household.userId!=null"> |
| | | AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | ) |
| | | </if> |
| | | <if test="household.name!=null and household.name !=''"> |
| | |
| | | jczz_household jh |
| | | LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0 |
| | | where jh.is_deleted = 0 |
| | | and jh.name != '' and jh.name is not null |
| | | <if test="household.userId!=null"> |
| | | AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | ) |
| | | </if> |
| | | <if test="household.name!=null and household.name !=''"> |
| | |
| | | jczz_household jh |
| | | LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_user_house_label juhl on juhl.house_code = jda.address_code and lable_type=1 |
| | | <where> |
| | | <if test="household.userId!=null"> |
| | | AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | ) |
| | | </if> |
| | | <if test="household.name!=null and household.name !=''"> |
| | |
| | | jczz_household jh |
| | | LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0 |
| | | LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0 |
| | | <where> |
| | | <if test="household.userId!=null"> |
| | | AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | AND jg.grid_code IN ( SELECT DISTINCT jgm.grid_code FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId} |
| | | ) |
| | | </if> |
| | | <if test="household.name!=null and household.name !=''"> |
| | |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | List<HouseVO> houseVOS = baseMapper.selectHousePage(page, house,regionChildCodesList,isAdministrator); |
| | | // 遍历查询网格 |
| | | // for (HouseVO houseVO : houseVOS) { |
| | | // // 设置对应的网格名称 |
| | | // GridVO gridVO = gridService.getGridDetailByHouseCode(houseVO.getHouseCode()); |
| | | // if (null!= gridVO){ |
| | | // houseVO.setGridName(gridVO.getGridName()); |
| | | // } |
| | | // } |
| | | return page.setRecords(houseVOS); |
| | | } |
| | | |
| | |
| | | jp.place_name AS placeName |
| | | FROM |
| | | jczz_place_ext jpe |
| | | LEFT JOIN jczz_place jp ON jpe.place_id = jp.id |
| | | AND jp.is_deleted = 0 |
| | | LEFT JOIN jczz_grid_range jgr on jgr.house_code=jp.house_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_place jp ON jpe.place_id = jp.id AND jp.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg ON jp.grid_code = jg.grid_code AND jg.is_deleted = 0 |
| | | WHERE |
| | | jpe.is_deleted = 0 |
| | | <if test="isAdministrator==2"> |
| | |
| | | * @param page |
| | | * @param place |
| | | * @param houseCodeList |
| | | * @param regionChildCodesList |
| | | * @param isAdministrator |
| | | * @return |
| | | */ |
| | | List<PlaceVO> selectPlacePage(IPage page, |
| | | @Param("place") PlaceVO place, |
| | | @Param("houseCodeList") List<String> houseCodeList, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | | |
| | |
| | | <if test="place.isPerfect==2"> |
| | | and jp.status = 2 |
| | | </if> |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | and jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator ="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jg.community_code in |
| | | and jg.grid_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jg.community_code in ('') |
| | | and jg.grid_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | |
| | | br.name neiName, |
| | | FALSE AS hasChildren |
| | | FROM jczz_place jp |
| | | LEFT JOIN jczz_grid_range jgr ON jp.house_code = jgr.house_code |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_grid jg on jp.grid_code = jg.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN blade_region br on br.code = jg.community_code |
| | | where 1 = 1 |
| | | and jp.is_deleted = 0 |
| | |
| | | public IPage<PlaceVO> selectPlacePage(IPage<PlaceVO> page, PlaceVO place) { |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | List<PlaceVO> placeVOS = baseMapper.selectPlacePage(page, place,regionChildCodesList,isAdministrator); |
| | | List<String> list = new ArrayList<>(); |
| | | if (null!=place.getRoleName() && !place.getRoleName().equals("")){ |
| | | if (place.getRoleName().equals("网格员")){ |
| | | // 查询对应的房屋地址code |
| | | list = gridService.getAddressCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | List<PlaceVO> placeVOS = baseMapper.selectPlacePage(page, place,list,regionChildCodesList,isAdministrator); |
| | | // 返回 |
| | | return page.setRecords(placeVOS); |
| | | } |
| | |
| | | @AllArgsConstructor |
| | | @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/client") |
| | | @Api(value = "应用管理", tags = "应用管理") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | public class AuthClientController extends BladeController { |
| | | |
| | | private final IAuthClientService clientService; |
| | |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入menu") |
| | | public R<MenuVO> detail(Menu menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入menu") |
| | | public R<List<MenuVO>> list(@ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "懒加载列表", notes = "传入menu") |
| | | public R<List<MenuVO>> lazyList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "菜单列表", notes = "传入menu") |
| | | public R<List<MenuVO>> menuList(@ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "懒加载菜单列表", notes = "传入menu") |
| | | public R<List<MenuVO>> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | * @return |
| | | */ |
| | | List<Region> getCodeLess12DataList(); |
| | | |
| | | /** |
| | | * 查询下级区域(拼接网格) |
| | | * @param regionCode |
| | | * @return |
| | | */ |
| | | List<Region> getRegionChildList(@Param("regionCode") String regionCode); |
| | | } |
| | |
| | | where length(parent_code) < 12 |
| | | </select> |
| | | |
| | | <!--查询下级区域(拼接网格)--> |
| | | <select id="getRegionChildList" resultType="org.springblade.modules.system.entity.Region"> |
| | | SELECT |
| | | code,parent_code,name,ancestors,region_level,sort |
| | | FROM blade_region |
| | | where ancestors like concat('%',#{regionCode},'%') |
| | | union all |
| | | ( |
| | | SELECT |
| | | jg.grid_code as code, |
| | | jg.community_code as parent_code, |
| | | jg.grid_name as name, |
| | | '' as ancestors, |
| | | 6 as region_level, |
| | | jg.sort |
| | | FROM blade_region br |
| | | right join jczz_grid jg on jg.community_code = br.village_code and jg.is_deleted = 0 |
| | | where br.ancestors like concat('%',#{regionCode},'%') |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询下级区域 |
| | | * 查询下级区域(拼接网格) |
| | | * @param regionCode |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Region> getRegionChild(String regionCode) { |
| | | return baseMapper.selectList(Wrappers.<Region>query().lambda().like(Region::getAncestors, regionCode)); |
| | | return baseMapper.getRegionChildList(regionCode); |
| | | } |
| | | } |
| | |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.category.entity.CategoryEntity; |
| | | import org.springblade.modules.category.service.ICategoryService; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.entity.GridWorkLogEntity; |
| | | import org.springblade.modules.grid.entity.GridmanEntity; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.grid.service.IGridWorkLogService; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.house.service.IHouseRentalService; |
| | |
| | | |
| | | @Autowired |
| | | private IHouseRentalService iHouseRentalService; |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | @Autowired |
| | | private ICategoryService categoryService; |
| | |
| | | taskVO.setReportType(2); |
| | | taskVO.setIsDeleted(0); |
| | | // 查询网格员对应的网格id |
| | | Integer gridId = getGridId(); |
| | | String gridCode = getGridCode(); |
| | | // 标签事件 |
| | | Integer bqsj = baseMapper.selectTaskCount(taskVO); |
| | | taskVO.setReportType(1); |
| | |
| | | // 场所审核 |
| | | Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, 1); |
| | | // 走访日志 |
| | | Integer zfrw = SpringUtils.getBean(IGridWorkLogService.class).getGridWorkCountHandleCount(gridId,1); |
| | | Integer zfrw = SpringUtils.getBean(IGridWorkLogService.class).getGridWorkCountHandleCount(gridCode,1); |
| | | // 设置 |
| | | objectObjectHashMap.put("qbhs", qbhs); |
| | | objectObjectHashMap.put("bqsj", bqsj); |
| | |
| | | * 获取网格员id |
| | | * @return |
| | | */ |
| | | private Integer getGridId() { |
| | | QueryWrapper<GridmanEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("is_deleted",0).eq("user_id",AuthUtil.getUserId()); |
| | | List<GridmanEntity> list = SpringUtils.getBean(IGridmanService.class).list(wrapper); |
| | | if (list.size()>0){ |
| | | return list.get(0).getGridId(); |
| | | private String getGridCode() { |
| | | GridEntity grid = SpringUtils.getBean(IGridService.class).getGridByUserId(AuthUtil.getUserId()); |
| | | if (null!=grid){ |
| | | return grid.getGridCode(); |
| | | } |
| | | return null; |
| | | } |