Merge branch 'test' into 'test_bak'
Test
See merge request root/zhihuishequ!224
| | |
| | | */ |
| | | @ApiModelProperty("纬度") |
| | | private String latitude; |
| | | |
| | | /** |
| | | * 接收人 |
| | | */ |
| | | @ApiModelProperty("接收人") |
| | | private String receiveName; |
| | | } |
| | |
| | | List<List<Object>> resultList = new ArrayList<>(); |
| | | //构建单个用户数据 |
| | | List<Object> userData = new ArrayList<>(); |
| | | |
| | | String noExport = "以上信息仅用于疫苗防控"; |
| | | //遍历答案列表 |
| | | Long reserveRecordId = 0L; |
| | | Long reserveSubId = 0L; |
| | |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) { |
| | | //判断是文字描述直接跳过 |
| | | if (userAnswers.getOptionType().equals(5) || userAnswers.getOptionType().equals(11)) { |
| | | if (userAnswers.getOptionType().equals(5) || userAnswers.getOptionType().equals(11) |
| | | || (StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport))) { |
| | | continue; |
| | | } |
| | | //判断reserveRecordId为空则为第一条记录,默认加上昵称和灯谜是 |
| | |
| | | if(!reserveSubId.equals(userAnswers.getReserveSubId())){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | |
| | | //如果是承诺字段则不导出 |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport)){ |
| | | continue; |
| | | } |
| | | |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | }else{ |
| | | //如果是承诺字段则不导出 |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport)){ |
| | | continue; |
| | | } |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | |
| | | String nowtime = getCurrentDate().format(format_y); |
| | | return nowtime; |
| | | } |
| | | |
| | | /** |
| | | * 获取当前年第一天 |
| | | * @return 当前年第一天时间 |
| | | */ |
| | | public static Date getFirstDayOfYear() { |
| | | Calendar currCal=Calendar.getInstance(); |
| | | int currentYear = currCal.get(Calendar.YEAR); |
| | | return getYearFirst(currentYear); |
| | | } |
| | | |
| | | /** |
| | | * 获取某年第一天日期 |
| | | * @param year 年份 |
| | | * @return Date |
| | | */ |
| | | public static Date getYearFirst(int year){ |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.clear(); |
| | | calendar.set(Calendar.YEAR, year); |
| | | Date currYearFirst = calendar.getTime(); |
| | | return currYearFirst; |
| | | } |
| | | } |
| | |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
| | | import com.alibaba.excel.write.metadata.style.WriteFont; |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSON; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "登记明细导出数据.xlsx"; |
| | | String noHaed = "承诺"; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | |
| | | if (sub.getType() != 5 && sub.getType() != 11) { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | if(sub.getType() == 11){ |
| | | headn.add(sub.getContent().substring(0, sub.getContent().indexOf("("))); |
| | | }else{ |
| | | headn.add(sub.getContent()); |
| | | if(!sub.getContent().equals(noHaed)){ |
| | | if(sub.getType() == 11){ |
| | | headn.add(sub.getContent().substring(0, sub.getContent().indexOf("("))); |
| | | }else{ |
| | | headn.add(sub.getContent()); |
| | | } |
| | | headList.add(headn); |
| | | } |
| | | headList.add(headn); |
| | | } |
| | | }); |
| | | //数据转换 |
| | | List<List<Object>> datalist = AssemblyUtils.ReserveData(questnaireAnswersDTOS.getAnswers()); |
| | | |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | //设置头居中 |
| | | headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | //设置头字体 |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontHeightInPoints((short)14); |
| | | headWriteFont.setBold(true); |
| | | headWriteCellStyle.setWriteFont(headWriteFont); |
| | | |
| | | |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | //设置 水平居中 |
| | | contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | //设置 垂直居中 |
| | | contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | |
| | | contentWriteCellStyle.setWrapped(true); |
| | | HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
| | |
| | | comActMicroWishVO.setCommunityId(communityId); |
| | | // comActMicroWishVO.setBackUserId(userId); |
| | | comActMicroWishVO.setIsPageMyWish(null); |
| | | return communityService.pageMicroWish(comActMicroWishVO); |
| | | return communityService.pageMicroWishAdmin(comActMicroWishVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "心愿详情") |
| | |
| | | package com.panzhihua.community_backstage.excel; |
| | | |
| | | import com.alibaba.excel.enums.CellDataTypeEnum; |
| | | import com.alibaba.excel.metadata.CellData; |
| | | import com.alibaba.excel.metadata.Head; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class Custemhandler extends AbstractColumnWidthStyleStrategy { |
| | | private static final int MAX_COLUMN_WIDTH = 100; |
| | | //the maximum column width in Excel is 255 characters |
| | | |
| | | private Map<Integer, Map<Integer, Integer>> CACHE = new HashMap(8); |
| | | |
| | | public Custemhandler() { |
| | | } |
| | | |
| | | @Override |
| | | protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<CellData> cellDataList, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) { |
| | | if (isHead && cell.getRowIndex() != 0) { |
| | | int columnWidth = cell.getStringCellValue().getBytes().length; |
| | | if (columnWidth > MAX_COLUMN_WIDTH) { |
| | | columnWidth = MAX_COLUMN_WIDTH; |
| | | } else { |
| | | columnWidth = columnWidth + 3; |
| | | boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList); |
| | | if (needSetWidth) { |
| | | Map<Integer, Integer> maxColumnWidthMap = (Map)CACHE.get(writeSheetHolder.getSheetNo()); |
| | | if (maxColumnWidthMap == null) { |
| | | maxColumnWidthMap = new HashMap(16); |
| | | CACHE.put(writeSheetHolder.getSheetNo(), maxColumnWidthMap); |
| | | } |
| | | writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 256); |
| | | |
| | | Integer columnWidth = this.dataLength(cellDataList, cell, isHead); |
| | | if (columnWidth >= 0) { |
| | | if (columnWidth > 30) { |
| | | columnWidth = 30; |
| | | } |
| | | |
| | | Integer maxColumnWidth = (Integer)((Map)maxColumnWidthMap).get(cell.getColumnIndex()); |
| | | if (maxColumnWidth == null || columnWidth > maxColumnWidth) { |
| | | ((Map)maxColumnWidthMap).put(cell.getColumnIndex(), columnWidth); |
| | | writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 90); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(Custemhandler.class); |
| | | private Integer dataLength(List<CellData> cellDataList, Cell cell, Boolean isHead) { |
| | | if (isHead) { |
| | | return cell.getStringCellValue().getBytes().length; |
| | | } else { |
| | | CellData cellData = cellDataList.get(0); |
| | | CellDataTypeEnum type = cellData.getType(); |
| | | if (type == null) { |
| | | return -1; |
| | | } else { |
| | | switch(type) { |
| | | case STRING: |
| | | return cellData.getStringValue().getBytes().length; |
| | | case BOOLEAN: |
| | | return cellData.getBooleanValue().toString().getBytes().length; |
| | | case NUMBER: |
| | | return cellData.getNumberValue().toString().getBytes().length; |
| | | default: |
| | | return -1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationDetailVO; |
| | | import com.panzhihua.common.model.vos.community.VillageVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageInputUserDTO; |
| | | import com.panzhihua.common.model.vos.area.AreaAddressVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationTotalVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.screen.event.*; |
| | |
| | | Integer getSpecialStatisticsByLabel(@Param("label") String label,@Param("communityId") Long communityId); |
| | | |
| | | @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, " |
| | | + " ( SELECT count( user_id ) FROM sys_user WHERE community_id = egd.grid_community_id AND type = 6 ) AS gridMemberTotal, " |
| | | + " ( select count(egmr.id) from event_grid_member_relation as egmr" |
| | | + " left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = egd.grid_community_id ) AS gridMemberTotal, " |
| | | + " ( " + " SELECT " + " count( e.id ) " + " FROM " + " `event` AS e " |
| | | + " LEFT JOIN event_grid_data AS egd1 ON e.grid_id = egd1.id " + " WHERE " |
| | | + " egd1.grid_community_id = egd.grid_community_id " + " AND event_status = 2 " |
| | |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComMngPopulationVO> query(Page page,@Param("commonPage") CommonPage commonPage); |
| | | IPage<ComMngPopulationNoSecretVO> query(Page page, @Param("commonPage") CommonPage commonPage); |
| | | |
| | | /** |
| | | * 居民详情 |
| | |
| | | List<Long> getPopulationHouseIdByhHosueId(@Param("houseId") Long houseId); |
| | | |
| | | @Select("select cmp.id,cmp.name,cmp.card_no,cmp.phone from com_mng_population_house_user as cmphu " |
| | | + "left join com_mng_population as cmp on cmp.id = cmphu.popul_id where cmphu.house_id = #{houseId}") |
| | | + "inner join com_mng_population as cmp on cmp.id = cmphu.popul_id where cmphu.house_id = #{houseId}") |
| | | List<ComMngPopulationHouseUserAdminVO> getHouseUserByHouseId(@Param("houseId") Long houseId); |
| | | |
| | | @Select("update com_mng_population_house_user set relation = null where id = #{id}") |
| | |
| | | String attendPeople = actActivityDO.getAattendPeople(); |
| | | if (isVolunteer.intValue() == 0 && isNotBlank(attendPeople)) { |
| | | if (isBlank(currentUserTags)) { |
| | | return R.fail("您不是指定参与人群!"); |
| | | currentUserTags = "全部居民"; |
| | | } else { |
| | | currentUserTags = currentUserTags.concat(",全部居民"); |
| | | } |
| | | List<String> currentUserTagList = Arrays.asList(currentUserTags.split(",")); |
| | | boolean checkResult = currentUserTagList.stream().anyMatch(currentUserTag -> attendPeople.contains(currentUserTag)); |
| | |
| | | |
| | | @Override |
| | | public R selectByMember(CommonPage commonPage) { |
| | | IPage<ComMngPopulationVO> comMngPopulationDOIPage=this.comMngPopulationDAO.query(new Page<ComMngPopulationDO>(commonPage.getPage(),commonPage.getSize()),commonPage); |
| | | IPage<ComMngPopulationNoSecretVO> comMngPopulationDOIPage=this.comMngPopulationDAO.query(new Page<ComMngPopulationDO>(commonPage.getPage(),commonPage.getSize()),commonPage); |
| | | if (!comMngPopulationDOIPage.getRecords().isEmpty()) { |
| | | comMngPopulationDOIPage.getRecords().forEach(populDO -> { |
| | | if (StringUtils.isNotEmpty(populDO.getBirthday())) { |
| | |
| | | IPage<ComActMicroWishVO> iPage = comActMicroWishDAO.pageMicroWishAdmin(new Page(comActMicroWishVO.getPageNum() |
| | | ,comActMicroWishVO.getPageSize()), comActMicroWishVO); |
| | | |
| | | List<ComActMicroWishVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | records.forEach(comActMicroWishVO1 -> { |
| | | if(userId != null){ |
| | | Long id = comActMicroWishVO1.getId(); |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id) |
| | | .eq(ComActMicroWishUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActMicroWishUserDO)) { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | iPage.getRecords().forEach(comActMicroWishVO1 -> { |
| | | if(userId != null){ |
| | | Long id = comActMicroWishVO1.getId(); |
| | | ComActMicroWishUserDO comActMicroWishUserDO = comActMicroWishUserDAO.selectOne(new QueryWrapper<ComActMicroWishUserDO>().lambda().eq(ComActMicroWishUserDO::getMicroWishId, id) |
| | | .eq(ComActMicroWishUserDO::getUserId, userId)); |
| | | if (ObjectUtils.isEmpty(comActMicroWishUserDO)) { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(0); |
| | | } else { |
| | | comActMicroWishVO1.setHaveGiveThumbsUp(1); |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | //查询处理人 |
| | | comActMicroWishVO1.setResponsibleName(this.getWishHandleName(comActMicroWishVO1.getHandleId())); |
| | | }); |
| | | iPage.setRecords(records); |
| | | } |
| | | } |
| | | comActMicroWishVO1.setSponsorPhone(SensitiveUtil.desensitizedPhoneNumber(comActMicroWishVO1.getSponsorPhone())); |
| | | //查询处理人 |
| | | comActMicroWishVO1.setResponsibleName(this.getWishHandleName(comActMicroWishVO1.getHandleId())); |
| | | }); |
| | | return R.ok(iPage); |
| | | } |
| | | } |
| | |
| | | } |
| | | circleTopicDO = new ComActNeighborCircleTopicDO(); |
| | | BeanUtils.copyProperties(addCircleTopicAdminDTO, circleTopicDO); |
| | | circleTopicDO.setStatus(1); |
| | | circleTopicDO.setCreateAt(new Date()); |
| | | circleTopicDO.setCreateBy(addCircleTopicAdminDTO.getUserId()); |
| | | |
| | |
| | | clusterMember.setNationCode(nationCode); |
| | | clusterMember.setImageUrl(Constants.CLUSTER_MEMBER_DEFAULT_IMAGE_URL); |
| | | clusterMember.setCreateAt(nowDate); |
| | | clusterMember.setCommunityId(communityId); |
| | | saveList.add(clusterMember); |
| | | memberMap.put(clusterMember.getIdCard(),clusterMember); |
| | | } |
| | |
| | | //养老认证本期期数 |
| | | String pensionAuthPeriod = DateUtils.getCurrentDateString_YYYY(); |
| | | |
| | | //养老认证本期期数 |
| | | //查询所有老人信息并加入到老人认证历史记录表中,如果不存在则新增,存在则不做操作 |
| | | List<ComElderAuthElderliesDO> authElderliesList = comElderAuthElderliesDAO.selectList(new QueryWrapper<>()); |
| | | List<ComElderAuthElderliesDO> authElderliesList = comElderAuthElderliesDAO.selectList(null); |
| | | authElderliesList.forEach(authElderlies -> { |
| | | //查询高龄认证记录 |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | |
| | | authHistoryRecordDO.setCreateAt(nowDate); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | }); |
| | | |
| | | //查询所有养老人员信息并加入到老人认证历史记录表中,如果不存在则新增,存在则不做操作 |
| | | List<ComPensionAuthPensionerDO> pensionAuthPensionerList = comPensionAuthPensionerDAO.selectList(null); |
| | | pensionAuthPensionerList.forEach(authPension -> { |
| | | //查询养老认证记录 |
| | | ComPensionAuthHistoryRecordDO pensionAuthDO = comPensionAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComPensionAuthHistoryRecordDO>().lambda() |
| | | .eq(ComPensionAuthHistoryRecordDO::getElderliesId,authElderlies.getId()) |
| | | .eq(ComPensionAuthHistoryRecordDO::getElderliesId,authPension.getId()) |
| | | .eq(ComPensionAuthHistoryRecordDO::getAuthPeriod,pensionAuthPeriod)); |
| | | if(pensionAuthDO == null){ |
| | | pensionAuthDO = new ComPensionAuthHistoryRecordDO(); |
| | | BeanUtils.copyProperties(authElderlies,pensionAuthDO); |
| | | BeanUtils.copyProperties(authPension,pensionAuthDO); |
| | | pensionAuthDO.setIsAuth(ComPensionAuthHistoryRecordDO.isAuth.no); |
| | | pensionAuthDO.setElderliesId(authElderlies.getId()); |
| | | pensionAuthDO.setElderliesId(authPension.getId()); |
| | | pensionAuthDO.setAuthPeriod(pensionAuthPeriod); |
| | | pensionAuthDO.setCreateAt(nowDate); |
| | | comPensionAuthHistoryRecordMapper.insert(pensionAuthDO); |
| | | } |
| | | }); |
| | | |
| | | List<ComElderAuthRecordsDO> authRecordsList = comElderAuthRecordsDAO.selectList(new QueryWrapper<ComElderAuthRecordsDO>().lambda() |
| | | .ge(ComElderAuthRecordsDO::getCreateAt,DateUtils.getFirstDayOfMonth())); |
| | | //遍历认证记录列表 |
| | | //查询高龄认证记录列表 |
| | | List<ComElderAuthRecordsDO> authRecordsList = comElderAuthRecordsDAO.selectList(null); |
| | | //遍历高龄认证记录列表 |
| | | authRecordsList.forEach(authRecords -> { |
| | | if(authRecords.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | |
| | | authHistoryRecordDO.setAuthMethod(authRecords.getAuthMethod()); |
| | | authHistoryRecordDO.setVerificationResult(authRecords.getVerificationResult()); |
| | | authHistoryRecordDO.setAuthId(authRecords.getId()); |
| | | |
| | | //查询老人信息 |
| | | ComElderAuthElderliesDO authElderliesDO = comElderAuthElderliesDAO.selectById(authRecords.getElderliesId()); |
| | | if(authElderliesDO != null){ |
| | | BeanUtils.copyProperties(authElderliesDO,authHistoryRecordDO); |
| | | } |
| | | comEldersAuthHistoryRecordMapper.updateById(authHistoryRecordDO); |
| | | } |
| | | }else{ |
| | |
| | | }); |
| | | |
| | | //查询养老认证记录列表 |
| | | List<ComPensionAuthRecordDO> pensionAuthList = comPensionAuthRecordDAO.selectList(new QueryWrapper<ComPensionAuthRecordDO>().lambda() |
| | | .ge(ComPensionAuthRecordDO::getCreateAt,DateUtils.getFirstDayOfMonth())); |
| | | List<ComPensionAuthRecordDO> pensionAuthList = comPensionAuthRecordDAO.selectList(null); |
| | | //遍历养老认证记录列表 |
| | | pensionAuthList.forEach(authRecords -> { |
| | | ComPensionAuthHistoryRecordDO pensionAuthDO = comPensionAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComPensionAuthHistoryRecordDO>().lambda() |
| | |
| | | pensionAuthDO.setAuthMethod(authRecords.getAuthMethod()); |
| | | pensionAuthDO.setVerificationResult(authRecords.getVerificationResult()); |
| | | pensionAuthDO.setAuthId(authRecords.getId()); |
| | | //查询老人信息 |
| | | ComPensionAuthPensionerDO authPensionerDO = comPensionAuthPensionerDAO.selectById(authRecords.getPensionerId()); |
| | | if(authPensionerDO != null){ |
| | | BeanUtils.copyProperties(authPensionerDO,pensionAuthDO); |
| | | } |
| | | comPensionAuthHistoryRecordMapper.updateById(pensionAuthDO); |
| | | } |
| | | }else{ |
| | |
| | | and t.community_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.position !=null and commonPage.position !=''"> |
| | | and t.position like concat(#{commonPage.position},'%') |
| | | and t.position like concat('%',#{commonPage.position},'%') |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword !=''"> |
| | | and (t1.name like concat(#{commonPage.keyword},'%') or t1.phone like concat(#{commonPage.keyword},'%') or t.jurisdiction_content like concat('%',#{commonPage.keyword},'%')) |
| | |
| | | AND w.`status` = #{comActMicroWishVO.status} |
| | | </if> |
| | | </where> |
| | | group by w.id |
| | | |
| | | ORDER BY w.create_at desc |
| | | </select> |
| | | |
| | |
| | | ccom.phone, |
| | | case ccom.`status` |
| | | when '1' then '启用' |
| | | when '2' then '禁用' |
| | | when '2' then '停用' |
| | | end `status` |
| | | FROM |
| | | com_cluster_organization_member AS ccom |
| | |
| | | <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | | SELECT |
| | | cear.id, |
| | | cear.auth_period, |
| | | cear.auth_date, |
| | | cear.auth_status, |
| | | cear.reject_reason, |
| | |
| | | </resultMap> |
| | | |
| | | <select id="find" resultType="String"> |
| | | select distinct concat(alley,house_num,'号',IFNULL(floor,0),'栋') from com_mng_population_house where id in (${id}) |
| | | select distinct concat(alley,house_num,'号',IFNULL(unit_no,0),'栋') from com_mng_population_house where id in (${id}) |
| | | </select> |
| | | |
| | | <select id="findByVillage" resultType="String"> |
| | |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="query" resultType="com.panzhihua.common.model.vos.community.ComMngPopulationVO"> |
| | | <select id="query" resultType="com.panzhihua.common.model.vos.community.ComMngPopulationNoSecretVO"> |
| | | select * from com_mng_population |
| | | <where> |
| | | 1=1 |
| | |
| | | |
| | | if (commonEventEditDTO.getId() == null) { |
| | | // 检查特殊人群上报时参数 |
| | | if (commonEventEditDTO.getEventType().equals(6)) { |
| | | if (commonEventEditDTO.getPopulationIds().isEmpty()) { |
| | | return R.fail("上报人员为空"); |
| | | } |
| | | } |
| | | // if (commonEventEditDTO.getEventType().equals(6)) { |
| | | // if (commonEventEditDTO.getPopulationIds().isEmpty()) { |
| | | // return R.fail("上报人员为空"); |
| | | // } |
| | | // } |
| | | |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(commonEventEditDTO, eventDO); |
| | |
| | | if (eventMapper.insert(eventDO) > 0) { |
| | | |
| | | // 如果是特殊人群,则新增特殊人群与事件关系 |
| | | if (commonEventEditDTO.getEventType().equals(6)) { |
| | | if (commonEventEditDTO.getEventType().equals(6) && commonEventEditDTO.getPopulationIds() != null |
| | | && commonEventEditDTO.getPopulationIds().size() > 0) { |
| | | List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); |
| | | commonEventEditDTO.getPopulationIds().forEach(populationId -> { |
| | | EventSpecialCrowdRecordDO specialCrowdRecordDO = new EventSpecialCrowdRecordDO(); |
| | |
| | | if (eventDO == null) { |
| | | throw new ServiceException("id为" + id + "的事件不存在"); |
| | | } |
| | | if (eventDO.getEventStatus() != null |
| | | && (eventDO.getEventStatus().intValue() == 1 || eventDO.getEventStatus().intValue() == 4)) {// 草稿 |
| | | // 或者 |
| | | // 已撤销 |
| | | // 的事件可以删除 |
| | | if (eventDO.getEventStatus() != null) { |
| | | eventDO.setEventStatus(3);// 逻辑删除 |
| | | eventDO.setUpdateBy(userId); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_property.dao.ComPropertyAlarmDao; |
| | | import com.panzhihua.service_property.dto.DeviceDto; |
| | | import com.panzhihua.service_property.entity.ComPropertyAlarm; |
| | |
| | | void dealData(String message) { |
| | | comPropertyAlarmDao = SpringUtil.getBean(ComPropertyAlarmDao.class); |
| | | DeviceDto deviceInfo = JSONObject.parseObject(message, DeviceDto.class); |
| | | if (deviceInfo.getCallstatus().equals("RINGING")) { |
| | | boolean checkFlag = |
| | | "RINGING".equals(deviceInfo.getCallstatus()) && StringUtils.isNotEmpty(deviceInfo.getOri_number()); |
| | | if (checkFlag) { |
| | | logger.info("收到设备报警信息:{}", message); |
| | | ComPropertyAlarm comPropertyAlarm = new ComPropertyAlarm(); |
| | | comPropertyAlarm.setSerialNo(deviceInfo.getUserid()); |
| | | comPropertyAlarm.setSerialNo(deviceInfo.getOri_number()); |
| | | comPropertyAlarm.setReceiveNo(deviceInfo.getUserid()); |
| | | comPropertyAlarm.setStatus(0); |
| | | comPropertyAlarm.setCreateTime(new Date()); |
| | | comPropertyAlarm.setType(1); |
| | |
| | | /** 状态 */ |
| | | private String status; |
| | | /** 呼叫人员ID */ |
| | | private String ori_number; |
| | | /** 呼叫人员ID */ |
| | | private String userid; |
| | | /** 呼叫iD */ |
| | | private String callid; |
| | |
| | | */ |
| | | @ApiModelProperty("处理图片") |
| | | private String solveUrl; |
| | | |
| | | /** |
| | | *接收人 |
| | | */ |
| | | private String receiveNo; |
| | | /** |
| | | * 报警类型 1一键报警 2长时间无应答报警 |
| | | */ |
| | |
| | | comPropertyAlarm.setCreateTime(DateUtil.date()); |
| | | comPropertyAlarm.setPhone(comPropertyEquipment.getPhone()); |
| | | comPropertyAlarm.setSerialNo(comPropertyEquipment.getSerialNo()); |
| | | comPropertyAlarm.setType(ComPropertyAlarm.type.one); |
| | | comPropertyAlarm.setType(ComPropertyAlarm.type.time); |
| | | comPropertyAlarm.setCommunityId(comPropertyEquipment.getCommunityId()); |
| | | comPropertyAlarm.setName(comPropertyEquipment.getUsername()); |
| | | comPropertyAlarm.setStatus(ComPropertyAlarm.status.dcl); |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectList" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO"> |
| | | select t.*,t3.address as position,t1.longitude,t1.latitude,t2.name as solveName from com_property_alarm t |
| | | select t.id,t.serial_no,t.type,t.create_time,t.phone,t1.username as name,t.status,t.solve_id,t.solve_time,t.solve_content,t.community_id,t.solve_url,t3.address as position,t1.longitude,t1.latitude,t2.name as solveName,t4.username as receiveName from com_property_alarm t |
| | | left join com_property_equipment t1 on t.serial_no = t1.serial_no |
| | | left join com_mng_population_house t3 on t1.village_id=t3.id |
| | | left join sys_user t2 on t.solve_id = user_id |
| | | left join com_property_equipment t4 on t.receive_no = t4.serial_no |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.paramId !=null"> |
| | |
| | | and t3.address like concat(#{commonPage.address},'%') |
| | | </if> |
| | | <if test="commonPage.username !=null and commonPage.username !=''"> |
| | | and t.name like concat(#{commonPage.username},'%') |
| | | and t1.username like concat(#{commonPage.username},'%') |
| | | </if> |
| | | <if test="commonPage.beginTime !=null"> |
| | | and t.create_time >=#{commonPage.beginTime} |