| | |
| | | package com.panzhihua.common.model.dtos.community.acid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | private String checkStatus; |
| | | @ApiModelProperty("id数组") |
| | | private String ids; |
| | | @ApiModelProperty("是否根据社区/村落隔离") |
| | | @ApiModelProperty("登录的账号名") |
| | | private String loginAccount; |
| | | private Integer type; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/comActAcidRecord/fiveCountPlus") |
| | | R comActAcidRecordFiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity); |
| | | R comActAcidRecordFiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity,@RequestParam("loginAccount")String loginAccount); |
| | | |
| | | @GetMapping("/comActAcidRecord/statics") |
| | | R comActAcidRecordStatics(@RequestParam("date")String date); |
| | |
| | | R uuPush(@RequestParam("washPhone")String washPhone,@RequestParam("phone")String phone,@RequestParam("washName")String washName,@RequestParam("orderStatus")Integer orderStatus); |
| | | |
| | | @GetMapping("/communityList") |
| | | R communityList(@RequestParam("type") Integer type); |
| | | R communityList(@RequestParam("name") String name, @RequestParam("id") Long id); |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | |
| | | comActAcidRecordDTO.setLocalCity(this.getLoginUserInfo().getName()); |
| | | } |
| | | else { |
| | | if(!comActAcidRecordDTO.getLocalCity().contains(",")&&this.getLoginUserInfo().getType()==9){ |
| | | comActAcidRecordDTO.setLocalCity(this.getLoginUserInfo().getName()+","+comActAcidRecordDTO.getLocalCity()); |
| | | } |
| | | String[] area={"东区","西区","仁和区","米易县","盐边县","钒钛新区"}; |
| | | if(!ArrayUtil.contains(area,comActAcidRecordDTO.getLocalCity())){ |
| | | if(!comActAcidRecordDTO.getLocalCity().contains(",")&&this.getLoginUserInfo().getType()==9){ |
| | | comActAcidRecordDTO.setLocalCity(this.getLoginUserInfo().getName()+","+comActAcidRecordDTO.getLocalCity()); |
| | | }} |
| | | } |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (StringUtils.equals("pandashujuzhongxin", loginUserInfo.getAccount())){ |
| | | comActAcidRecordDTO.setType(1); |
| | | }else if (StringUtils.equals("pannongyenongcunju", loginUserInfo.getAccount())){ |
| | | comActAcidRecordDTO.setType(2); |
| | | } |
| | | comActAcidRecordDTO.setLoginAccount(loginUserInfo.getAccount()); |
| | | return this.communityService.selectAllComActAcidRecord(comActAcidRecordDTO); |
| | | } |
| | | |
| | |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam(value = "localCity",required = false)String localCity){ |
| | | if(StringUtils.isNotEmpty(localCity)){ |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity); |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,localCity,this.getLoginUserInfo().getAccount()); |
| | | } |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,this.getLoginUserInfo().getName()); |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date,this.getLoginUserInfo().getName(),this.getLoginUserInfo().getAccount()); |
| | | } |
| | | |
| | | |
| | |
| | | @GetMapping("/communityList") |
| | | @ApiOperation(value = "获取当前账号下的社区/村落列表",response = StreetVO.class) |
| | | public R communityList(){ |
| | | //获取当前登录用户的信息 |
| | | RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); |
| | | // 从获取RequestAttributes中获取HttpServletRequest的信息 |
| | | HttpServletRequest request = |
| | | (HttpServletRequest)requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST); |
| | | // 登录对象信息 |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | log.error("获取登录用户信息失败【{}】"); |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | // //截取社区名 |
| | | // if (StringUtils.isEmpty(loginUserInfoVO.getCommunityName())) { |
| | | // R<LoginUserInfoVO> userInfoByUserId = userService.getUserInfoByUserId(loginUserInfoVO.getUserId().toString()); |
| | | // loginUserInfoVO = userInfoByUserId.getData(); |
| | | // } |
| | | Integer type=3; |
| | | // if (loginUserInfoVO.getAccount().equals("pannongyenongcunju")){ |
| | | // type=2; |
| | | // }else if (loginUserInfoVO.getAccount().equals("pandashujuzhongxin")){ |
| | | // type=1; |
| | | // }else if (loginUserInfoVO.getAccount().equals("fangyipingtai")){ |
| | | // type=3; |
| | | // } |
| | | return userService.communityList(type); |
| | | return userService.communityList(this.getLoginUserInfo().getAccount(),this.getUserId()); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity){ |
| | | return this.comActAcidRecordService.fiveCountPlus(date,localCity); |
| | | public R fiveCountPlus(@RequestParam("date")String date,@RequestParam("localCity")String localCity,@RequestParam("loginAccount")String loginAccount){ |
| | | return this.comActAcidRecordService.fiveCountPlus(date,localCity,loginAccount); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param localCity |
| | | * @return |
| | | */ |
| | | FiveCount fiveCountPlus(@Param("date") String date,@Param("localCity") String localCity); |
| | | FiveCount fiveCountPlus(@Param("date") String date,@Param("localCity") String localCity,@Param("type") Integer type); |
| | | |
| | | /** |
| | | * 统计查询 |
| | |
| | | * 5项统计 |
| | | * @return |
| | | */ |
| | | R fiveCountPlus(String date,String localCity); |
| | | R fiveCountPlus(String date,String localCity,String loginAccount); |
| | | |
| | | /** |
| | | * 图标统计 |
| | |
| | | |
| | | @Override |
| | | public R pageList(ComActAcidRecordDTO comActAcidRecordDTO) { |
| | | //是否需要筛选 |
| | | comActAcidRecordDTO.setType(isVilliage(comActAcidRecordDTO.getLoginAccount())); |
| | | log.info("搜索条件=========="+comActAcidRecordDTO); |
| | | //获取当前登录账号的社区名 |
| | | return R.ok(this.baseMapper.pageList(new Page<>(comActAcidRecordDTO.getPage(), comActAcidRecordDTO.getSize()),comActAcidRecordDTO)); |
| | | } |
| | | |
| | |
| | | return R.ok(this.baseMapper.fiveCount(localCity)); |
| | | } |
| | | @Override |
| | | public R fiveCountPlus(String date,String localCity) { |
| | | return R.ok(this.baseMapper.fiveCountPlus(date,localCity)); |
| | | public R fiveCountPlus(String date,String localCity,String loginAccount) { |
| | | Integer type = isVilliage(loginAccount); |
| | | log.info("type===="+type); |
| | | return R.ok(this.baseMapper.fiveCountPlus(date,localCity,type)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | case "盐边县": comStreetDO.setAreaCode(510422); break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 是否需要区分村落/社区 |
| | | * */ |
| | | private Integer isVilliage(String name){ |
| | | if ("fangyipingtai".equals(name)){ |
| | | return 3; |
| | | }else if ("pandashujuzhongxin".equals(name)){ |
| | | return 1; |
| | | }else if ("pannongyenongcunju".equals(name)){ |
| | | return 2; |
| | | } |
| | | return 3; |
| | | } |
| | | } |
| | |
| | | <if test="commonPage.travelCard !=null and commonPage.travelCard !=''"> |
| | | and travel_card like concat('%',#{commonPage.travelCard},'%') |
| | | </if> |
| | | <if test="commonPage.type == 1"> |
| | | and local_city like concat('%','社区') |
| | | </if> |
| | | <if test="commonPage.type == 2"> |
| | | and local_city like concat('%','村') |
| | | </if> |
| | | </where> |
| | | order by check_status asc,create_time desc |
| | | </select> |
| | |
| | | |
| | | <select id="fiveCountPlus" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record where 1=1 and is_del=0 |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) allCount, |
| | | concat('%',#{localCity},'%') |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if></if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) dangerCount, |
| | | concat('%',#{localCity},'%') |
| | | </if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) greenMark, |
| | | concat('%',#{localCity},'%')</if> |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) redMark, |
| | | concat('%',#{localCity},'%') |
| | | </if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) yellowMark, |
| | | concat('%',#{localCity},'%') |
| | | </if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) travelCount, |
| | | concat('%',#{localCity},'%') |
| | | </if>) travelCount, |
| | | (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | <if test="type == 1"> |
| | | and local_city like |
| | | concat('%','社区') |
| | | </if> |
| | | <if test="type == 2"> |
| | | and local_city like |
| | | concat('%','村') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) outsideCount |
| | | concat('%',#{localCity},'%') |
| | | </if>) outsideCount |
| | | </select> |
| | | |
| | | <select id="pushStatics" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | |
| | | } |
| | | |
| | | @GetMapping("/communityList") |
| | | public R getCommunityList(@RequestParam(value = "type") Integer type){ |
| | | return userService.getCommunityList(type); |
| | | public R getCommunityList(@RequestParam("name") String name, @RequestParam(value = "id",required = false) Long id){ |
| | | return userService.getCommunityList(name,id); |
| | | } |
| | | |
| | | } |
| | |
| | | Map<String,Long> getDailyAddAndActive(@Param("date") Date date,@Param("id") Long streetId,@Param("areaCode") Long areaCode); |
| | | |
| | | |
| | | List<StreetVO> selectStreetByAreaCode(Integer code); |
| | | List<StreetVOS> selectStreetByAreaCode(Integer code); |
| | | |
| | | List<StreetVO> selectStreetsByAreaCode(Integer code); |
| | | |
| | | ComActAcidCheckRecordVO selectComActAcidCheckRecordById(Long id); |
| | | |
| | |
| | | * */ |
| | | List<CommunityVO> selectCommunityByStreetId(@Param("id") Integer streetId,@Param("type") Integer type); |
| | | |
| | | /** |
| | | * 获取账户id |
| | | * */ |
| | | List<Integer> selectIdsByAccount(@Param("array") String[] streetList); |
| | | |
| | | List<CommunityVO> selectCommunityByStreetName(String name); |
| | | |
| | | StreetVOS selectStreetByName(String name); |
| | | } |
| | |
| | | /** |
| | | * 获取城镇或村落列表 |
| | | * */ |
| | | R getCommunityList(Integer type); |
| | | R getCommunityList(String name,Long id); |
| | | } |
| | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getCommunityList(Integer type) { |
| | | List<Integer> areaList = areaCodeList(); |
| | | List<AreaVOS> areaVOList=new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO=new AreaVOS(); |
| | | areaVO.setId(code); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVO> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVO> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()){ |
| | | StreetVO vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type); |
| | | vo.setCommunityList(communityVOS); |
| | | if (type!=3){ |
| | | if (communityVOS==null || communityVOS.size()==0){ |
| | | iterator.remove(); |
| | | public R getCommunityList(String name,Long id) { |
| | | //区级账号名 |
| | | String[] streetList={"bingcaogangjiedao","donghuajiedao","nongnongpingjiedao","dadukoujiedaojiedao","guazipingjiedao", |
| | | "yinjiangzhen","qingxiangpingjiedao","yuquanjiedao","hemenkoujiedao","dabaodingjiedao","taojiadujiedao","gelipinzhen","dahezhonglujiedao", |
| | | "jingjiangzhen","renhezhen","pingdizhen","datianzhen","tongdezhen","futianzhen","qianjinzhen","panlianzhen","binguzhen","baimazhen", |
| | | "salianzhen","puweizhen","deshizhen","wanqiuyizuxiang","caochangzhen","xinshanlisuzuxiang","tongzilinzhen","yongxingzhen","yumenzhen", |
| | | "honggezhen","hongguoyizuxiang"}; |
| | | List<Integer> ids = userDao.selectIdsByAccount(streetList); |
| | | //村或社区账号 |
| | | Integer type=isVilliage(name); |
| | | //是否为市级账号 |
| | | Boolean cityAccount = isCityAccount(name); |
| | | if (cityAccount){ |
| | | List<Integer> areaList=areaCodeList(); |
| | | List<AreaVOS> areaVOList=new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO=new AreaVOS(); |
| | | areaVO.setId(code); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVOS> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()){ |
| | | StreetVOS vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type); |
| | | vo.setChildList(communityVOS); |
| | | if (type!=3){ |
| | | if (communityVOS==null || communityVOS.size()==0){ |
| | | iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | areaVO.setChildList(streetVOS); |
| | | areaVOList.add(areaVO); |
| | | } |
| | | List<StreetVOS> list=new ArrayList<>(); |
| | | for (StreetVO streetVO : streetVOS) { |
| | | StreetVOS vo=new StreetVOS(); |
| | | vo.setId(streetVO.getId()); |
| | | vo.setName(streetVO.getName()); |
| | | vo.setChildList(streetVO.getCommunityList()); |
| | | list.add(vo); |
| | | return R.ok(areaVOList); |
| | | }else{ |
| | | Boolean areaAccount = isAreaAccount(name); |
| | | if (areaAccount){ |
| | | Integer areaCode = accountToCode(name); |
| | | List<Integer> areaList=new ArrayList<>(); |
| | | areaList.add(areaCode); |
| | | List<AreaVOS> areaVOList=new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO=new AreaVOS(); |
| | | areaVO.setId(code); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVOS> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()){ |
| | | StreetVOS vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), type); |
| | | vo.setChildList(communityVOS); |
| | | } |
| | | areaVO.setChildList(streetVOS); |
| | | areaVOList.add(areaVO); |
| | | } |
| | | return R.ok(areaVOList); |
| | | }else{ |
| | | //非区县账号,只看街道下属社区 |
| | | if (ArrayUtil.contains(streetList, name)){ |
| | | List<StreetVOS> list=new ArrayList<>(); |
| | | //只看当前街道下属社区 |
| | | StreetVOS streetVOS = userDao.selectStreetByName(name); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetName(name); |
| | | if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(streetVOS)) { |
| | | streetVOS.setChildList(communityVOS); |
| | | } |
| | | list.add(streetVOS); |
| | | return R.ok(list); |
| | | } |
| | | } |
| | | areaVO.setChildList(list); |
| | | areaVOList.add(areaVO); |
| | | } |
| | | return R.ok(areaVOList); |
| | | return R.ok(null); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R getAreaAndStreet() { |
| | |
| | | AreaVO vo=new AreaVO(); |
| | | vo.setId(code); |
| | | vo.setName(areaCodeToName(code.longValue())); |
| | | vo.setStreetList(userDao.selectStreetByAreaCode(code)); |
| | | vo.setStreetList(userDao.selectStreetsByAreaCode(code)); |
| | | areaVOList.add(vo); |
| | | } |
| | | return R.ok(areaVOList); |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 是否需要区分村落/社区 |
| | | * */ |
| | | private Integer isVilliage(String name){ |
| | | if ("fangyipingtai".equals(name)){ |
| | | return 3; |
| | | }else if ("pandashujuzhongxin".equals(name)){ |
| | | return 1; |
| | | }else if ("pannongyenongcunju".equals(name)){ |
| | | return 2; |
| | | } |
| | | return 3; |
| | | } |
| | | |
| | | /** |
| | | * 是否为市级账号 |
| | | * */ |
| | | private Boolean isCityAccount(String name){ |
| | | if(("fangyipingtai").equals(name) || ("pandashujuzhongxin").equals(name) || ("pannongyenongcunju").equals(name)){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 是否为区级账号 |
| | | * */ |
| | | private Boolean isAreaAccount(String name){ |
| | | Boolean flag=false; |
| | | switch (name){ |
| | | case "dongqu": |
| | | case "xiqu": |
| | | case "renhequ": |
| | | case "miyixian": |
| | | case "yanbianxian": |
| | | flag=true; |
| | | break; |
| | | } |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | | * account转区areaCode |
| | | * */ |
| | | private Integer accountToCode(String code){ |
| | | String name="100000"; |
| | | switch (code){ |
| | | case "xiqu" : |
| | | name= "510423"; |
| | | break; |
| | | case "dongqu": |
| | | name="510402"; |
| | | break; |
| | | case "renhequ": |
| | | name="510411"; |
| | | break; |
| | | case "miyixian": |
| | | name="510421"; |
| | | break; |
| | | case "yanbianxian": |
| | | name="510422"; |
| | | break; |
| | | case "fantaixinqu": |
| | | name="510424"; |
| | | break; |
| | | } |
| | | return Integer.parseInt(name); |
| | | } |
| | | |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectStreetByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVO"> |
| | | <select id="selectStreetByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVOS"> |
| | | select street_id as id,name as name from com_street where area_code=#{code} |
| | | </select> |
| | | <select id="selectStreetsByAreaCode" resultType="com.panzhihua.common.model.vos.user.StreetVO"> |
| | | select street_id as id,name as name from com_street where area_code=#{code} |
| | | </select> |
| | | <select id="selectComActAcidCheckRecordById" |
| | |
| | | and name like concat('%','村') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectIdsByAccount" resultType="java.lang.Integer"> |
| | | select user_id from sys_user where account in |
| | | <foreach collection="array" item="name" separator="," open="(" close=")" > |
| | | #{name} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectCommunityByStreetName" resultType="com.panzhihua.common.model.vos.user.CommunityVO"> |
| | | select ca.community_id as id,ca.name as name |
| | | from sys_user as su |
| | | left join com_street as cs on cs.name=su.name |
| | | left join com_act as ca on ca.street_id=cs.street_id |
| | | where su.account=#{name} |
| | | </select> |
| | | <select id="selectStreetByName" resultType="com.panzhihua.common.model.vos.user.StreetVOS"> |
| | | select cs.street_id as id,cs.name as name |
| | | from sys_user as su |
| | | left join com_street as cs on su.name=cs.name |
| | | where su.account=#{name} |
| | | limit 1 |
| | | </select> |
| | | </mapper> |