static void Job2(Args _args)
{
HcmEmployment HcmEmployment;
HcmWorker HcmWorker;
Companyinfo companyinfo;
;
while select * from HcmWorker
{
while select * from Companyinfo
{
select * from HcmEmployment where HcmEmployment.Worker == HcmWorker.RecId
&& HcmEmployment.LegalEntity == Companyinfo.RecId;
if(!HcmEmployment)
{
ttsBegin;
HcmEmployment.Worker = HcmWorker.RecId;
HcmEmployment.LegalEntity = Companyinfo.RecId;
HcmEmployment.ValidFrom = DateTimeUtil::newDateTime(DateTimeUtil::date(DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::utcNow(), DateTimeUtil::getUserPreferredTimeZone())), 0);
HcmEmployment.ValidTo = DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::maxValue(), DateTimeUtil::getUserPreferredTimeZone());
HcmEmployment.insert();
ttsCommit;
}
}
}
}
No comments:
Post a Comment