Merge branch 'test' into 'test_bak'
Test
See merge request root/zhihuishequ!226
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"名字不可为空,请填写姓名")); |
| | | continue; |
| | | }else{ |
| | | //判断导入的名字的长度是否超过10 |
| | | if(oneData.get(0).length() > 10){ |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"名字长度不可超过10,请重新填写姓名")); |
| | | continue; |
| | | } |
| | | } |
| | | vo.setName(oneData.get(0)); |
| | | if (StringUtils.isEmpty(oneData.get(1))) { |
| | |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"联系电话不可为空,请填写联系电话")); |
| | | continue; |
| | | }else{ |
| | | //验证手机号正则 |
| | | String regex = "^[1][3,4,5,6,7,8,9][0-9]{9}$"; |
| | | Pattern pattern = Pattern.compile(regex); |
| | | Matcher m = pattern.matcher(oneData.get(3)); |
| | | if(!m.matches()){ |
| | | index++; |
| | | mistakes.add(setErrorObject(oneData,"联系电话输入错误,请核对联系电话")); |
| | | continue; |
| | | } |
| | | } |
| | | vo.setPhone(oneData.get(3)); |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | vo.setNowAddress(oneData.get(3)); |
| | | vo.setAddress(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | |
| | | } |
| | | if (StringUtils.isNotEmpty(oneData.get(3))) { |
| | | vo.setNowAddress(oneData.get(3)); |
| | | vo.setAddress(oneData.get(3)); |
| | | } |
| | | if (StringUtils.isEmpty(oneData.get(4))) { |
| | | index++; |
| | |
| | | @ApiModelProperty(value = "认证结束时间") |
| | | private String authDateEnd; |
| | | |
| | | @ApiModelProperty(value = "认证状态(1.已认证 0.未认证)") |
| | | private String authStatus; |
| | | @ApiModelProperty(value = "认证状态(1.已认证 2.未认证)") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)") |
| | | private Integer approvalStatus; |
| | |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 10) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证方式", index = 11) |
| | |
| | | |
| | | @ApiModelProperty("联系方式") |
| | | @NotBlank(groups = {AddGroup.class}, message = "联系方式不可为空") |
| | | @EncryptDecryptField |
| | | private String phone; |
| | | |
| | | @ApiModelProperty("备注") |
| | |
| | | private String authPeriod; |
| | | |
| | | @ExcelProperty(value = "认证时间", index = 6) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date authDate; |
| | | |
| | | @ExcelProperty(value = "认证方式", index = 7) |
| | |
| | | R timedTaskEldersAuthJobHandler(); |
| | | |
| | | /** |
| | | * 定时任务扫描上月高龄认证使用视频认证的用户添加成功记录 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/elders/auth/record/task") |
| | | R timedTaskEldersAuthRecordJobHandler(); |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/elders/authRecords/statistics") |
| | |
| | | */ |
| | | @PostMapping("/statistics/admin/gridMemberStatisticsAll") |
| | | R gridMemberStatisticsAll(@RequestBody MemberStatisticsAdminDTO statisticsAdminDTO); |
| | | |
| | | /** |
| | | * 定时任务-给上月已走访的人员创建定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/eventvisitingtasks/timedTaskVisitingJobHandler") |
| | | R timedTaskVisitingJobHandler(); |
| | | } |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | // Date date= new Date(); |
| | | // Date after = new Date(); |
| | | // System.out.println(getFirstDayOfMonthString()); |
| | | // System.out.println(getDayOfMonthString()); |
| | | Date date= getLastMonthFirst(); |
| | | Date after = getLastMonthEnd(); |
| | | System.out.println(date); |
| | | System.out.println(after); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | Date currYearFirst = calendar.getTime(); |
| | | return currYearFirst; |
| | | } |
| | | |
| | | /** |
| | | * 获取上月第一天时间 |
| | | * @return 上月第一天时间 |
| | | */ |
| | | public static Date getLastMonthFirst(){ |
| | | // 上月起始 |
| | | Calendar lastMonthFirstDateCal = Calendar.getInstance(); |
| | | lastMonthFirstDateCal.add(Calendar.MONTH,-1); |
| | | lastMonthFirstDateCal.set(Calendar.DAY_OF_MONTH, 1); |
| | | String lastMonthFirstTime = yyyyMMdd_format.format(lastMonthFirstDateCal.getTime()) + " 00:00:00"; |
| | | return stringToDateStandard(lastMonthFirstTime); |
| | | } |
| | | |
| | | /** |
| | | * 获取上月最后一天时间 |
| | | * @return 最后一天时间 |
| | | */ |
| | | public static Date getLastMonthEnd(){ |
| | | // 上月末尾 |
| | | Calendar lastMonthEndDateCal = Calendar.getInstance(); |
| | | lastMonthEndDateCal.add(Calendar.MONTH,-1); |
| | | lastMonthEndDateCal.set(Calendar.DAY_OF_MONTH, lastMonthEndDateCal.getActualMaximum(Calendar.DAY_OF_MONTH)); |
| | | String lastMonthEndTime = yyyyMMdd_format.format(lastMonthEndDateCal.getTime()) + " 23:59:59"; |
| | | return stringToDateStandard(lastMonthEndTime); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/auth/record/task") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/authRecords/statistics") |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * title: ComElderAuthElderliesDAO 社区政务》高龄老人认证》高龄老人表mapper类 |
| | | * projectName 成都呐喊信息技术有限公司-智慧社区项目 |
| | |
| | | * @param isAlive 健在状态(1.健在 0.未健在) |
| | | */ |
| | | void editEditIsAlive(@Param("populationId") Long populationId,@Param("isAlive") Integer isAlive); |
| | | |
| | | /** |
| | | * 高龄认证定时任务查询高龄老人信息 |
| | | * @return 高龄老人信息列表 |
| | | */ |
| | | List<ComElderAuthElderliesDO> getAuthElderLiesList(); |
| | | } |
| | |
| | | * @param isAlive 健在状态(1.健在 0.未健在) |
| | | */ |
| | | void editPensionIsAlive(@Param("populationId") Long populationId,@Param("isAlive") Integer isAlive); |
| | | |
| | | /** |
| | | * 养老认证定时任务查询养老人员列表 |
| | | * @return 养老人员列表 |
| | | */ |
| | | List<ComPensionAuthPensionerDO> getAuthPensionList(); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthRecordDO; |
| | | |
| | | /** |
| | |
| | | R exportElderAuthRecordsStatistic(PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 定时任务每月1号0点统计高龄老人本期应该认证总人数 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskElderAuthStatisticsJobHandler(); |
| | |
| | | R timedTaskEldersAuthJobHandler(); |
| | | |
| | | /** |
| | | * 检测上月所有视频认证记录,取最后一条记录为认证成功记录 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskEldersRecordAuthJobHandler(); |
| | |
| | | @Override |
| | | public R insert(ComActFourMemberVO comActFourMemberVO) { |
| | | if(comActFourMemberVO!=null&&comActFourMemberVO.getJurisdiction()!=null){ |
| | | if(comActFourMemberDao.selectCount(new QueryWrapper<ComActFourMember>().lambda().eq(ComActFourMember::getIdCard,comActFourMemberVO.getIdCard()))>0){ |
| | | return R.fail("身份证号重复"); |
| | | } |
| | | ComActFourMember comActFourMember=new ComActFourMember(); |
| | | List<String> jurisdictionList=new ArrayList<>(); |
| | | List<String> jurisdictionList1=comMngBuildingDAO.find(comActFourMemberVO.getJurisdiction()); |
| | |
| | | if(!isOnly(memberExcel.getIdCard(),memberMap)){ |
| | | ComClusterMemberExcelErrorVO memberExcelErrorVO = new ComClusterMemberExcelErrorVO(); |
| | | BeanUtils.copyProperties(memberExcel,memberExcelErrorVO); |
| | | memberExcelErrorVO.setError("该成员已存在"); |
| | | //判断该成员是否是已存在还是身份证号码重复 |
| | | ComClusterOrganizationMemberDO memberDO = (ComClusterOrganizationMemberDO)memberMap.get(memberExcel.getIdCard()); |
| | | if(memberDO.getName().equals(memberExcel.getName())){ |
| | | memberExcelErrorVO.setError("该成员已存在"); |
| | | }else{ |
| | | memberExcelErrorVO.setError("身份证号重复"); |
| | | } |
| | | mistakes.add(memberExcelErrorVO); |
| | | continue; |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | 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.dao.ComEldersAuthStatisticsMapper; |
| | | import com.panzhihua.service_community.dao.ComMngPopulationDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO; |
| | | import com.panzhihua.service_community.model.dos.ComElderAuthRecordsDO; |
| | | import com.panzhihua.service_community.model.dos.ComEldersAuthStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.service.ComElderAuthRecordsService; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | |
| | | private ComActActSignDAO comActActSignDAO; |
| | | @Value("${domain.aesKey:}") |
| | | private String aesKey; |
| | | @Resource |
| | | private ComEldersAuthHistoryRecordMapper comEldersAuthHistoryRecordMapper; |
| | | @Resource |
| | | private ComPensionAuthHistoryRecordMapper comPensionAuthHistoryRecordMapper; |
| | | @Resource |
| | | private ComPensionAuthRecordDAO comPensionAuthRecordDAO; |
| | | @Resource |
| | | private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO; |
| | | |
| | | @Override |
| | | public R pageElderAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | |
| | | return R.ok(comElderAuthRecordStatisticExcleVOS); |
| | | } |
| | | |
| | | /** |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R timedTaskElderAuthStatisticsJobHandler() { |
| | | Date nowDate = new Date(); |
| | | int month = DateUtils.getMonth(nowDate) + 1; |
| | | int year = DateUtils.getYear(nowDate); |
| | | //查询所有启用中社区 |
| | | List<ComActDO> actList = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState,0)); |
| | | actList.forEach(act -> { |
| | | //高龄认证统计本期应认证人数 |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = new ComEldersAuthStatisticsDO(); |
| | | comEldersAuthStatisticsDO.setCommunityId(act.getCommunityId()); |
| | | comEldersAuthStatisticsDO.setMonth(month); |
| | | comEldersAuthStatisticsDO.setYear(year); |
| | | comEldersAuthStatisticsDO.setCreateAt(nowDate); |
| | | List<ComElderAuthElderliesDO> comElderAuthElderliesDOS = comElderAuthElderliesDAO.selectList(new QueryWrapper<ComElderAuthElderliesDO>().lambda() |
| | | .eq(ComElderAuthElderliesDO::getCommunityId, act.getCommunityId()) |
| | | .eq(ComElderAuthElderliesDO::getIsAlive, 1) |
| | | .eq(ComElderAuthElderliesDO::getIsRegister, 1)); |
| | | if (null != comElderAuthElderliesDOS) { |
| | | comEldersAuthStatisticsDO.setSum(comElderAuthElderliesDOS.size()); |
| | | //查询高龄认证记录列表 |
| | | List<ComElderAuthRecordsDO> authRecordsList = comElderAuthRecordsDAO.selectList(new QueryWrapper<ComElderAuthRecordsDO>().lambda() |
| | | .eq(ComElderAuthRecordsDO::getAuthStatus,ComElderAuthRecordsDO.authStatus.yrz)); |
| | | //遍历高龄认证记录列表 |
| | | authRecordsList.forEach(authRecords -> { |
| | | if(authRecords.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | | .eq(ComEldersAuthHistoryRecordDO::getElderliesId,authRecords.getElderliesId()) |
| | | .eq(ComEldersAuthHistoryRecordDO::getAuthPeriod,authRecords.getAuthPeriod())); |
| | | if(authHistoryRecordDO != null){//存在记录 |
| | | if(authHistoryRecordDO.getIsAuth().equals(ComEldersAuthHistoryRecordDO.isAuth.no)){ |
| | | //查询老人信息 |
| | | ComElderAuthElderliesDO authElderliesDO = comElderAuthElderliesDAO.selectById(authRecords.getElderliesId()); |
| | | if(authElderliesDO != null){ |
| | | Long authId = authHistoryRecordDO.getId(); |
| | | BeanUtils.copyProperties(authElderliesDO,authHistoryRecordDO); |
| | | authHistoryRecordDO.setId(authId); |
| | | authHistoryRecordDO.setBrithday(DateUtils.format(IdcardUtil.getBirthDate(authElderliesDO.getIdCard()),DateUtils.yyyyMMdd_format)); |
| | | authHistoryRecordDO.setAge(IdcardUtil.getAgeByIdCard(authElderliesDO.getIdCard())); |
| | | } |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.yes); |
| | | authHistoryRecordDO.setAuthDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setApprovalDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setApproverId(authRecords.getApproverId()); |
| | | authHistoryRecordDO.setSubmitUserId(authRecords.getSubmitUserId()); |
| | | authHistoryRecordDO.setAuthMethod(authRecords.getAuthMethod()); |
| | | authHistoryRecordDO.setVerificationResult(authRecords.getVerificationResult()); |
| | | authHistoryRecordDO.setAuthId(authRecords.getId()); |
| | | |
| | | comEldersAuthHistoryRecordMapper.updateById(authHistoryRecordDO); |
| | | } |
| | | }else{ |
| | | authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | //查询老人信息 |
| | | ComElderAuthElderliesDO authElderliesDO = comElderAuthElderliesDAO.selectById(authRecords.getElderliesId()); |
| | | if(authElderliesDO != null){ |
| | | BeanUtils.copyProperties(authElderliesDO,authHistoryRecordDO); |
| | | authHistoryRecordDO.setBrithday(DateUtils.format(IdcardUtil.getBirthDate(authElderliesDO.getIdCard()),DateUtils.yyyyMMdd_format)); |
| | | authHistoryRecordDO.setAge(IdcardUtil.getAgeByIdCard(authElderliesDO.getIdCard())); |
| | | } |
| | | BeanUtils.copyProperties(authRecords,authHistoryRecordDO); |
| | | authHistoryRecordDO.setAuthDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setMark(null); |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.yes); |
| | | authHistoryRecordDO.setAuthId(authRecords.getId()); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | } |
| | | comEldersAuthStatisticsMapper.insert(comEldersAuthStatisticsDO); |
| | | //上期已认证人数 |
| | | String authPeriod = ""; |
| | | if (month < 10) { |
| | | authPeriod = String.valueOf(year) + 0 + month; |
| | | } else { |
| | | authPeriod = String.valueOf(year) + month; |
| | | }); |
| | | |
| | | //查询养老认证记录列表 |
| | | List<ComPensionAuthRecordDO> pensionAuthList = comPensionAuthRecordDAO.selectList(new QueryWrapper<ComPensionAuthRecordDO>().lambda() |
| | | .eq(ComPensionAuthRecordDO::getAuthStatus,ComPensionAuthRecordDO.authStatus.rez)); |
| | | //遍历养老认证记录列表 |
| | | pensionAuthList.forEach(authRecords -> { |
| | | ComPensionAuthHistoryRecordDO pensionAuthDO = comPensionAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComPensionAuthHistoryRecordDO>().lambda() |
| | | .eq(ComPensionAuthHistoryRecordDO::getElderliesId,authRecords.getPensionerId()) |
| | | .eq(ComPensionAuthHistoryRecordDO::getAuthPeriod,authRecords.getAuthPeriod())); |
| | | if(pensionAuthDO != null){//存在记录 |
| | | if(pensionAuthDO.getIsAuth().equals(ComPensionAuthHistoryRecordDO.isAuth.no)){ |
| | | //查询老人信息 |
| | | ComPensionAuthPensionerDO authPensionerDO = comPensionAuthPensionerDAO.selectById(authRecords.getPensionerId()); |
| | | if(authPensionerDO != null){ |
| | | Long authId = pensionAuthDO.getId(); |
| | | BeanUtils.copyProperties(authPensionerDO,pensionAuthDO); |
| | | pensionAuthDO.setId(authId); |
| | | pensionAuthDO.setBrithday(DateUtils.format(IdcardUtil.getBirthDate(authPensionerDO.getIdCard()),DateUtils.yyyyMMdd_format)); |
| | | pensionAuthDO.setAge(IdcardUtil.getAgeByIdCard(authPensionerDO.getIdCard())); |
| | | } |
| | | pensionAuthDO.setIsAuth(ComPensionAuthHistoryRecordDO.isAuth.yes); |
| | | pensionAuthDO.setAuthDate(authRecords.getApprovalDate()); |
| | | pensionAuthDO.setApprovalDate(authRecords.getApprovalDate()); |
| | | pensionAuthDO.setApproverId(authRecords.getApproverId()); |
| | | pensionAuthDO.setSubmitUserId(authRecords.getSubmitUserId()); |
| | | pensionAuthDO.setAuthMethod(authRecords.getAuthMethod()); |
| | | pensionAuthDO.setVerificationResult(authRecords.getVerificationResult()); |
| | | pensionAuthDO.setAuthId(authRecords.getId()); |
| | | comPensionAuthHistoryRecordMapper.updateById(pensionAuthDO); |
| | | } |
| | | }else{ |
| | | pensionAuthDO = new ComPensionAuthHistoryRecordDO(); |
| | | //查询老人信息 |
| | | ComPensionAuthPensionerDO authPensionerDO = comPensionAuthPensionerDAO.selectById(authRecords.getPensionerId()); |
| | | if(authPensionerDO != null){ |
| | | BeanUtils.copyProperties(authPensionerDO,pensionAuthDO); |
| | | pensionAuthDO.setBrithday(DateUtils.format(IdcardUtil.getBirthDate(authPensionerDO.getIdCard()),DateUtils.yyyyMMdd_format)); |
| | | pensionAuthDO.setAge(IdcardUtil.getAgeByIdCard(authPensionerDO.getIdCard())); |
| | | } |
| | | BeanUtils.copyProperties(authRecords,pensionAuthDO); |
| | | pensionAuthDO.setAuthDate(authRecords.getApprovalDate()); |
| | | pensionAuthDO.setMark(null); |
| | | pensionAuthDO.setIsAuth(ComPensionAuthHistoryRecordDO.isAuth.yes); |
| | | pensionAuthDO.setAuthId(authRecords.getId()); |
| | | comPensionAuthHistoryRecordMapper.insert(pensionAuthDO); |
| | | } |
| | | int authSum = comElderAuthElderliesDAO.haveElderAuthElderliesAmount(act.getCommunityId(), authPeriod); |
| | | ComEldersAuthStatisticsDO comEldersAuthStatisticsDO1 = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>() |
| | | .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, act.getCommunityId()).eq(ComEldersAuthStatisticsDO::getYear, year) |
| | | .eq(ComEldersAuthStatisticsDO::getMonth, month - 1)); |
| | | comEldersAuthStatisticsDO1.setAuthSum(authSum); |
| | | comEldersAuthStatisticsDO1.setNoAuthSum(comEldersAuthStatisticsDO1.getSum() - comEldersAuthStatisticsDO1.getAuthSum()); |
| | | comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO1); |
| | | }); |
| | | return R.ok(); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | 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.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.elders.ComPensionAuthStatisticVO; |
| | | import com.panzhihua.service_community.dao.ComPensionAuthHistoryRecordMapper; |
| | | import com.panzhihua.service_community.model.dos.ComPensionAuthHistoryRecordDO; |
| | | import com.panzhihua.service_community.service.ComPensionAuthHistoryRecordService; |
| | |
| | | */ |
| | | @Override |
| | | public R pagePensionAuthStatisticAdmin(PagePensionAuthStatisticDTO pensionAuthStatisticDTO){ |
| | | return R.ok(this.baseMapper.pageAuthStatisticAdmin(new Page(pensionAuthStatisticDTO.getPageNum(),pensionAuthStatisticDTO.getPageSize()),pensionAuthStatisticDTO)); |
| | | IPage<ComPensionAuthStatisticVO> authStatisticPage = this.baseMapper.pageAuthStatisticAdmin(new Page( |
| | | pensionAuthStatisticDTO.getPageNum(),pensionAuthStatisticDTO.getPageSize()),pensionAuthStatisticDTO); |
| | | authStatisticPage.getRecords().forEach(authStatistic -> { |
| | | authStatistic.setAge(IdcardUtil.getAgeByIdCard(authStatistic.getIdCard())); |
| | | authStatistic.setBirthday(IdcardUtil.getBirth(authStatistic.getIdCard())); |
| | | }); |
| | | return R.ok(authStatisticPage); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.panzhihua.common.model.dtos.community.PageIdentityAuthRecordDTO; |
| | | import com.panzhihua.common.model.helper.AESUtil; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordImportMistakeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordStatisticExcleVO; |
| | | import com.panzhihua.common.model.vos.community.ComPensionAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.SysConfVO; |
| | | import com.panzhihua.common.utlis.AgeUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthStatisticVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 检测本月所有认证记录,认证成功记录更新到历史记录中 |
| | | * 身份认证定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | |
| | | String pensionAuthPeriod = DateUtils.getCurrentDateString_YYYY(); |
| | | |
| | | //查询所有老人信息并加入到老人认证历史记录表中,如果不存在则新增,存在则不做操作 |
| | | List<ComElderAuthElderliesDO> authElderliesList = comElderAuthElderliesDAO.selectList(null); |
| | | List<ComElderAuthElderliesDO> authElderliesList = comElderAuthElderliesDAO.getAuthElderLiesList(); |
| | | authElderliesList.forEach(authElderlies -> { |
| | | //查询高龄认证记录 |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | |
| | | authHistoryRecordDO.setElderliesId(authElderlies.getId()); |
| | | authHistoryRecordDO.setAuthPeriod(elderAuthPeriod); |
| | | authHistoryRecordDO.setCreateAt(nowDate); |
| | | authHistoryRecordDO.setBrithday(IdcardUtil.getBirthByIdCard(authElderlies.getIdCard())); |
| | | authHistoryRecordDO.setAge(IdcardUtil.getAgeByIdCard(authElderlies.getIdCard())); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | }); |
| | | |
| | | //查询所有养老人员信息并加入到老人认证历史记录表中,如果不存在则新增,存在则不做操作 |
| | | List<ComPensionAuthPensionerDO> pensionAuthPensionerList = comPensionAuthPensionerDAO.selectList(null); |
| | | List<ComPensionAuthPensionerDO> pensionAuthPensionerList = comPensionAuthPensionerDAO.getAuthPensionList(); |
| | | pensionAuthPensionerList.forEach(authPension -> { |
| | | //查询养老认证记录 |
| | | ComPensionAuthHistoryRecordDO pensionAuthDO = comPensionAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComPensionAuthHistoryRecordDO>().lambda() |
| | |
| | | pensionAuthDO.setElderliesId(authPension.getId()); |
| | | pensionAuthDO.setAuthPeriod(pensionAuthPeriod); |
| | | pensionAuthDO.setCreateAt(nowDate); |
| | | comPensionAuthHistoryRecordMapper.insert(pensionAuthDO); |
| | | } |
| | | }); |
| | | |
| | | //查询高龄认证记录列表 |
| | | List<ComElderAuthRecordsDO> authRecordsList = comElderAuthRecordsDAO.selectList(null); |
| | | //遍历高龄认证记录列表 |
| | | authRecordsList.forEach(authRecords -> { |
| | | if(authRecords.getApprovalStatus().equals(ComElderAuthRecordsDO.approvalStatus.tg)){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComEldersAuthHistoryRecordDO>().lambda() |
| | | .eq(ComEldersAuthHistoryRecordDO::getElderliesId,authRecords.getElderliesId()) |
| | | .eq(ComEldersAuthHistoryRecordDO::getAuthPeriod,authRecords.getAuthPeriod())); |
| | | if(authHistoryRecordDO != null){//存在记录 |
| | | if(authHistoryRecordDO.getIsAuth().equals(ComEldersAuthHistoryRecordDO.isAuth.no)){ |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.yes); |
| | | authHistoryRecordDO.setAuthDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setApprovalDate(authRecords.getApprovalDate()); |
| | | authHistoryRecordDO.setApproverId(authRecords.getApproverId()); |
| | | authHistoryRecordDO.setSubmitUserId(authRecords.getSubmitUserId()); |
| | | 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{ |
| | | authHistoryRecordDO = new ComEldersAuthHistoryRecordDO(); |
| | | BeanUtils.copyProperties(authRecords,authHistoryRecordDO); |
| | | //查询老人信息 |
| | | ComElderAuthElderliesDO authElderliesDO = comElderAuthElderliesDAO.selectById(authRecords.getElderliesId()); |
| | | if(authElderliesDO != null){ |
| | | BeanUtils.copyProperties(authElderliesDO,authHistoryRecordDO); |
| | | } |
| | | authHistoryRecordDO.setIsAuth(ComEldersAuthHistoryRecordDO.isAuth.yes); |
| | | authHistoryRecordDO.setAuthId(authRecords.getId()); |
| | | comEldersAuthHistoryRecordMapper.insert(authHistoryRecordDO); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //查询养老认证记录列表 |
| | | List<ComPensionAuthRecordDO> pensionAuthList = comPensionAuthRecordDAO.selectList(null); |
| | | //遍历养老认证记录列表 |
| | | pensionAuthList.forEach(authRecords -> { |
| | | ComPensionAuthHistoryRecordDO pensionAuthDO = comPensionAuthHistoryRecordMapper.selectOne(new QueryWrapper<ComPensionAuthHistoryRecordDO>().lambda() |
| | | .eq(ComPensionAuthHistoryRecordDO::getElderliesId,authRecords.getPensionerId()) |
| | | .eq(ComPensionAuthHistoryRecordDO::getAuthPeriod,authRecords.getAuthPeriod())); |
| | | if(pensionAuthDO != null){//存在记录 |
| | | if(pensionAuthDO.getIsAuth().equals(ComPensionAuthHistoryRecordDO.isAuth.no)){ |
| | | pensionAuthDO.setIsAuth(ComPensionAuthHistoryRecordDO.isAuth.yes); |
| | | pensionAuthDO.setAuthDate(authRecords.getApprovalDate()); |
| | | pensionAuthDO.setApprovalDate(authRecords.getApprovalDate()); |
| | | pensionAuthDO.setApproverId(authRecords.getApproverId()); |
| | | pensionAuthDO.setSubmitUserId(authRecords.getSubmitUserId()); |
| | | 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{ |
| | | pensionAuthDO = new ComPensionAuthHistoryRecordDO(); |
| | | BeanUtils.copyProperties(authRecords,pensionAuthDO); |
| | | //查询老人信息 |
| | | ComPensionAuthPensionerDO authPensionerDO = comPensionAuthPensionerDAO.selectById(authRecords.getPensionerId()); |
| | | if(authPensionerDO != null){ |
| | | BeanUtils.copyProperties(authPensionerDO,pensionAuthDO); |
| | | } |
| | | pensionAuthDO.setIsAuth(ComPensionAuthHistoryRecordDO.isAuth.yes); |
| | | pensionAuthDO.setAuthId(authRecords.getId()); |
| | | pensionAuthDO.setBrithday(IdcardUtil.getBirthByIdCard(authPension.getIdCard())); |
| | | pensionAuthDO.setAge(IdcardUtil.getAgeByIdCard(authPension.getIdCard())); |
| | | comPensionAuthHistoryRecordMapper.insert(pensionAuthDO); |
| | | } |
| | | }); |
| | |
| | | */ |
| | | @Override |
| | | public R pageAuthStatisticAdmin(PageElderAuthStatisticDTO pageElderAuthStatisticDTO){ |
| | | return R.ok(comEldersAuthHistoryRecordMapper.pageAuthStatisticAdmin(new Page(pageElderAuthStatisticDTO.getPageNum(),pageElderAuthStatisticDTO.getPageSize()),pageElderAuthStatisticDTO)); |
| | | IPage<ComEldersAuthStatisticVO> authStatisticPage = comEldersAuthHistoryRecordMapper.pageAuthStatisticAdmin( |
| | | new Page(pageElderAuthStatisticDTO.getPageNum(),pageElderAuthStatisticDTO.getPageSize()),pageElderAuthStatisticDTO); |
| | | authStatisticPage.getRecords().forEach(authStatistic -> { |
| | | authStatistic.setAge(IdcardUtil.getAgeByIdCard(authStatistic.getIdCard())); |
| | | authStatistic.setBirthday(IdcardUtil.getBirth(authStatistic.getIdCard())); |
| | | }); |
| | | return R.ok(authStatisticPage); |
| | | } |
| | | |
| | | /** |
| | |
| | | <update id="editEditIsAlive"> |
| | | update com_elder_auth_elderlies set is_alive = #{isAlive} where population_id = #{populationId} |
| | | </update> |
| | | |
| | | <select id="getAuthElderLiesList" resultType="com.panzhihua.service_community.model.dos.ComElderAuthElderliesDO"> |
| | | SELECT |
| | | ceae.id, |
| | | ceae.population_id, |
| | | ceae.street_id, |
| | | ceae.community_id, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.age, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | ceae.is_register, |
| | | ceae.is_alive, |
| | | ceae.address, |
| | | ceae.remark, |
| | | ceae.receive_allowance_begin, |
| | | ceae.create_at, |
| | | ceae.create_by, |
| | | ceae.update_at, |
| | | ceae.update_by |
| | | FROM |
| | | com_elder_auth_elderlies AS ceae |
| | | INNER JOIN com_mng_population AS cmp ON cmp.id = ceae.population_id |
| | | </select> |
| | | </mapper> |
| | |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | ceae.address, |
| | | cear.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | ceae.address, |
| | | cear.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | ceae.address, |
| | | cear.address, |
| | | CASE |
| | | ceae.is_alive |
| | | WHEN 1 THEN |
| | |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | ceae.address, |
| | | cear.address, |
| | | CASE |
| | | ceae.is_alive |
| | | WHEN 1 THEN |
| | |
| | | com_elders_auth_history_record ceahr |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON ceahr.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON ceahr.submit_user_id = su.user_id |
| | | LEFT JOIN com_elder_auth_records as cear on cear.id = ceahr.auth_id |
| | | WHERE |
| | | ceahr.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | |
| | | </select> |
| | | |
| | | <select id="getNextIds" resultType="String"> |
| | | select id from com_elder_auth_records where approval_status = 1 and community_id = #{communityId} and id != #{authRecordId} |
| | | select id from com_elder_auth_records where approval_status = 1 and community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | |
| | | ceahr.submit_user_id, |
| | | IFNULL(su.nick_name,su.`name`) as submitUserName, |
| | | IFNULL(su1.nick_name,su1.`name`) as approvalName, |
| | | ceae.address, |
| | | cear.address, |
| | | cear.auth_video, |
| | | cear.approval_status, |
| | | ceahr.approver_id, |
| | |
| | | cpahr.submit_user_id, |
| | | IFNULL(su.nick_name,su.`name`) as submitUserName, |
| | | IFNULL(su1.nick_name,su1.`name`) as approvalName, |
| | | cpap.address, |
| | | cpar.address, |
| | | cpar.auth_video, |
| | | cpar.approval_status, |
| | | cpahr.approver_id, |
| | |
| | | <update id="editPensionIsAlive"> |
| | | update com_pension_auth_pensioners set is_alive = #{isAlive} where population_id = #{populationId} |
| | | </update> |
| | | |
| | | <select id="getAuthPensionList" resultType="com.panzhihua.service_community.model.dos.ComPensionAuthPensionerDO"> |
| | | SELECT |
| | | cpap.id, |
| | | cpap.population_id, |
| | | cpap.street_id, |
| | | cpap.community_id, |
| | | cpap.phone, |
| | | cmp.`name`, |
| | | cpap.id_card, |
| | | cpap.sex, |
| | | cpap.age, |
| | | cpap.birthday, |
| | | cpap.personnel_category, |
| | | cpap.is_register, |
| | | cpap.is_alive, |
| | | cpap.address, |
| | | cpap.remark, |
| | | cpap.receive_allowance_begin, |
| | | cpap.create_at, |
| | | cpap.create_by, |
| | | cpap.update_at, |
| | | cpap.update_by |
| | | FROM |
| | | com_pension_auth_pensioners AS cpap |
| | | INNER JOIN com_mng_population AS cmp ON cmp.id = cpap.population_id |
| | | </select> |
| | | </mapper> |
| | |
| | | cpap.sex, |
| | | cpap.birthday, |
| | | cpap.personnel_category, |
| | | cpap.address, |
| | | cpar.address, |
| | | cpap.is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | |
| | | cpap.sex, |
| | | cpap.birthday, |
| | | cpap.personnel_category, |
| | | cpap.address, |
| | | cpar.address, |
| | | cpap.is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | cpap.address, |
| | | cpar.address, |
| | | CASE |
| | | cpap.is_alive |
| | | WHEN 1 THEN |
| | |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | cpap.address, |
| | | cpar.address, |
| | | CASE |
| | | cpap.isAlive |
| | | cpap.is_alive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | END isAlive, |
| | | cpahr.auth_period, |
| | | cpahr.auth_date, |
| | | CASE |
| | | cpar.auth_method |
| | | cpahr.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | WHEN 3 THEN |
| | | '线下认证' |
| | | END authMethod, |
| | | cpar.mark, |
| | | cpahr.mark, |
| | | CASE |
| | | cpar.auth_status |
| | | cpahr.is_auth |
| | | WHEN 1 THEN |
| | | '已认证' |
| | | WHEN 0 THEN |
| | | WHEN 2 THEN |
| | | '未认证' |
| | | END authStatus |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | com_pension_auth_history_record as cpahr |
| | | LEFT JOIN com_pension_auth_records cpar on cpar.id = cpahr.auth_id |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpahr.elderlies_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | WHERE |
| | | cpap.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | cpahr.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cpar.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | and cpahr.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cpar.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null"> |
| | | and cpahr.ia_auth = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and cpap.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (cpap.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cpar.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | or cpahr.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | </if> |
| | | order by cpar.create_at desc |
| | | order by cpahr.create_at desc |
| | | </select> |
| | | |
| | | <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |
| | |
| | | </select> |
| | | |
| | | <select id="getNextIds" resultType="String"> |
| | | select id from com_pension_auth_records where approval_status = 1 and community_id = #{communityId} and id != #{authRecordId} |
| | | select id from com_pension_auth_records where approval_status = 1 and community_id = #{communityId} |
| | | </select> |
| | | </mapper> |
| | |
| | | Boolean updateLcUploadFlagVisitingTask(@RequestParam("id") Long id) { |
| | | return eventVisitingTasksService.updateLcUploadFlagVisitingTask(id); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-给上月已走访的人员创建定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @PostMapping("/timedTaskVisitingJobHandler") |
| | | public R timedTaskVisitingJobHandler() { |
| | | return eventVisitingTasksService.timedTaskVisitingJobHandler(); |
| | | } |
| | | } |
| | |
| | | int no = 0; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 走访任务状态(1.待走访 2.已走访) |
| | | */ |
| | | public interface eventStatus{ |
| | | int dzf = 1; |
| | | int yzf = 2; |
| | | } |
| | | } |
| | |
| | | * @date 2021/6/10 17:00 |
| | | */ |
| | | Boolean updateLcUploadFlagVisitingTask(Long id); |
| | | |
| | | /** |
| | | * 定时任务-给上月已走访的人员创建定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | R timedTaskVisitingJobHandler(); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 定时任务-给上月已走访的人员创建定时任务 |
| | | * @return 执行结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R timedTaskVisitingJobHandler(){ |
| | | |
| | | //需要创建的走访任务列表 |
| | | List<EventVisitingTasksDO> saveList = new ArrayList<>(); |
| | | |
| | | //获取上月第一天时间 |
| | | Date lastMonthFirst = DateUtils.getLastMonthFirst(); |
| | | //获取上月最后一天时间 |
| | | Date lastMonthEnd = DateUtils.getLastMonthEnd(); |
| | | |
| | | //查询上月已走访任务 |
| | | List<EventVisitingTasksDO> visitingTasksList = this.baseMapper.selectList(new QueryWrapper<EventVisitingTasksDO>().lambda() |
| | | .eq(EventVisitingTasksDO::getEventStatus,EventVisitingTasksDO.eventStatus.yzf) |
| | | .ge(EventVisitingTasksDO::getSubmitDate,lastMonthFirst) |
| | | .le(EventVisitingTasksDO::getSubmitDate,lastMonthEnd)); |
| | | |
| | | visitingTasksList.forEach(visitingTask -> { |
| | | EventVisitingTasksDO visitingTasksDO = dataConversion(visitingTask); |
| | | saveList.add(visitingTasksDO); |
| | | }); |
| | | |
| | | if(saveList.size() > 0){ |
| | | this.saveBatch(saveList); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 数据转换 |
| | | * @param oldVisitingTasksDO 请求参数 |
| | | * @return 转换后的对象 |
| | | */ |
| | | private EventVisitingTasksDO dataConversion(EventVisitingTasksDO oldVisitingTasksDO){ |
| | | //创建走访任务新对象 |
| | | EventVisitingTasksDO visitingTasksDO = new EventVisitingTasksDO(); |
| | | visitingTasksDO.setGridId(oldVisitingTasksDO.getGridId()); |
| | | visitingTasksDO.setGridMemberCommunity(oldVisitingTasksDO.getGridMemberCommunity()); |
| | | visitingTasksDO.setGridMemberStreet(oldVisitingTasksDO.getGridMemberStreet()); |
| | | visitingTasksDO.setVisiterId(oldVisitingTasksDO.getVisiterId()); |
| | | visitingTasksDO.setVisiterName(oldVisitingTasksDO.getVisiterName()); |
| | | visitingTasksDO.setVisiterSex(oldVisitingTasksDO.getVisiterSex()); |
| | | visitingTasksDO.setVisiterTele(oldVisitingTasksDO.getVisiterTele()); |
| | | visitingTasksDO.setVisiterAddress(oldVisitingTasksDO.getVisiterAddress()); |
| | | visitingTasksDO.setVisiterType(0); |
| | | visitingTasksDO.setActOpara(0); |
| | | visitingTasksDO.setHappentLatLng(oldVisitingTasksDO.getHappentLatLng()); |
| | | visitingTasksDO.setEventStatus(EventTasksStatusEnum.DZF.getCode()); |
| | | visitingTasksDO.setReporting(0); |
| | | visitingTasksDO.setInvalid(false); |
| | | visitingTasksDO.setUrgent(false); |
| | | visitingTasksDO.setUrgentDell(false); |
| | | visitingTasksDO.setCreateBy(oldVisitingTasksDO.getCreateBy()); |
| | | visitingTasksDO.setOutOrLocal(oldVisitingTasksDO.getOutOrLocal()); |
| | | if(oldVisitingTasksDO.getTableContentJson() != null){ |
| | | visitingTasksDO.setTableContentJson(oldVisitingTasksDO.getTableContentJson()); |
| | | } |
| | | return visitingTasksDO; |
| | | } |
| | | |
| | | } |
| | |
| | | * @since 2021-09-09 09:46:50 |
| | | */ |
| | | public interface ComPropertyAlarmSettingService extends IService<ComPropertyAlarmSetting> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 根据社区id查询 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getByCommunityId(Long communityId); |
| | | |
| | | /** |
| | | * 新增方法 |
| | | * @param comPropertyAlarmSetting |
| | | * @return |
| | | */ |
| | | R insert(ComPropertyAlarmSetting comPropertyAlarmSetting); |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO"> |
| | | 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 |
| | | 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 t.id=#{id} |
| | | </select> |
| | | |
| | |
| | | |
| | | @XxlJob("timedTaskEldersAuthJobHandler") |
| | | public ReturnT<String> timedTaskEldersAuthJobHandler(String param) throws Exception { |
| | | log.info("定时任务扫描上月高龄认证使用视频认证的用户添加成功记录"); |
| | | log.info("定时任务扫描老人库的老人是否已加入到统计表中"); |
| | | R r = communityService.timedTaskEldersAuthRecordJobHandler(); |
| | | log.info("执行结果【{}】", r.toString()); |
| | | log.info("定时任务扫描老人认证成功记录加入到统计表中"); |
| | | R r1 = communityService.timedTaskElderAuthStatisticsJobHandler(); |
| | | log.info("执行结果【{}】", r1.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | |
| | | log.info("执行结果【{}】", r.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | @XxlJob("timedTaskVisitingJobHandler") |
| | | public ReturnT<String> timedTaskVisitingJobHandler(String param) throws Exception { |
| | | log.info("定时任务给上月已走访人员创建走访任务"); |
| | | R r = gridService.timedTaskVisitingJobHandler(); |
| | | log.info("执行结果【{}】", r.toString()); |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | } |