MyTetra Share
Делитесь знаниями!
Замена на подтвержденную КП
Время создания: 10.12.2019 09:26
Раздел: INFO - JOB - CUBA - GroovyScripts
Запись: wwwlir/Tetra/master/base/15759411785fyyqnpihw/text.html на raw.githubusercontent.com

import com.groupstp.rtneo.entity.*;

import com.haulmont.cuba.core.global.*;

import com.groupstp.rtneo.service.*;

import com.groupstp.rtneo.core.bean.ContainerYardWorker

import com.groupstp.rtneo.data.ContainerYardSearchData


DataManager dataManager = AppBeans.get(DataManager.NAME);

ContainerYardWorker worker = AppBeans.get(ContainerYardWorker.NAME)


def i = 0

def reContainerYards = dataManager.load(RealEstateContainerYard.class)

.query('select r from rtneo$RealEstateContainerYard r where r.createdBy = \'asokolov@groupstp.ru\'')

.firstResult(i*10)

.maxResults(10)

.view("realEstateContainerYard-browse")

.list()


for(RealEstateContainerYard recy : reContainerYards){

log.debug("cre - ${recy.getContragentRealEstate().getId()}")

log.debug("recy - ${recy.getId()}")

ContainerYard yard = worker.getNearContainerYard(new ContainerYardSearchData(recy.getContragentRealEstate().getRealEstate()))

if(yard == null){

log.debug("yard is null for cre !${recy.getContragentRealEstate().getId()}")

continue

}

recy.setContainerYard(yard)

dataManager.commit(recy)

}


Так же в этом разделе:
 
MyTetra Share v.0.65
Яндекс индекс цитирования