MyTetra Share
Делитесь знаниями!
1
Время создания: 11.08.2020 15:44
Раздел: INFO - JOB - rtneo - Работа над задачами - Исправление начислений
Запись: wwwlir/Tetra/master/base/1597131842wggivns6r0/text.html на raw.githubusercontent.com

import java.util.*;

import java.util.function.Function;

import java.util.stream.*;

import com.haulmont.cuba.core.entity.KeyValueEntity;


List<String> contragentsId = Stream.of('d693c9f3-ab3c-11b0-959b-42d6520d3221',

'3323883d-bc6b-2b3d-6cae-c8f3e7c0f00b',

'73cc71ad-9781-df00-cec0-3cdd10b4665a',

'12e3f863-bb14-f791-5d96-db5dec07bdd4',

'57b0aed7-7c7b-e846-ecfb-c0b2de3f647b',

'951fd1ee-8516-6558-4e16-22627b2ba39c',

'5328ef64-a3f4-9dd6-624d-08f7544fca66',

'01b5d8ca-4644-e4b1-d293-a31a2175f525',

'302a57e5-321a-7a8f-c782-e58c90f80efd',

'9a043162-86ab-30e6-cbfb-f08e21cf7032',

'96628742-5397-0a5c-8b87-2e46e24b0d1d',

'4d2f7dc4-2c40-5ea0-c558-6c77d14855b7',

'5a5cd480-23c1-c20d-e7eb-705fcb0139cf',

'4265d203-17a7-7e91-60ff-694fa87d57d1',

'bf3387ec-04d0-fd2a-0b61-d7130ef97e81',

'9cdb3b45-44a2-0867-b939-867c4db81273',

'18048d32-113c-b3c1-2d69-1ad44615e176',

'65e474a2-fea4-e61c-237b-c266111ace28',

'f98b1fcc-8779-dad0-35fa-129977b98119',

'647e772f-2bbc-c1bf-510d-317246d293e6',

'e1cd2753-aaec-b024-ff63-f4b8c2f0b2f1',

'adb86ed7-1658-82d7-9fdd-1f76aaafa2e3',

'8bce8ac6-d459-2488-0cf1-108c86635e2e',

'71e77985-8ebf-3398-be87-7878a5283282',

'60b6eb26-d6e4-ac39-b9c9-0df9b7ea11e2',

'5adc88f9-acf9-aea1-e349-4a83adfb251c',

'f0cd0b2b-ccfe-0ee3-8b99-b9e07b823151',

'a08765b2-ed3b-2c6f-0219-50bbdbc180f7',

'59c4e362-a607-ad53-e5c3-28ba5a5c4449',

'a2255219-1941-b311-3b97-769278a70af4',

'0a808a77-fa58-7c08-8dbd-1b6a0819b1c6',

'9c942c2e-db09-7640-eb78-1aec67ac2990',

'49c9f17c-b19a-568c-a1a9-c258cbb4bccb',

'9e3240e0-597d-5aa3-f831-5135bac43cfe',

'a416e142-a6a1-89c4-7982-d7270aab92f3',

'878ee9bf-ff3a-8e84-e342-e84c709266a4',

'25742a21-88ed-ce08-4011-89921846167f',

'c8592177-8559-e627-09df-1ea3e0d1b93d',

'b25d7b86-9459-5058-2d55-dd6b8f5de1d0',

'3b74c39f-b58b-e73f-76ae-4dfeb2f72201',

'bcb2c104-a632-a4c3-26ee-50591587c29d',

'f8ab2b4c-7d77-092f-21a7-12092ded2588',

'4f1c07c1-cbc4-0aa4-9b86-ebe811b1fe86',

'9684a5fc-dcbe-c719-d407-a3480d99857f',

'9622a3f9-3d40-db14-9f7d-35317d6f53fd',

'4a4bf44f-d787-8efa-b562-ab5bbc6ddca7',

'd72c63b3-bab5-3508-76e2-8b0140550067',

'c0b9dde7-9665-2026-2fbf-cbe19067998f').collect(Collectors.toList())


List<KeyValueEntity> renters = dataManager.loadValues('select distinct r.renterRecord.contragent.id, r.renterRecord.contragent.personalAccount, r.renterRecord.realEstate.cadastralNumber, r.renterRecord.id from rtneo$RealEstateRenter r inner join rtneo$Payment p where r.renterRecord.contragent.inn = p.inn and r.contragentRealEstate.contragent.id in :contragentsId')

.properties("id", "pa", "cad", "rentCreId")

.parameter("contragentsId", contragentsId)

.list()


renters.each{_("${it.getValue('id')} - ${it.getValue('pa')} - ${it.getValue('cad')} - ${it.getValue('rentCreId')}")}


List<UUID> rentersId = renters.stream().map{e-> UUID.fromString(e.getValue("id").toString())}.collect(Collectors.toList())




void _(Object o){

log.debug(o)

}

 
MyTetra Share v.0.55
Яндекс индекс цитирования