| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.acid.BatchCheckAcidRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.*; |
| | |
| | | public R insertRecord(ComActAcidRecordVO comActAcidRecordVO) { |
| | | Integer count= this.baseMapper.selectCount(new QueryWrapper<ComActAcidRecord>().lambda().eq(ComActAcidRecord::getIsDel,0).eq(ComActAcidRecord::getIdCard,comActAcidRecordVO.getIdCard()).ge(ComActAcidRecord::getCreateTime, DateUtils.getCurrentDate(DateUtils.yyyyMMdd_format))); |
| | | if(count>0){ |
| | | return R.fail("请勿重复提交"); |
| | | return R.fail("您的社区报备信息已填写完整,请勿重复提交!"); |
| | | } |
| | | if(StringUtils.isEmpty(comActAcidRecordVO.getLocalCity())){ |
| | | rabbitTemplate.convertAndSend("huacheng.acid.exchange", "huacheng.acid.key", comActAcidRecordVO, message -> { |
| | |
| | | //未填住址人员 |
| | | saveAcidDangerMember(comActAcidRecordVO, comActAcidRecord.getId(), 2, null); |
| | | } |
| | | return R.ok(); |
| | | return R.ok(comActAcidRecord.getId().toString()); |
| | | } |
| | | |
| | | return R.fail("操作失败,请重新尝试"); |
| | |
| | | } |
| | | @Override |
| | | public R fiveCountPlus(String date,String localCity,String loginAccount) { |
| | | Integer type = isVilliage(loginAccount); |
| | | log.info("type===="+type); |
| | | Integer type=3; |
| | | if (StringUtils.isNotEmpty(loginAccount)){ |
| | | type = isVilliage(loginAccount); |
| | | } |
| | | return R.ok(this.baseMapper.fiveCountPlus(date,localCity,type)); |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 批量核对防疫信息数据 |
| | | * @param batchCheckAcidRecordDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R batchCheck(BatchCheckAcidRecordDTO batchCheckAcidRecordDTO) { |
| | | this.baseMapper.batchCheck(batchCheckAcidRecordDTO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R checkCommit(Long userId) { |
| | | if(userId!=null){ |
| | | List<ComActAcidRecord> comActAcidRecords= this.baseMapper.selectList(new QueryWrapper<ComActAcidRecord>().lambda().eq(ComActAcidRecord::getIsDel,0).eq(ComActAcidRecord::getUserId,userId).ge(ComActAcidRecord::getCreateTime, DateUtils.getCurrentDate(DateUtils.yyyyMMdd_format)).isNull(ComActAcidRecord::getAcidTest)); |
| | | return R.ok(comActAcidRecords); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static void areaCheck(ComCun area,ComStreetDO comStreetDO){ |
| | | switch (area.getArea()){ |
| | | case "西区": comStreetDO.setAreaCode(510423); break; |