Merge remote-tracking branch 'origin/test' into test
| | |
| | | |
| | | @ApiOperation(value = "角色下拉列表", response = RoleVO.class) |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage() { |
| | | Long communityId = 0l; |
| | | return userService.listRoleBackstage(communityId); |
| | | public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | Long communityId = 0L; |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | |
| | | @ApiModelProperty(value = "特殊人员标签") |
| | | private String label; |
| | | |
| | | private Integer outOrLocal; |
| | | |
| | | /** |
| | | * 外地or本地(1.本地 2.外地) |
| | | */ |
| | | public interface outOrLocal{ |
| | | int bd = 1; |
| | | int wd = 2; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("车辆数") |
| | | private Integer carTotal = 0; |
| | | |
| | | @ApiModelProperty("名称") |
| | | private String name; |
| | | } |
| | |
| | | this.businessStatus = businessStatus ? "在营" : "已关闭"; |
| | | } |
| | | |
| | | public void setBusinessStatus(String businessStatus) { |
| | | this.businessStatus = businessStatus; |
| | | } |
| | | |
| | | public void setAccountStatus(Integer accountStatus) { |
| | | this.accountStatus = accountStatus.intValue() == 1 ? "启用" : "禁用"; |
| | | } |
| | | |
| | | public void setAccountStatus(String accountStatus) { |
| | | this.accountStatus = accountStatus; |
| | | } |
| | | |
| | | public void setBusinessTimeTime(String businessTime) { |
| | |
| | | this.businessTime = businessTime.replace("EVERY_DAY", "每天:"); |
| | | } else if (businessTime.contains("WEEKDAY")) { |
| | | this.businessTime = businessTime.replace("WEEKDAY", "周一至周五:"); |
| | | } else { |
| | | } else if (businessTime.contains("WEEKEND")) { |
| | | this.businessTime = businessTime.replace("WEEKEND", "周末:"); |
| | | } else { |
| | | this.businessTime = businessTime; |
| | | } |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty("走访任务当月完成数量") |
| | | private Integer zfMonthNum = 0; |
| | | |
| | | @ApiModelProperty("随手拍当日完成数量") |
| | | private Integer sspTodayNum = 0; |
| | | |
| | | @ApiModelProperty("随手拍当月完成数量") |
| | | private Integer sspMonthNum = 0; |
| | | |
| | | } |
| | |
| | | * 物业id |
| | | */ |
| | | @ApiModelProperty(value = "物业id") |
| | | private Integer propertyId; |
| | | private Long propertyId; |
| | | /** |
| | | * 反馈人 |
| | | */ |
| | | @ApiModelProperty(value = "反馈人名称") |
| | | private String feedback; |
| | | @ApiModelProperty(value = "小区名称") |
| | | private String areaName; |
| | | |
| | | /** |
| | | * 状态 0 待处理 1待评价 2已结束 |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @GetMapping("resetPasswordPatch") |
| | | R resetPasswordPatch(@RequestParam("userIds") Long[] userIds); |
| | | R resetPasswordPatch(@RequestParam("userIds") Long[] userIds,@RequestParam("password") String password); |
| | | |
| | | /** |
| | | * 某社区后台人员查询 |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @PostMapping("/role/listrolebackstage") |
| | | R listRoleBackstage(@RequestParam("communityId") Long communityId); |
| | | R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize); |
| | | |
| | | /** |
| | | * 分页查询后台用户 |
| | |
| | | head1.add("登记时间"); |
| | | headList.add(head1); |
| | | subVOList.forEach(sub -> { |
| | | if (sub.getType() != 5) { |
| | | if (sub.getType() != 5 && sub.getType() != 11) { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | if(sub.getType() == 11){ |
| | |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) { |
| | | //判断是文字描述直接跳过 |
| | | if (userAnswers.getOptionType().equals(5)) { |
| | | if (userAnswers.getOptionType().equals(5) || userAnswers.getOptionType().equals(11)) { |
| | | continue; |
| | | } |
| | | //判断reserveRecordId为空则为第一条记录,默认加上昵称和灯谜是 |
| | |
| | | @ApiOperation(value = "分页查询",response = ComPropertyAlarmVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(2L); |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return propertyService.comPropertyAlarmSelectAll(commonPage); |
| | | } |
| | | |
| | |
| | | return communityService.pageMerchant(pageConvenientMerchantDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询便民服务商家详情", response = ConvenientMerchantVO.class) |
| | | @GetMapping("/merchant/get") |
| | | public R getMerchant(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.getMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "所有服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @GetMapping("/service-category/all") |
| | | public R getAllServiceCategories() { |
| | |
| | | |
| | | @ApiOperation(value = "角色下拉列表", response = RoleVO.class) |
| | | @GetMapping("listrolebackstage") |
| | | public R listRoleBackstage() { |
| | | public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | Long communityId = this.getCommunityId(); |
| | | return userService.listRoleBackstage(communityId); |
| | | return userService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class) |
| | |
| | | |
| | | @ApiOperation("批量重置密码") |
| | | @GetMapping("resetPasswordPatch") |
| | | public R resetPasswordPatch(@RequestParam("userIds") Long[] userId){ |
| | | return userService.resetPasswordPatch(userId); |
| | | public R resetPasswordPatch(@RequestParam("userIds") Long[] userId,@RequestParam("password") String password){ |
| | | return userService.resetPasswordPatch(userId,password); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户菜单获取", response = SysMenuVO.class) |
| | |
| | | // if(easyAppDTO.getCommunityId() == null){ |
| | | // easyAppDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | // } |
| | | if(easyAppDTO != null && easyAppDTO.getIsPublicity() != null && easyAppDTO.getIsPublicity().equals(0)){ |
| | | easyAppDTO.setIsPublicity(2); |
| | | } |
| | | return gridService.easyListByAdmin(easyAppDTO); |
| | | } |
| | | |
| | |
| | | return R.fail("请先登录"); |
| | | } |
| | | photoHandleDTO.setHandlerId(userInfoVO.getUserId()); |
| | | if(photoHandleDTO.getIsPublicity() != null && photoHandleDTO.getIsPublicity().equals(0)){ |
| | | photoHandleDTO.setIsPublicity(2); |
| | | } |
| | | return gridService.easyHandleByAdmin(photoHandleDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍切换公示状态-lyq") |
| | | @PostMapping("publicity") |
| | | public R publicity(@RequestBody ComActEasyPhotoEditAdminDTO photoHandleDTO) { |
| | | if(photoHandleDTO != null && photoHandleDTO.getIsPublicity() != null && photoHandleDTO.getIsPublicity().equals(0)){ |
| | | photoHandleDTO.setIsPublicity(2); |
| | | } |
| | | return gridService.easyPublicityByAdmin(photoHandleDTO); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 |
| | | * 分页查询便民服务商家 运营后台 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | | */ |
| | |
| | | String result = TencentUtils.getEidResult(eidToken); |
| | | JSONObject object = JSON.parseObject(result); |
| | | if (object == null) { |
| | | return R.fail("核验失败"); |
| | | return R.fail("人脸信息与所填信息不符,请检查所填写信息"); |
| | | } |
| | | JSONObject textObject = object.getJSONObject("Text"); |
| | | String code = textObject.getString("ErrCode"); |
| | | if (!code.equals("0")) { |
| | | log.error("人脸核验失败,错误原因:" + textObject.toJSONString()); |
| | | return R.fail("核验失败"); |
| | | return R.fail("人脸信息与所填信息不符,请检查所填写信息"); |
| | | } |
| | | addIdentityAuthDTO.setAuthMethod(FACE_AUTH.getMethod()); |
| | | addIdentityAuthDTO.setVerificationResult(object.toJSONString()); |
| | |
| | | @Select("select count(id) from com_elders_auth_elderly WHERE community_id = #{communityId}") |
| | | Integer getStatisticsCount(@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " |
| | | + "select cmp.id,cmp.`name`,cmp.phone,cmp.card_no,cmpct.label,cmp.address,cmp.nation,cmp.political_outlook,cmv.lng,cmv.lat" |
| | | + ",cmp.sex from com_mng_population as cmp left join com_mng_village as cmv on cmv.village_id = cmp.village_id " |
| | | + " left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id " |
| | | + " where cmpct.community_id = #{populationListDTO.communityId}" |
| | | + "<if test='populationListDTO.keyWord != null and populationListDTO.keyWord != ""'>" |
| | | + "AND (cmp.`name` like concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) " |
| | | + " </if> " + "<if test='populationListDTO.label != null and populationListDTO.label != ""'>" |
| | | + "AND cmpct.label like concat ('%',#{populationListDTO.label},'%') " + " </if> " + " </script>") |
| | | IPage<PopulationListVO> pagePopulationListApp(Page page, |
| | | @Param("populationListDTO") PagePopulationListDTO populationListDTO); |
| | | |
| | |
| | | + " cmp.census_register, " + " cmp.out_or_local, " + " cmp.remark, " + " cmp.marriage " + "FROM " |
| | | + " com_mng_population AS cmp " + " LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " |
| | | + " left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id " + "WHERE " |
| | | + " id = #{populationId}") |
| | | + " cmp.id = #{populationId}") |
| | | PopulationDetailVO getPopulationDetailApp(@Param("populationId") Long populationId); |
| | | |
| | | @Select("<script> " + " SELECT " + " cmp.id, " + " cmp.`name` AS userName, " |
| | |
| | | getGridPopulationAdminLists(@Param("populationExportDTO") ComMngPopulationExportDTO populationExportDTO); |
| | | |
| | | @Select("<script> " |
| | | + " select cmp.id,cmp.`name`,cmp.card_no,cmtct.label from com_mng_population as cmp left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id where 1=1 " |
| | | + " select cmp.id,cmp.`name`,cmp.card_no,cmpct.label from com_mng_population as cmp left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id where 1=1 " |
| | | + "<if test='villagePopulationDTO.villageId != null'>" |
| | | + " and cmp.village_id = #{villagePopulationDTO.villageId} " + " </if> " |
| | | + "<if test='villagePopulationDTO.keyWord != null'>" |
| | |
| | | + " LEFT JOIN com_mng_population AS cmp ON cmp.id = cmphu.popul_id " |
| | | + " left join com_mng_population_community_tags AS cmpct on cmp.id = cmpct.population_id " + "WHERE " |
| | | + " cmphu.house_id = #{houseId} " + "<if test='relation != null '>" + " AND cmphu.relation = #{relation} " |
| | | + " </if> " + "<if test='relationId != null '>" + " AND cmphu.relation_id = #{relationId} " + " </if> " |
| | | + " </if> " + "<if test='relationId != null '>" + " AND cmphu.relation_id = #{relationId} " + " group by id </if> " |
| | | + " </script>") |
| | | List<PopulationListVO> getGridVillageBuildingPopulationList(@Param("houseId") Long houseId, |
| | | @Param("relation") Integer relation, @Param("relationId") Integer relationId); |
| | |
| | | int deleteMerchantById(@Param("merchantId") Long merchantId, @Param("operator") Long operator); |
| | | |
| | | /** |
| | | * 分页查询便民服务商家 |
| | | * 分页查询便民服务商家 运营后台 |
| | | * @param page 分页参数 |
| | | * @param pageConvenientMerchantDTO |
| | | * @return |
| | |
| | | @ApiModelProperty(value = "社区Id") |
| | | private Long communityId; |
| | | |
| | | private String password; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "照片") |
| | | private String url; |
| | | |
| | | private String password; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "登录用户id") |
| | | private Long userId; |
| | | |
| | | private String password; |
| | | |
| | | } |
| | |
| | | |
| | | private Long areaId; |
| | | |
| | | private String password; |
| | | |
| | | } |
| | |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | import com.panzhihua.service_community.dao.ComActCommitteeDao; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | import com.panzhihua.service_community.service.ComActCommitteeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | this.comActCommitteeDao.insert(comActCommittee); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | return R.fail("账号或手机号已存在"); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | if(comActCommiteeVO!=null){ |
| | | ComActCommittee comActCommittee=new ComActCommittee(); |
| | | BeanUtils.copyProperties(comActCommiteeVO,comActCommittee); |
| | | if(comActCommiteeVO.getRoleId()!=null){ |
| | | ComActCommittee comPropertyBase=this.comActCommitteeDao.selectById(comActCommiteeVO.getId()); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comPropertyBase.getUserId()); |
| | | administratorsUserVO.setLastLoginTime(DateUtil.date()); |
| | | administratorsUserVO.setRoleId(comActCommiteeVO.getRoleId()); |
| | | this.userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | this.comActCommitteeDao.updateById(comActCommittee); |
| | | return R.ok(); |
| | | } |
| | |
| | | this.comActFourMemberDao.insert(comActFourMember); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | return R.fail("手机号或账户已存在"); |
| | | } |
| | | return R.fail("绑定管辖区域不能为空或重复"); |
| | | } |
| | |
| | | if(comActFourMemberVO!=null){ |
| | | if(comActFourMemberVO.getIds()!=null){ |
| | | for(Integer id:comActFourMemberVO.getIds()){ |
| | | ComActFourMember comActFourMember=new ComActFourMember(); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | ComActFourMember comActFourMemberBase=this.comActFourMemberDao.selectById(id); |
| | | if(comActFourMemberBase!=null){ |
| | | comActFourMember.setId(comActFourMemberBase.getId()); |
| | | comActFourMember.setUserId(comActFourMemberBase.getUserId()); |
| | | comActFourMemberVO.setUserId(comActFourMemberBase.getUserId()); |
| | | BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO); |
| | | userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO); |
| | | userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | //查询题目 |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda() |
| | | .eq(ComActReserveSubDO::getReserveId, reserveId).orderByAsc(ComActReserveSubDO::getCreateAt)); |
| | | .eq(ComActReserveSubDO::getReserveId, reserveId).orderByAsc(ComActReserveSubDO::getCreateAt).orderByAsc(ComActReserveSubDO::getId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | if(!subDo.getType().equals(5)){ |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActSocialOrgVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.entity.ComActCommittee; |
| | | import com.panzhihua.service_community.entity.ComActSocialOrg; |
| | | import com.panzhihua.service_community.dao.ComActSocialOrgDao; |
| | | import com.panzhihua.service_community.service.ComActSocialOrgService; |
| | |
| | | this.comActSocialOrgDao.insert(comActSocialOrg); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | return R.fail("账号或手机号已存在"); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | if(comActSocialOrgVO!=null){ |
| | | ComActSocialOrg comActSocialOrg=new ComActSocialOrg(); |
| | | BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg); |
| | | if(comActSocialOrgVO.getRoleId()!=null){ |
| | | ComActSocialOrg comPropertyBase=this.comActSocialOrgDao.selectById(comActSocialOrgVO.getId()); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comPropertyBase.getUserId()); |
| | | administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId()); |
| | | administratorsUserVO.setLastLoginTime(DateUtil.date()); |
| | | this.userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | this.comActSocialOrgDao.updateById(comActSocialOrg); |
| | | return R.ok(); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PASS_THROUGH; |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PENDING_REVIEW; |
| | | import static com.panzhihua.common.enums.IdentityAuthMethodEnum.FACE_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthStatusEnum.CERTIFIED; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.base.Joiner; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.enums.*; |
| | | import com.panzhihua.common.enums.PopulHouseUseEnum; |
| | | import com.panzhihua.common.model.dtos.community.AddIdentityAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComElderAuthRecordVO; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ComElderAuthElderliesDAO; |
| | | import com.panzhihua.service_community.dao.ComElderAuthRecordsDAO; |
| | |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PASS_THROUGH; |
| | | import static com.panzhihua.common.enums.IdentityApprovalStatusEnum.PENDING_REVIEW; |
| | | import static com.panzhihua.common.enums.IdentityAuthMethodEnum.FACE_AUTH; |
| | | import static com.panzhihua.common.enums.IdentityAuthStatusEnum.CERTIFIED; |
| | | |
| | | /** |
| | | * title: ComElderAuthRecordsServiceImpl 社区政务》高龄老人认证》认证记录表服务实现类 |
| | |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | |
| | | comElderAuthRecordsDO.setApprovalDate(nowDate); |
| | | if (comElderAuthRecordVO.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)) { |
| | | comElderAuthRecordsDO.setAuthStatus(ComElderAuthRecordsDO.authStatus.yrz); |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", "认证成功!"); |
| | | } else { |
| | | sendAuthSubscribe(comElderAuthRecordsDO.getSubmitUserId(), "高龄认证", comElderAuthRecordVO.getRejectReason()); |
| | | } |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | int nub = comElderAuthRecordsDAO.updateById(comElderAuthRecordsDO); |
| | |
| | | return R.fail("审核失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendAuthSubscribe(Long userId, String name, String result) { |
| | | //发送订阅通知 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(userId); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, name, |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), |
| | | result); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (this.baseMapper.insert(comElderAuthRecordsDO) < 0) { |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | sendAuthSubscribe(addIdentityAuthDTO.getSubmitUserId(), "高龄认证", "认证成功!"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R pagePopulationListApp(PagePopulationListDTO populationListDTO) { |
| | | if(populationListDTO.getLabel() != null && "户籍人口".equals(populationListDTO.getLabel())){ |
| | | populationListDTO.setLabel(null); |
| | | populationListDTO.setOutOrLocal(PagePopulationListDTO.outOrLocal.bd); |
| | | } |
| | | if(populationListDTO.getLabel() != null && "流动人口".equals(populationListDTO.getLabel())){ |
| | | populationListDTO.setLabel(null); |
| | | populationListDTO.setOutOrLocal(PagePopulationListDTO.outOrLocal.wd); |
| | | } |
| | | IPage<PopulationListVO> pagePopulationList = this.baseMapper.pagePopulationListApp( |
| | | new Page(populationListDTO.getPageNum(), populationListDTO.getPageSize()), populationListDTO); |
| | | if (!pagePopulationList.getRecords().isEmpty()) { |
| | |
| | | public R delGridPopulationAdmin(List<Long> ids) { |
| | | Integer count = this.baseMapper.getPopulationVisitingCount(ids); |
| | | if (count > 0) { |
| | | return R.ok("您选择的数据中存在被引用的,无法删除"); |
| | | return R.fail("您选择的数据中存在被引用的,无法删除"); |
| | | } |
| | | this.baseMapper.deleteBatchIds(ids); |
| | | return R.ok(); |
| | | return R.ok("删除成功"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.WxXCXTempSend; |
| | | import com.panzhihua.service_community.dao.ComActActSignDAO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO; |
| | | @Resource |
| | | private SysConfMapper sysConfDao; |
| | | @Resource |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | |
| | |
| | | BeanUtils.copyProperties(comPensionAuthRecordVO, comPensionAuthRecordDO); |
| | | if (comPensionAuthRecordVO.getApprovalStatus().equals(PASS_THROUGH.getStatus())) { |
| | | comPensionAuthRecordDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!"); |
| | | } else { |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", comPensionAuthRecordVO.getRejectReason()); |
| | | } |
| | | comPensionAuthRecordDO.setApprovalDate(new Date()); |
| | | int nub = comPensionAuthRecordDAO.updateById(comPensionAuthRecordDO); |
| | |
| | | return R.fail("审核失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendAuthSubscribe(Long userId, String name, String result) { |
| | | //发送订阅通知 |
| | | Map<String, String> map = comActActSignDAO.getUserOpenId(userId); |
| | | if (map != null) { |
| | | String openid = map.get("openid"); |
| | | try { |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
| | | String accessToken = util.getAppAccessToken(); |
| | | WxUtil.sendSubscribeRZSH(openid, accessToken, name, |
| | | DateUtils.format(new Date(), DateUtils.ymdhms_format), |
| | | result); |
| | | } catch (Exception e) { |
| | | log.error("推送审核状态订阅消息失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (this.baseMapper.insert(comPensionAuthRecordDO) < 0) { |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | if (addIdentityAuthDTO.getAuthMethod().intValue() == FACE_AUTH.getMethod()) { |
| | | sendAuthSubscribe(comPensionAuthRecordDO.getSubmitUserId(), "养老认证", "认证成功!"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | this.comPropertyDao.insert(comProperty); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(r.getMsg()); |
| | | return R.fail("账号或手机号已存在"); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | if(comPropertyVO!=null){ |
| | | ComProperty comProperty=new ComProperty(); |
| | | BeanUtils.copyProperties(comPropertyVO,comProperty); |
| | | if(comPropertyVO.getRoleId()!=null){ |
| | | ComProperty comPropertyBase=this.comPropertyDao.selectById(comPropertyVO.getId()); |
| | | AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO(); |
| | | administratorsUserVO.setUserId(comPropertyBase.getUserId()); |
| | | administratorsUserVO.setRoleId(comPropertyVO.getRoleId()); |
| | | administratorsUserVO.setLastLoginTime(DateUtil.date()); |
| | | this.userService.putUserBackstage(administratorsUserVO); |
| | | } |
| | | this.comPropertyDao.updateById(comProperty); |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductCategoryVO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductCategoryDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductDAO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductCategoryDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientProductDO; |
| | | import com.panzhihua.service_community.service.ConvenientProductCategoryService; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | public class ConvenientProductCategoryServiceImpl extends ServiceImpl<ConvenientProductCategoryDAO, ConvenientProductCategoryDO> implements ConvenientProductCategoryService { |
| | | |
| | | @Resource |
| | | private ConvenientProductDAO convenientProductDAO; |
| | | |
| | | @Override |
| | | public R addProductCategory(ConvenientProductCategoryDTO convenientProductCategoryDTO) { |
| | |
| | | if (isNull(convenientProductCategoryDO)) { |
| | | return R.fail("分类id不存在"); |
| | | } |
| | | int quotedCount = convenientProductDAO.selectCount(new QueryWrapper<ConvenientProductDO>() |
| | | .lambda().eq(ConvenientProductDO::getCategoryId, categoryId).eq(ConvenientProductDO::getIsDel, false)); |
| | | if (quotedCount > 0) { |
| | | return R.fail("该分类名称已被引用,无法删除!"); |
| | | } |
| | | convenientProductCategoryDO.setIsDel(true); |
| | | convenientProductCategoryDO.setUpdatedBy(operator); |
| | | int result = this.baseMapper.updateById(convenientProductCategoryDO); |
| | |
| | | } |
| | | int count = this.baseMapper.checkCategoryIsUsing(categoryId); |
| | | if (count > 0) { |
| | | return R.fail("分类已被引用,无法删除"); |
| | | return R.fail("该分类名称已被引用,无法删除!"); |
| | | } |
| | | convenientServiceCategoryDO.setIsDel(true); |
| | | convenientServiceCategoryDO.setUpdatedBy(operator); |
| | |
| | | and t1.status =#{commonPage.status} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectBuilding" resultType="String"> |
| | | select concat(t1.group_at,t.name,'栋') from com_mng_building t left join com_mng_village t1 on t.village_id = t1.village_id where t.id in (#{id}) |
| | | select concat(t1.group_at,t.name,'栋') from com_mng_building t left join com_mng_village t1 on t.village_id = t1.village_id where t.id in (${id}) |
| | | </select> |
| | | |
| | | <select id="getById" resultMap="baseResultMap"> |
| | |
| | | ; |
| | | </update> |
| | | |
| | | <select id="pagePopulationListApp" resultType="com.panzhihua.common.model.vos.grid.PopulationListVO"> |
| | | SELECT |
| | | cmp.id, |
| | | cmp.`name`, |
| | | cmp.phone, |
| | | cmp.card_no, |
| | | cmpct.label, |
| | | cmp.address, |
| | | cmp.nation, |
| | | cmp.political_outlook, |
| | | cmv.lng, |
| | | cmv.lat, |
| | | cmp.sex |
| | | FROM |
| | | com_mng_population AS cmp |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id |
| | | LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id |
| | | WHERE |
| | | cmpct.community_id = #{populationListDTO.communityId} |
| | | <if test = 'populationListDTO.keyWord != null and populationListDTO.keyWord != ""' > |
| | | AND (cmp.`name` LIKE concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) |
| | | </if> |
| | | <if test = 'populationListDTO.label != null and populationListDTO.label != ""' > |
| | | AND cmpct.label LIKE concat ('%',#{populationListDTO.label},'%') |
| | | </if> |
| | | <if test="populationListDTO.outOrLocal != null"> |
| | | AND cmp.out_or_local = #{populationListDTO.outOrLocal} |
| | | </if> |
| | | </select> |
| | | |
| | | <resultMap id="selectMap" type="com.panzhihua.common.model.vos.community.VillageVO"> |
| | | <result property="value" column="villageId"/> |
| | | <result property="label" column="villageName"/> |
| | |
| | | public R getGridEventStatisticsByApp(Long gridId, Long userId) { |
| | | GridEventStatisticsVO result = this.baseMapper.getGridEventStatisticsByApp(gridId); |
| | | if (result != null) { |
| | | result.setTodayNum(result.getTodayNum() + result.getZfTodayNum()); |
| | | result.setMonthNum(result.getMonthNum() + result.getZfMonthNum()); |
| | | result.setTodayNum(result.getTodayNum() + result.getZfTodayNum() + result.getSspTodayNum()); |
| | | result.setMonthNum(result.getMonthNum() + result.getZfMonthNum() + result.getSspMonthNum()); |
| | | |
| | | // 查询当前网格员下管理的楼栋名称 |
| | | List<Map<String, Object>> buildNameList = this.baseMapper.getMemberBuildName(userId); |
| | |
| | | 8 AS event_type |
| | | FROM |
| | | com_mng_population AS cmp |
| | | LEFT JOIN event_grid_data AS egd ON egd.grid_community_id = cmp.act_id |
| | | LEFT JOIN com_mng_population_community_tags AS cmpct ON cmpct.population_id = cmp.id |
| | | LEFT JOIN event_grid_data AS egd ON egd.grid_community_id = cmpct.community_id |
| | | WHERE |
| | | egd.id = #{eventGridTodoDataDTO.gridId} UNION ALL |
| | | SELECT |
| | |
| | | <if test="gridMemberWainDTO.keyWord!=null and gridMemberWainDTO.keyWord!= """> |
| | | AND (content like concat(#{gridMemberWainDTO.keyWord},'%') or position_address like concat(#{gridMemberWainDTO.keyWord},'%')) |
| | | </if> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <update id="setUserWorkStatus"> |
| | |
| | | <if test="gridId!=null"> |
| | | AND grid_id = #{gridId} |
| | | </if> |
| | | ) as zfMonthNum |
| | | ) as zfMonthNum,( |
| | | SELECT |
| | | count( caep.id ) |
| | | FROM |
| | | com_act_easy_photo as caep |
| | | left join event_grid_data as egd on egd.grid_community_id = caep.community_id |
| | | WHERE |
| | | handle_status = 2 |
| | | AND feedback_at BETWEEN DATE_FORMAT( CURDATE(), '%Y-%m-%d %H:%i:%s' ) |
| | | AND DATE_SUB(DATE_ADD( CURDATE(), INTERVAL 1 DAY ),INTERVAL 1 SECOND) |
| | | <if test="gridId!=null"> |
| | | AND egd.id = #{gridId} |
| | | </if> |
| | | ) as sspTodayNum, |
| | | ( |
| | | SELECT |
| | | count( caep.id ) |
| | | FROM |
| | | com_act_easy_photo as caep |
| | | left join event_grid_data as egd on egd.grid_community_id = caep.community_id |
| | | WHERE |
| | | handle_status = 2 |
| | | AND feedback_at BETWEEN DATE_FORMAT( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), '%Y-%m-%d %H:%i:%s' ) AND NOW() |
| | | <if test="gridId!=null"> |
| | | AND egd.id = #{gridId} |
| | | </if> |
| | | ) as sspMonthNum |
| | | FROM |
| | | `event` |
| | | WHERE |
| | |
| | | |
| | | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO"> |
| | | select t.*, t1.position, t2.name as solveName |
| | | select t.*, t3.address as position, t2.name as solveName |
| | | from com_property_alarm t |
| | | left join com_property_equipment t1 on t.serial_no = t1.serial_no |
| | | left join sys_user t2 on t.solve_id = user_id |
| | | left join com_mng_population_house t3 on t1.village_id=t3.id |
| | | where t.id=#{id} |
| | | </select> |
| | | |
| | |
| | | </resultMap> |
| | | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO" parameterType="com.panzhihua.common.model.dtos.property.CommonPage"> |
| | | select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id |
| | | select t.*,t1.name as feedback,t3.address as areaName from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id left join com_mng_village t3 on t.property_id=t3.village_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.status !=null"> |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @PostMapping("listrolebackstage") |
| | | public R listRoleBackstage(@RequestParam("communityId") Long communityId) { |
| | | return roleService.listRoleBackstage(communityId); |
| | | public R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { |
| | | return roleService.listRoleBackstage(communityId,pageNum,pageSize); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @GetMapping("resetPasswordPatch") |
| | | public R resetPasswordPatch(@RequestParam("userIds") Long[] userId) { |
| | | return userService.resetPasswordPatch(userId); |
| | | public R resetPasswordPatch(@RequestParam("userIds") Long[] userId,@RequestParam("password")String password) { |
| | | return userService.resetPasswordPatch(userId,password); |
| | | } |
| | | |
| | | /** |
| | |
| | | * 对应社区 0 表示运营后台 |
| | | * @return 角色集合 |
| | | */ |
| | | R listRoleBackstage(Long communityId); |
| | | R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize); |
| | | |
| | | /** |
| | | * 新增角色 |
| | |
| | | /** |
| | | * 批量重置密码 |
| | | */ |
| | | R resetPasswordPatch(Long[] userId); |
| | | R resetPasswordPatch(Long[] userId,String password); |
| | | |
| | | /** |
| | | * 便民服务新增商家账号 |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @return 角色集合 |
| | | */ |
| | | @Override |
| | | public R listRoleBackstage(Long communityId) { |
| | | List<SysRoleDO> sysRoleDOS = |
| | | roleDAO.selectList(new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId)); |
| | | if (ObjectUtils.isEmpty(sysRoleDOS)) { |
| | | public R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize) { |
| | | IPage<SysRoleDO> sysRoleDOIPage=this.roleDAO.selectPage(new Page<>(pageNum,pageSize),new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId).orderByDesc(SysRoleDO::getCreateAt)); |
| | | if (ObjectUtils.isEmpty(sysRoleDOIPage.getRecords())) { |
| | | return R.fail("角色列表为空"); |
| | | } |
| | | List<RoleVO> roleVOS = new ArrayList<>(); |
| | | sysRoleDOS.forEach(sysRoleDO -> { |
| | | RoleVO roleVO = new RoleVO(); |
| | | BeanUtils.copyProperties(sysRoleDO, roleVO); |
| | | roleVOS.add(roleVO); |
| | | }); |
| | | return R.ok(roleVOS); |
| | | return R.ok(sysRoleDOIPage); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (isAll.intValue() == 1) { |
| | | menuIds = sysMenuDAO |
| | | .selectList( |
| | | new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, menuRoleVO.getCommunityId())) |
| | | new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, 2)) |
| | | .stream().map(sysMenuDO -> sysMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | } else { |
| | | menuIds = menuRoleVO.getMenuIds(); |
| | |
| | | throw new ServiceException("手机号已经存在"); |
| | | } else if (e.getMessage().contains("union_account_type")) { |
| | | throw new ServiceException("账户已经存在"); |
| | | }else if(e.getMessage().contains("23000")){ |
| | | throw new ServiceException("手机号已存在"); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R resetPasswordPatch(Long[] userId) { |
| | | public R resetPasswordPatch(Long[] userId,String password) { |
| | | if(userId!=null){ |
| | | for(Long user:userId){ |
| | | SysUserDO sysUserDO = new SysUserDO(); |
| | | sysUserDO.setUserId(user); |
| | | String encode = new BCryptPasswordEncoder().encode("admin123456"); |
| | | String encode = new BCryptPasswordEncoder().encode(password); |
| | | sysUserDO.setPassword(encode); |
| | | userDao.updateById(sysUserDO); |
| | | } |