| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | |
| | | } |
| | | } |
| | | ComActAcidDangerMember dangerMember = comActAcidDangerMemberDao.selectOne(new LambdaQueryWrapper<ComActAcidDangerMember>() |
| | | .eq(ComActAcidDangerMember::getIdCard, comActAcidRecordVO.getIdCard()).eq(ComActAcidDangerMember::getRecordId, recordId)); |
| | | .eq(ComActAcidDangerMember::getIdCard, comActAcidRecordVO.getIdCard()).eq(ComActAcidDangerMember::getRecordId, recordId).orderByDesc(ComActAcidDangerMember::getCreateTime).last("limit 1")); |
| | | if (isNull(dangerMember)) { |
| | | dangerMember = new ComActAcidDangerMember(); |
| | | dangerMember.setName(comActAcidRecordVO.getName()); |
| | |
| | | for(String areaValue:area){ |
| | | ComActAcidChartsVO acid=new ComActAcidChartsVO(); |
| | | acid.setName(areaValue); |
| | | ComActAcidChartsVO acidCount =this.baseMapper.selectAcidCount(date,localCity); |
| | | ComActAcidChartsVO acidCount =this.baseMapper.selectAcidCount(date,areaValue); |
| | | if(acidCount!=null){ |
| | | acid.setNumOne(acidCount.getNumOne()); |
| | | } |
| | | acidList.add(acid); |
| | | ComActAcidChartsVO danger=new ComActAcidChartsVO(); |
| | | danger.setName(areaValue); |
| | | ComActAcidChartsVO dangerCount =this.baseMapper.selectDangerCount(date,localCity); |
| | | ComActAcidChartsVO dangerCount =this.baseMapper.selectDangerCount(date,areaValue); |
| | | if(dangerCount!=null){ |
| | | danger.setNumOne(dangerCount.getNumOne()); |
| | | danger.setNumTwo(dangerCount.getNumTwo()); |
| | |
| | | ComActAcidRecord comActAcidRecord = new ComActAcidRecord(); |
| | | BeanUtils.copyProperties(comActAcidRecordVO, comActAcidRecord); |
| | | String idCard = comActAcidRecordVO.getIdCard(); |
| | | ComActAcidRecord comActAcidRecord1 = this.baseMapper.selectById(comActAcidRecordVO.getId()); |
| | | comActAcidRecord.setUserId(comActAcidRecord1.getUserId()); |
| | | if (isBlank(idCard)) { |
| | | //只修改地址,其他信息需要查询 |
| | | ComActAcidRecord comActAcidRecord1 = this.baseMapper.selectById(comActAcidRecordVO.getId()); |
| | | //只修改地址 |
| | | if (isNull(comActAcidRecord1)) { |
| | | return R.fail("填报纪录不存在"); |
| | | } |
| | | String localCity = comActAcidRecordVO.getLocalCity(); |
| | | String localAddress = comActAcidRecordVO.getLocalAddress(); |
| | | Integer checkStatus=comActAcidRecordVO.getCheckStatus(); |
| | | String remark=comActAcidRecordVO.getRemark(); |
| | | BeanUtils.copyProperties(comActAcidRecord1, comActAcidRecordVO); |
| | | if(StringUtils.isNotEmpty(localCity)){ |
| | | comActAcidRecordVO.setLocalCity(localCity); |
| | | } |
| | | if(StringUtils.isNotEmpty(localAddress)){ |
| | | comActAcidRecordVO.setLocalAddress(localAddress); |
| | | } |
| | | BeanUtils.copyProperties(comActAcidRecord1,comActAcidRecord); |
| | | if(checkStatus>0){ |
| | | comActAcidRecord.setCheckStatus(checkStatus); |
| | | } |
| | | if(StringUtils.isNotEmpty(remark)){ |
| | | comActAcidRecord.setRemark(remark); |
| | | } |
| | | } |
| | | ComActAcidDangerMember comActAcidDangerMember = |
| | |
| | | String dangerArea = comActAcidRecordVO.getDangerArea(); |
| | | String outsideCity = comActAcidRecordVO.getOutsideCity(); |
| | | String acidTest = comActAcidRecordVO.getAcidTest(); |
| | | if(StringUtils.isEmpty(acidTest)){ |
| | | acidTest="阴性"; |
| | | } |
| | | if (StringUtils.inStringIgnoreCase(colorMark, "红码", "黄码") || travelCard.equals("是") || dangerArea.equals("是") |
| | | || outsideCity.equals("是") || acidTest.equals("阳性")) { |
| | | // 风险人员 |
| | |
| | | ComActAcidRecord comActAcidRecord = new ComActAcidRecord(); |
| | | BeanUtils.copyProperties(comActAcidRecordVO, comActAcidRecord); |
| | | String idCard = comActAcidRecordVO.getIdCard(); |
| | | if(StringUtils.isNotEmpty(comActAcidRecordVO.getAcidImage())){ |
| | | comActAcidRecord.setAcidImage(" "); |
| | | } |
| | | if(StringUtils.isNotEmpty(comActAcidRecordVO.getColorImage())){ |
| | | comActAcidRecord.setColorImage(" "); |
| | | } |
| | | if(StringUtils.isNotEmpty(comActAcidRecordVO.getTravelImage())){ |
| | | comActAcidRecord.setTravelImage(" "); |
| | | } |
| | | if(StringUtils.isNotEmpty(comActAcidRecordVO.getVaccinationImage())){ |
| | | comActAcidRecord.setVaccinationImage(" "); |
| | | } |
| | | ComActAcidRecord comActAcidRecord1 = this.baseMapper.selectById(comActAcidRecordVO.getId()); |
| | | comActAcidRecord.setUserId(comActAcidRecord1.getUserId()); |
| | | if (isBlank(idCard)) { |
| | | //只修改地址,其他信息需要查询 |
| | | ComActAcidRecord comActAcidRecord1 = this.baseMapper.selectById(comActAcidRecordVO.getId()); |
| | | //只修改核对状态 |
| | | if (isNull(comActAcidRecord1)) { |
| | | return R.fail("填报纪录不存在"); |
| | | } |
| | | String localCity = comActAcidRecordVO.getLocalCity(); |
| | | String localAddress = comActAcidRecordVO.getLocalAddress(); |
| | | Integer checkStatus=comActAcidRecordVO.getCheckStatus(); |
| | | String remark=comActAcidRecordVO.getRemark(); |
| | | BeanUtils.copyProperties(comActAcidRecord1, comActAcidRecordVO); |
| | | if(StringUtils.isNotEmpty(localCity)){ |
| | | comActAcidRecordVO.setLocalCity(localCity); |
| | | BeanUtils.copyProperties(comActAcidRecord1,comActAcidRecord); |
| | | if(checkStatus>0){ |
| | | comActAcidRecord.setCheckStatus(checkStatus); |
| | | } |
| | | if(StringUtils.isNotEmpty(localAddress)){ |
| | | comActAcidRecordVO.setLocalAddress(localAddress); |
| | | if(StringUtils.isNotEmpty(remark)){ |
| | | comActAcidRecord.setRemark(remark); |
| | | } |
| | | } |
| | | ComActAcidDangerMember comActAcidDangerMember = |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R detailByApp(Long id) { |
| | | public R detailByApp(Long id,String localCity) { |
| | | ComActAcidRecord comActAcidRecord=this.baseMapper.selectById(id); |
| | | ComActAcidRecordVO comActAcidRecordVO=this.baseMapper.selectLastNext(id); |
| | | ComActAcidRecordVO comActAcidRecordVO=this.baseMapper.selectLastNext(id,localCity); |
| | | BeanUtils.copyProperties(comActAcidRecord,comActAcidRecordVO); |
| | | return R.ok(comActAcidRecordVO); |
| | | } |