| | |
| | | } |
| | | |
| | | @Override |
| | | public R exportNew(ComActAcidRecordDTO comActAcidRecordDTO) { |
| | | List<ComActAcidRecordExcelReturn> comActAcidRecordExcelVOS=this.baseMapper.exportNew(comActAcidRecordDTO); |
| | | comActAcidRecordExcelVOS.forEach(comActAcidRecordExcelVO -> { |
| | | if(StringUtils.isNotEmpty(comActAcidRecordExcelVO.getTouristCity())&&comActAcidRecordExcelVO.getTouristCity().contains("[")){ |
| | | JSONArray jsonArray = JSON.parseArray(comActAcidRecordExcelVO.getTouristCity()); |
| | | if(jsonArray.isEmpty()){ |
| | | comActAcidRecordExcelVO.setTouristCity(""); |
| | | } |
| | | else { |
| | | StringBuilder touristCity= new StringBuilder(); |
| | | for(int i=0;i<jsonArray.size();i++){ |
| | | JSONObject jsonObject=jsonArray.getJSONObject(i); |
| | | String name=jsonObject.getString("name"); |
| | | if(StringUtils.isNotEmpty(name)){ |
| | | touristCity.append(name).append(";"); |
| | | } |
| | | } |
| | | comActAcidRecordExcelVO.setTouristCity(touristCity.toString()); |
| | | } |
| | | } |
| | | }); |
| | | return R.ok(comActAcidRecordExcelVOS); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R insertRecord(ComActAcidRecordVO comActAcidRecordVO) { |
| | | Integer count= this.baseMapper.selectCount(new QueryWrapper<ComActAcidRecord>().lambda().eq(ComActAcidRecord::getIdCard,comActAcidRecordVO.getIdCard()).ge(ComActAcidRecord::getCreateTime, DateUtils.getCurrentDate(DateUtils.yyyyMMdd_format))); |