| | |
| | | * 前端请求 时 必须传入 |
| | | * param.append('importAdapt', "importRoomOwner"); |
| | | */ |
| | | @Service("importPropertyWhiteListfFlowQueueData") |
| | | @Service("importPropertyWhiteListFlowQueueData") |
| | | public class ImportPropertyWhiteListfFlowQueueDataAdapt extends DefaultImportData implements IImportDataAdapt { |
| | | |
| | | |
| | |
| | | updateImportLogDetailState(assetImportLogDetailDto.getDetailId(), e); |
| | | } |
| | | } |
| | | PropertyWhiteListFlowDto propertyWhiteListFlowDto = new PropertyWhiteListFlowDto(); |
| | | propertyWhiteListFlowDto.setFrequencyLike("退费-"); |
| | | List<PropertyWhiteListFlowDto> propertyWhiteListFlowDtos = importPropertyWhiteListfFlowServiceSMOImpl.queryPropertyWhiteListFlow(propertyWhiteListFlowDto); |
| | | for (PropertyWhiteListFlowDto propertyWhiteListFlowDto1 : propertyWhiteListFlowDtos) { |
| | | PropertyWhiteListFlowDto propertyWhiteListFlowDto2 = new PropertyWhiteListFlowDto(); |
| | | propertyWhiteListFlowDto2.setInvoiceReceiptNo(propertyWhiteListFlowDto1.getFrequency().split("-")[1]); |
| | | propertyWhiteListFlowDto2.setCommunityId(propertyWhiteListFlowDto1.getCommunityId()); |
| | | List<PropertyWhiteListFlowDto> propertyWhiteListFlowDtos1 = importPropertyWhiteListfFlowServiceSMOImpl.queryPropertyWhiteListFlow(propertyWhiteListFlowDto2); |
| | | if (propertyWhiteListFlowDtos1.size() != 0) { |
| | | propertyWhiteListFlowDtos1.get(0).setFrequency("被退费-"+propertyWhiteListFlowDto2.getInvoiceReceiptNo()); |
| | | importPropertyWhiteListfFlowServiceSMOImpl.updatePropertyWhiteListFlow(propertyWhiteListFlowDtos1.get(0)); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | private void doImportData(AssetImportLogDetailDto assetImportLogDetailDto) { |
| | | JSONObject data = JSONObject.parseObject(assetImportLogDetailDto.getContent()); |
| | | PropertyWhiteListFlowDto whites = BeanConvertUtil.covertBean(data, PropertyWhiteListFlowDto.class); |
| | | int count = importPropertyWhiteListfFlowServiceSMOImpl.countPropertyWhiteListFlowFilter(whites); |
| | | if (count > 0) { |
| | | throw new IllegalArgumentException("第" + whites.getRow() + "行存在重复的导入内容"); |
| | | } |
| | | int flag = importPropertyWhiteListfFlowServiceSMOImpl.savePropertyWhiteListFlow(whites); |
| | | if (flag < 1) { |
| | | throw new IllegalArgumentException("导入失败"); |
| | | throw new IllegalArgumentException("第" + whites.getRow() + "行导入失败"); |
| | | } |
| | | |
| | | } |